This commit is contained in:
Oscar Plaisant 2024-04-01 23:43:16 +02:00
parent 5c28dd5a77
commit 685160a5e5
4 changed files with 568 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,10 @@
{
"id": "obsidian-pandoc-reference-list",
"name": "Pandoc Reference List",
"version": "2.0.25",
"minAppVersion": "0.15.0",
"description": "Displays a formatted reference in the sidebar for each pandoc citekey present in the current document.",
"author": "mgmeyers",
"authorUrl": "https://github.com/mgmeyers/obsidian-pandoc-reference-list",
"isDesktopOnly": true
}

View File

@ -0,0 +1,410 @@
/* @settings
name: Pandoc Reference List
id: pandoc-reference-list
settings:
-
id: pwc-font-size
title: Sidebar reference list font size
type: variable-number-slider
default: 14
format: px
min: 8
max: 24
step: 1
-
id: pwc-tooltip-font-size
title: Tooltip citation font size
type: variable-number-slider
default: 14
format: px
min: 8
max: 24
step: 1
-
id: pwc-citation-color
title: Citation color
type: variable-themed-color
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
-
id: pwc-citation-color-missing
title: Unresolved citation color
description: This color will be applied if a citekey is not found in your bibliography file
type: variable-themed-color
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
-
id: pwc-citation-underline-color
title: Citation underline color
type: variable-themed-color
format: hex
default-light: '#705dcf'
default-dark: '#7f6df2'
-
id: pwc-citation-underline-color-missing
title: Unresolved citation underline color
description: This color will be applied if a citekey is not found in your bibliography file
type: variable-themed-color
format: hex
default-light: '#'
default-dark: '#'
-
id: pwc-citation-formatting-color
title: Citation formatting color
description: Changes the color of brackets and semicolons
type: variable-themed-color
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
-
id: pwc-citation-extra-color
title: 'Citation "extra" color'
description: 'Changes the color text within a citation, eg. "pp. 22-24"'
type: variable-themed-color
format: hex
default-light: '#2e3338'
default-dark: '#dcddde'
*/
body {
--pwc-font-size: 14px;
--pwc-tooltip-font-size: 14px;
--pwc-citation-underline-color: var(--text-accent);
--pwc-citation-underline-color-missing: transparent;
--pwc-citation-extra-color: var(--text-normal);
--pwc-citation-formatting-color: var(--text-normal);
--pwc-citation-color: var(--text-normal);
--pwc-citation-color-missing: var(--text-normal);
}
.pwc-reference-list {
padding-bottom: 2rem;
}
.pwc-reference-list__title {
font-size: var(--pwc-font-size);
font-weight: bold;
padding: 0 5px;
display: flex;
justify-content: space-between;
align-items: center;
}
.pwc-reference-list__title > div {
display: flex;
align-items: center;
gap: var(--size-4-1);
}
.pwc-reference-list__count {
color: var(--text-muted);
display: flex;
padding: var(--size-4-1) var(--size-4-2);
border-radius: var(--tag-radius);
background-color: rgba(var(--mono-rgb-100), 0.05);
font-weight: var(--font-normal);
line-height: 1;
font-size: var(--font-ui-smaller);
}
.pwc-no-content {
font-size: var(--pwc-font-size);
padding: 0 5px;
color: var(--text-muted);
}
.csl-entry-wrapper {
--icon-size: var(--icon-s);
--icon-stroke: var(--icon-s-stroke-width);
display: flex;
padding: 1em 5px;
gap: var(--size-4-2);
}
.pwc-tooltip .csl-entry-wrapper {
padding: 0;
}
.csl-entry {
font-size: var(--pwc-font-size);
word-wrap: break-word;
gap: var(--size-4-2);
}
.csl-entry:has(> div + div) {
display: flex;
}
.pwc-reference-list .csl-entry-wrapper:not(:last-child) {
border-bottom: 1px solid var(--background-modifier-border);
}
.pwc-entry-btns {
display: flex;
flex-direction: column;
gap: var(--size-4-1);
}
.pwc-reference-list a.footnote-ref {
vertical-align: super;
}
.pwc-reference-list em,
.pwc-reference-list em em em,
.pwc-reference-list em em em em em {
font-style: italic;
}
.pwc-reference-list em em,
.pwc-reference-list em em em em {
font-style: normal;
}
.pwc-reference-list code {
white-space: pre-wrap;
}
.pwc-reference-list span.smallcaps {
font-variant: small-caps;
}
.pwc-reference-list span.underline {
text-decoration: underline;
}
.pwc-reference-list q {
quotes: '“' '”' '' '';
}
.pwc-reference-list div.column {
display: inline-block;
vertical-align: top;
width: 50%;
}
.pwc-tooltip.collapsed-links a,
.pwc-reference-list.collapsed-links a {
font-size: 0;
}
.pwc-tooltip.collapsed-links a::after,
.pwc-reference-list.collapsed-links a::after {
font-size: var(--pwc-font-size);
content: ' ';
display: inline-block;
width: 1em;
height: 1em;
background-color: var(--text-accent);
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath d='M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z'%3E%3C/path%3E%3Cpath d='m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z'%3E%3C/path%3E%3C/svg%3E");
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath d='M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z'%3E%3C/path%3E%3Cpath d='m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z'%3E%3C/path%3E%3C/svg%3E");
}
.pwc-tooltip {
word-wrap: break-word;
position: fixed;
font-family: var(--font-interface);
font-size: var(--pwc-tooltip-font-size);
padding: 10px;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
border-radius: 6px;
width: 95vw;
max-width: 300px;
line-height: 1.4;
z-index: var(--layer-popover);
overflow: hidden;
display: flex;
flex-direction: column;
gap: var(--size-4-2);
user-select: text;
}
.pwc-tooltip .csl-entry {
padding: 0;
}
.pwc-tooltips .cm-hmd-barelink {
text-decoration: none;
}
.pwc-tooltips
:not(a, .cm-hmd-internal-link, .cm-link-alias)
> :is(.pandoc-citation, .at).is-resolved {
color: var(--pwc-citation-color);
}
.pwc-tooltips
:not(.cm-formatting-link)
> .cm-pandoc-citation-formatting:not(.at) {
color: var(--pwc-citation-formatting-color);
}
.pwc-tooltips
:not(.cm-hmd-internal-link, .cm-link-alias)
> .cm-pandoc-citation-extra {
color: var(--pwc-citation-extra-color);
}
.pwc-tooltips :not(.cm-link-alias) > :is(.pandoc-citation, .at).is-resolved {
text-decoration: underline;
text-decoration-style: dotted;
text-decoration-thickness: 2px;
text-decoration-color: var(--pwc-citation-underline-color);
}
.pwc-tooltips
:not(.cm-hmd-internal-link, .cm-link-alias)
> :is(.pandoc-citation, .at).is-unresolved {
text-decoration-color: var(--pwc-citation-underline-color-missing);
opacity: 1;
}
.pwc-tooltips
:not(.cm-hmd-internal-link, .cm-link-alias)
> :is(.pandoc-citation, .at).is-unresolved {
color: var(--pwc-citation-color-missing);
}
.pwc-tooltips
:not(a, .cm-hmd-internal-link, .cm-link-alias)
> :is(.pandoc-citation, .at).is-link {
color: var(--link-color);
cursor: var(--cursor-link);
}
.pandoc-citation > * {
pointer-events: none;
}
.pwc-success {
color: var(--interactive-success);
}
.pwc-error {
color: var(--text-error);
}
.pwc-multiselect {
width: 320px;
text-align: left;
font-size: var(--font-ui-small);
}
.pwc-multiselect input {
outline: none !important;
box-shadow: none !important;
font-size: var(--font-ui-small);
height: unset;
}
.pwc-setting-item-wrapper {
flex-direction: column;
align-items: stretch;
}
.pwc-setting-item-wrapper > div {
margin-right: 0 !important;
}
.pwc-setting-item-wrapper > div:last-child {
padding-bottom: 0;
}
.pwc-group-toggle {
display: flex;
justify-content: flex-end;
padding-top: var(--size-4-2);
}
.pwc-group-toggle .setting-item-description {
padding-top: 0;
}
.pwc-suggest-title {
font-size: var(--font-ui-small);
color: var(--text-muted);
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-top: var(--size-4-1);
}
.pwc-suggest-loading-wrapper {
display: flex;
position: relative;
align-items: center;
justify-content: center;
padding: var(--size-4-2) 0;
}
.pwc-suggest-loading,
.pwc-suggest-loading:before,
.pwc-suggest-loading:after {
border-radius: 999px;
width: 1em;
height: 1em;
animation-fill-mode: both;
animation: bblFadInOut 1.6s infinite ease-in-out;
}
.pwc-suggest-loading {
display: block;
color: var(--text-muted);
font-size: 7px;
position: relative;
animation-delay: -0.16s;
top: -1em;
}
.pwc-suggest-loading:before,
.pwc-suggest-loading:after {
content: '';
position: absolute;
}
.pwc-suggest-loading:before {
left: -2em;
animation-delay: -0.32s;
}
.pwc-suggest-loading:after {
left: 2em;
}
@keyframes bblFadInOut {
0%,
80%,
100% {
box-shadow: 0 1em 0 -1.3em;
}
40% {
box-shadow: 0 1em 0 0;
}
}
.pwc-status-icon {
--icon-size: var(--icon-s);
--icon-stroke: var(--icon-s-stroke-width);
}
.pwc-status-icon.is-loading svg {
animation: spin 2s linear infinite;
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.suggestion-container.pwc-suggest {
max-width: 500px;
width: 95vw;
}

View File

@ -266,11 +266,30 @@ La logique combinatoire est un système de calcul dans lequel toutes les fonctio
### programmation structurée
La programmation structurée peut être définie, du point du vue théorique, comme un paradigme dans lequel le contrôle du flot se fait en utilisant des instructions de contrôle du flot d'exécution particulières (des structures de sélection et d'itération), et qui sont sous la forme de blocks.
> [!cite]+ [Structured programming - Wikipedia](zotero://select/groups/5383243/items/LGC6RCX5) - [Page ](zotero://open-pdf/groups/5383243/items/7KR7GM4L?annotation=MF24SBCD)
> Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection (if/then/else) and repetition (while and for), block structures, and subroutines.
> ^MF24SBCDa7KR7GM4Lg5383243
Les structures de sélection sont des structures particulières qui permettent de choisir quel groupe d'instruction sera exécuté en fonction de l'état du programme.
> [!cite]- [Structured programming - Wikipedia](zotero://select/groups/5383243/items/LGC6RCX5) - [Page ](zotero://open-pdf/groups/5383243/items/7KR7GM4L?annotation=2YR6SG87)
> "Selection"; one or a number of statements is executed depending on the state of the program. This is usually expressed with keywords such as if..then..else..endif. The conditional statement should have at least one true condition and each condition should have one exit point at max.
> ^2YR6SG87a7KR7GM4Lg5383243
Les structures d'itération sont des instructions qui exécutent répétitivement un block jusqu'à ce que le programme atteigne un certain état, ou bien que certaines opérations aient été appliquées sur chaque élément d'une collection.
> [!cite]+ [Structured programming - Wikipedia](zotero://select/groups/5383243/items/LGC6RCX5) - [Page ](zotero://open-pdf/groups/5383243/items/7KR7GM4L?annotation=BBWVNENQ)
> "Iteration"; a statement or block is executed until the program reaches a certain state, or operations have been applied to every element of a collection. This is usually expressed with keywords such as while, repeat, for or do..until. Often it is recommended that each loop should only have one entry point (and in the original structural programming, also only one exit point, and a few languages enforce this).
> ^BBWVNENQa7KR7GM4Lg5383243
Il est important de voir que le but de la programmation structurée est de produire des programmes plus clairs et de meilleure qualité (*ref*)
> [!cite]+ [Why Functional Programming Matters](zotero://select/groups/5383243/items/6RZUZSFR) - [Page 2](zotero://open-pdf/groups/5383243/items/H9SGRTMQ?page=2&annotation=3TVGD5RH)
> ![[images/zotero/53832433TVGD5RH.png]]
> ^3TVGD5RHaH9SGRTMQg5383243p2
## les langages multi-paradigmes
> [!cite] [Programming Paradigms for Dummies: What Every Programmer Should Know](zotero://select/groups/5383243/items/673TMQRT) - [Page 10](zotero://open-pdf/groups/5383243/items/P4L4LCJZ?page=2&annotation=4YR7745Q)