update exercises w38 and w39

This commit is contained in:
KarlHenrik
2025-09-10 12:14:32 +02:00
parent cee5f8e1f0
commit fbdf9c32f8
196 changed files with 23368 additions and 300 deletions
@@ -0,0 +1,26 @@
# A11Y Dark
This is the Pygments implementation of a11y-dark from [Eric Bailey's
accessible themes for syntax
highlighting](https://github.com/ericwbailey/a11y-syntax-highlighting)
![Screenshot of the a11y-dark theme in a bash script](./images/a11y-dark.png)
## Colors
Background color: ![#2b2b2b](https://via.placeholder.com/20/2b2b2b/2b2b2b.png) `#2b2b2b`
Highlight color: ![#ffd9002e](https://via.placeholder.com/20/ffd9002e/ffd9002e.png) `#ffd9002e`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#d4d0ab](../../a11y_pygments/assets/d4d0ab.png) | `#d4d0ab` | 9.0 : 1 | AAA | AAA |
| ![#ffa07a](../../a11y_pygments/assets/ffa07a.png) | `#ffa07a` | 7.1 : 1 | AAA | AAA |
| ![#f5ab35](../../a11y_pygments/assets/f5ab35.png) | `#f5ab35` | 7.3 : 1 | AAA | AAA |
| ![#ffd700](../../a11y_pygments/assets/ffd700.png) | `#ffd700` | 10.1 : 1 | AAA | AAA |
| ![#abe338](../../a11y_pygments/assets/abe338.png) | `#abe338` | 9.3 : 1 | AAA | AAA |
| ![#00e0e0](../../a11y_pygments/assets/00e0e0.png) | `#00e0e0` | 8.6 : 1 | AAA | AAA |
| ![#dcc6e0](../../a11y_pygments/assets/dcc6e0.png) | `#dcc6e0` | 8.9 : 1 | AAA | AAA |
| ![#f8f8f2](../../a11y_pygments/assets/f8f8f2.png) | `#f8f8f2` | 13.3 : 1 | AAA | AAA |
@@ -0,0 +1,22 @@
# A11Y High Contrast Dark
This style mimics the a11 light theme from eric bailey's accessible themes.
![Screenshot of the a11y-high-contrast-dark theme in a bash script](./images/a11y-high-contrast-dark.png)
## Colors
Background color: ![#2b2b2b](https://via.placeholder.com/20/2b2b2b/2b2b2b.png) `#2b2b2b`
Highlight color: ![#ffd9002e](https://via.placeholder.com/20/ffd9002e/ffd9002e.png) `#ffd9002e`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#ffd900](../../a11y_pygments/assets/ffd900.png) | `#ffd900` | 10.2 : 1 | AAA | AAA |
| ![#ffa07a](../../a11y_pygments/assets/ffa07a.png) | `#ffa07a` | 7.1 : 1 | AAA | AAA |
| ![#abe338](../../a11y_pygments/assets/abe338.png) | `#abe338` | 9.3 : 1 | AAA | AAA |
| ![#00e0e0](../../a11y_pygments/assets/00e0e0.png) | `#00e0e0` | 8.6 : 1 | AAA | AAA |
| ![#dcc6e0](../../a11y_pygments/assets/dcc6e0.png) | `#dcc6e0` | 8.9 : 1 | AAA | AAA |
| ![#f8f8f2](../../a11y_pygments/assets/f8f8f2.png) | `#f8f8f2` | 13.3 : 1 | AAA | AAA |
@@ -0,0 +1,24 @@
# A11Y High Contrast Light
This style mimics the a11y-light theme (but with more contrast) from eric bailey's accessible themes.
![Screenshot of the a11y-high-contrast-light theme in a bash script](./images/a11y-high-contrast-light.png)
## Colors
Background color: ![#fefefe](https://via.placeholder.com/20/fefefe/fefefe.png) `#fefefe`
Highlight color: ![#fae4c2](https://via.placeholder.com/20/fae4c2/fae4c2.png) `#fae4c2`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#515151](../../a11y_pygments/assets/515151.png) | `#515151` | 7.9 : 1 | AAA | AAA |
| ![#a12236](../../a11y_pygments/assets/a12236.png) | `#a12236` | 7.4 : 1 | AAA | AAA |
| ![#7f4707](../../a11y_pygments/assets/7f4707.png) | `#7f4707` | 7.4 : 1 | AAA | AAA |
| ![#912583](../../a11y_pygments/assets/912583.png) | `#912583` | 7.4 : 1 | AAA | AAA |
| ![#00622f](../../a11y_pygments/assets/00622f.png) | `#00622f` | 7.5 : 1 | AAA | AAA |
| ![#005b82](../../a11y_pygments/assets/005b82.png) | `#005b82` | 7.4 : 1 | AAA | AAA |
| ![#6730c5](../../a11y_pygments/assets/6730c5.png) | `#6730c5` | 7.4 : 1 | AAA | AAA |
| ![#080808](../../a11y_pygments/assets/080808.png) | `#080808` | 19.9 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# A11Y Light
This style inspired by the a11y-light theme from eric bailey's accessible themes.
![Screenshot of the a11y-light theme in a bash script](./images/a11y-light.png)
## Colors
Background color: ![#f2f2f2](https://via.placeholder.com/20/f2f2f2/f2f2f2.png) `#f2f2f2`
Highlight color: ![#fdf2e2](https://via.placeholder.com/20/fdf2e2/fdf2e2.png) `#fdf2e2`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#515151](../../a11y_pygments/assets/515151.png) | `#515151` | 7.1 : 1 | AAA | AAA |
| ![#d71835](../../a11y_pygments/assets/d71835.png) | `#d71835` | 4.6 : 1 | AA | AAA |
| ![#7f4707](../../a11y_pygments/assets/7f4707.png) | `#7f4707` | 6.7 : 1 | AA | AAA |
| ![#116633](../../a11y_pygments/assets/116633.png) | `#116633` | 6.3 : 1 | AA | AAA |
| ![#00749c](../../a11y_pygments/assets/00749c.png) | `#00749c` | 4.7 : 1 | AA | AAA |
| ![#8045e5](../../a11y_pygments/assets/8045e5.png) | `#8045e5` | 4.8 : 1 | AA | AAA |
| ![#1e1e1e](../../a11y_pygments/assets/1e1e1e.png) | `#1e1e1e` | 14.9 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Blinds Dark
This style mimics the blinds dark theme from vscode themes.
![Screenshot of the blinds-dark theme in a bash script](./images/blinds-dark.png)
## Colors
Background color: ![#242424](https://via.placeholder.com/20/242424/242424.png) `#242424`
Highlight color: ![#66666691](https://via.placeholder.com/20/66666691/66666691.png) `#66666691`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | ------- | ----------- | ---------- |
| ![#8c8c8c](../../a11y_pygments/assets/8c8c8c.png) | `#8c8c8c` | 4.6 : 1 | AA | AAA |
| ![#ee6677](../../a11y_pygments/assets/ee6677.png) | `#ee6677` | 5.0 : 1 | AA | AAA |
| ![#ccbb44](../../a11y_pygments/assets/ccbb44.png) | `#ccbb44` | 8.0 : 1 | AAA | AAA |
| ![#66ccee](../../a11y_pygments/assets/66ccee.png) | `#66ccee` | 8.5 : 1 | AAA | AAA |
| ![#5391cf](../../a11y_pygments/assets/5391cf.png) | `#5391cf` | 4.7 : 1 | AA | AAA |
| ![#d166a3](../../a11y_pygments/assets/d166a3.png) | `#d166a3` | 4.5 : 1 | AA | AAA |
| ![#bbbbbb](../../a11y_pygments/assets/bbbbbb.png) | `#bbbbbb` | 8.1 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Blinds Light
This style mimics the blinds light theme from vscode themes.
![Screenshot of the blinds-light theme in a bash script](./images/blinds-light.png)
## Colors
Background color: ![#fcfcfc](https://via.placeholder.com/20/fcfcfc/fcfcfc.png) `#fcfcfc`
Highlight color: ![#add6ff](https://via.placeholder.com/20/add6ff/add6ff.png) `#add6ff`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#737373](../../a11y_pygments/assets/737373.png) | `#737373` | 4.6 : 1 | AA | AAA |
| ![#bf5400](../../a11y_pygments/assets/bf5400.png) | `#bf5400` | 4.6 : 1 | AA | AAA |
| ![#996b00](../../a11y_pygments/assets/996b00.png) | `#996b00` | 4.6 : 1 | AA | AAA |
| ![#008561](../../a11y_pygments/assets/008561.png) | `#008561` | 4.5 : 1 | AA | AAA |
| ![#0072b2](../../a11y_pygments/assets/0072b2.png) | `#0072b2` | 5.1 : 1 | AA | AAA |
| ![#cc398b](../../a11y_pygments/assets/cc398b.png) | `#cc398b` | 4.5 : 1 | AA | AAA |
| ![#000000](../../a11y_pygments/assets/000000.png) | `#000000` | 20.5 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Github Dark
This style mimics the github dark default theme from vs code themes.
![Screenshot of the github-dark theme in a bash script](./images/github-dark.png)
## Colors
Background color: ![#0d1117](https://via.placeholder.com/20/0d1117/0d1117.png) `#0d1117`
Highlight color: ![#6e7681](https://via.placeholder.com/20/6e7681/6e7681.png) `#6e7681`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#8b949e](../../a11y_pygments/assets/8b949e.png) | `#8b949e` | 6.2 : 1 | AA | AAA |
| ![#ff7b72](../../a11y_pygments/assets/ff7b72.png) | `#ff7b72` | 7.5 : 1 | AAA | AAA |
| ![#ffa657](../../a11y_pygments/assets/ffa657.png) | `#ffa657` | 9.8 : 1 | AAA | AAA |
| ![#7ee787](../../a11y_pygments/assets/7ee787.png) | `#7ee787` | 12.3 : 1 | AAA | AAA |
| ![#79c0ff](../../a11y_pygments/assets/79c0ff.png) | `#79c0ff` | 9.7 : 1 | AAA | AAA |
| ![#d2a8ff](../../a11y_pygments/assets/d2a8ff.png) | `#d2a8ff` | 9.7 : 1 | AAA | AAA |
| ![#c9d1d9](../../a11y_pygments/assets/c9d1d9.png) | `#c9d1d9` | 12.3 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Github Dark Colorblind
This style mimics the github dark colorblind theme from vscode.
![Screenshot of the github-dark-colorblind theme in a bash script](./images/github-dark-colorblind.png)
## Colors
Background color: ![#0d1117](https://via.placeholder.com/20/0d1117/0d1117.png) `#0d1117`
Highlight color: ![#58a6ff70](https://via.placeholder.com/20/58a6ff70/58a6ff70.png) `#58a6ff70`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#b1bac4](../../a11y_pygments/assets/b1bac4.png) | `#b1bac4` | 9.6 : 1 | AAA | AAA |
| ![#ec8e2c](../../a11y_pygments/assets/ec8e2c.png) | `#ec8e2c` | 7.6 : 1 | AAA | AAA |
| ![#fdac54](../../a11y_pygments/assets/fdac54.png) | `#fdac54` | 10.1 : 1 | AAA | AAA |
| ![#a5d6ff](../../a11y_pygments/assets/a5d6ff.png) | `#a5d6ff` | 12.3 : 1 | AAA | AAA |
| ![#79c0ff](../../a11y_pygments/assets/79c0ff.png) | `#79c0ff` | 9.7 : 1 | AAA | AAA |
| ![#d2a8ff](../../a11y_pygments/assets/d2a8ff.png) | `#d2a8ff` | 9.7 : 1 | AAA | AAA |
| ![#c9d1d9](../../a11y_pygments/assets/c9d1d9.png) | `#c9d1d9` | 12.3 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Github Dark High Contrast
This style mimics the github dark high contrast theme from vs code themes.
![Screenshot of the github-dark-high-contrast theme in a bash script](./images/github-dark-high-contrast.png)
## Colors
Background color: ![#0d1117](https://via.placeholder.com/20/0d1117/0d1117.png) `#0d1117`
Highlight color: ![#58a6ff70](https://via.placeholder.com/20/58a6ff70/58a6ff70.png) `#58a6ff70`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#d9dee3](../../a11y_pygments/assets/d9dee3.png) | `#d9dee3` | 14.0 : 1 | AAA | AAA |
| ![#ff9492](../../a11y_pygments/assets/ff9492.png) | `#ff9492` | 8.9 : 1 | AAA | AAA |
| ![#ffb757](../../a11y_pygments/assets/ffb757.png) | `#ffb757` | 11.0 : 1 | AAA | AAA |
| ![#72f088](../../a11y_pygments/assets/72f088.png) | `#72f088` | 13.1 : 1 | AAA | AAA |
| ![#91cbff](../../a11y_pygments/assets/91cbff.png) | `#91cbff` | 11.0 : 1 | AAA | AAA |
| ![#dbb7ff](../../a11y_pygments/assets/dbb7ff.png) | `#dbb7ff` | 11.0 : 1 | AAA | AAA |
| ![#c9d1d9](../../a11y_pygments/assets/c9d1d9.png) | `#c9d1d9` | 12.3 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Github Light
This style mimics the github light theme from vscode themes.
![Screenshot of the github-light theme in a bash script](./images/github-light.png)
## Colors
Background color: ![#ffffff](https://via.placeholder.com/20/ffffff/ffffff.png) `#ffffff`
Highlight color: ![#0969da4a](https://via.placeholder.com/20/0969da4a/0969da4a.png) `#0969da4a`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#6e7781](../../a11y_pygments/assets/6e7781.png) | `#6e7781` | 4.5 : 1 | AA | AAA |
| ![#cf222e](../../a11y_pygments/assets/cf222e.png) | `#cf222e` | 5.4 : 1 | AA | AAA |
| ![#953800](../../a11y_pygments/assets/953800.png) | `#953800` | 7.4 : 1 | AAA | AAA |
| ![#116329](../../a11y_pygments/assets/116329.png) | `#116329` | 7.4 : 1 | AAA | AAA |
| ![#0550ae](../../a11y_pygments/assets/0550ae.png) | `#0550ae` | 7.6 : 1 | AAA | AAA |
| ![#8250df](../../a11y_pygments/assets/8250df.png) | `#8250df` | 5.0 : 1 | AA | AAA |
| ![#24292f](../../a11y_pygments/assets/24292f.png) | `#24292f` | 14.7 : 1 | AAA | AAA |
@@ -0,0 +1,22 @@
# Github Light Colorblind
This style mimics the github light colorblind theme from vscode themes.
![Screenshot of the github-light-colorblind theme in a bash script](./images/github-light-colorblind.png)
## Colors
Background color: ![#ffffff](https://via.placeholder.com/20/ffffff/ffffff.png) `#ffffff`
Highlight color: ![#0969da4a](https://via.placeholder.com/20/0969da4a/0969da4a.png) `#0969da4a`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#6e7781](../../a11y_pygments/assets/6e7781.png) | `#6e7781` | 4.5 : 1 | AA | AAA |
| ![#b35900](../../a11y_pygments/assets/b35900.png) | `#b35900` | 4.8 : 1 | AA | AAA |
| ![#8a4600](../../a11y_pygments/assets/8a4600.png) | `#8a4600` | 7.1 : 1 | AAA | AAA |
| ![#0550ae](../../a11y_pygments/assets/0550ae.png) | `#0550ae` | 7.6 : 1 | AAA | AAA |
| ![#8250df](../../a11y_pygments/assets/8250df.png) | `#8250df` | 5.0 : 1 | AA | AAA |
| ![#24292f](../../a11y_pygments/assets/24292f.png) | `#24292f` | 14.7 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Github Light High Contrast
This style mimics the github light high contrast theme from vscode themes.
![Screenshot of the github-light-high-contrast theme in a bash script](./images/github-light-high-contrast.png)
## Colors
Background color: ![#ffffff](https://via.placeholder.com/20/ffffff/ffffff.png) `#ffffff`
Highlight color: ![#0969da4a](https://via.placeholder.com/20/0969da4a/0969da4a.png) `#0969da4a`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#66707b](../../a11y_pygments/assets/66707b.png) | `#66707b` | 5.0 : 1 | AA | AAA |
| ![#a0111f](../../a11y_pygments/assets/a0111f.png) | `#a0111f` | 8.1 : 1 | AAA | AAA |
| ![#702c00](../../a11y_pygments/assets/702c00.png) | `#702c00` | 10.2 : 1 | AAA | AAA |
| ![#024c1a](../../a11y_pygments/assets/024c1a.png) | `#024c1a` | 10.2 : 1 | AAA | AAA |
| ![#023b95](../../a11y_pygments/assets/023b95.png) | `#023b95` | 10.2 : 1 | AAA | AAA |
| ![#622cbc](../../a11y_pygments/assets/622cbc.png) | `#622cbc` | 8.1 : 1 | AAA | AAA |
| ![#24292f](../../a11y_pygments/assets/24292f.png) | `#24292f` | 14.7 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Gotthard Dark
This style mimics the gotthard dark theme from vscode.
![Screenshot of the gotthard-dark theme in a bash script](./images/gotthard-dark.png)
## Colors
Background color: ![#000000](https://via.placeholder.com/20/000000/000000.png) `#000000`
Highlight color: ![#4c4b4be8](https://via.placeholder.com/20/4c4b4be8/4c4b4be8.png) `#4c4b4be8`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#f5f5f5](../../a11y_pygments/assets/f5f5f5.png) | `#f5f5f5` | 19.3 : 1 | AAA | AAA |
| ![#ab6369](../../a11y_pygments/assets/ab6369.png) | `#ab6369` | 4.7 : 1 | AA | AAA |
| ![#b89784](../../a11y_pygments/assets/b89784.png) | `#b89784` | 7.8 : 1 | AAA | AAA |
| ![#caab6d](../../a11y_pygments/assets/caab6d.png) | `#caab6d` | 9.6 : 1 | AAA | AAA |
| ![#81b19b](../../a11y_pygments/assets/81b19b.png) | `#81b19b` | 8.7 : 1 | AAA | AAA |
| ![#6f98b3](../../a11y_pygments/assets/6f98b3.png) | `#6f98b3` | 6.8 : 1 | AA | AAA |
| ![#b19db4](../../a11y_pygments/assets/b19db4.png) | `#b19db4` | 8.4 : 1 | AAA | AAA |
@@ -0,0 +1,23 @@
# Gotthard Light
This style mimics the gotthard light theme from vscode.
![Screenshot of the gotthard-light theme in a bash script](./images/gotthard-light.png)
## Colors
Background color: ![#F5F5F5](https://via.placeholder.com/20/F5F5F5/F5F5F5.png) `#F5F5F5`
Highlight color: ![#E1E1E1](https://via.placeholder.com/20/E1E1E1/E1E1E1.png) `#E1E1E1`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#141414](../../a11y_pygments/assets/141414.png) | `#141414` | 16.9 : 1 | AAA | AAA |
| ![#9f4e55](../../a11y_pygments/assets/9f4e55.png) | `#9f4e55` | 5.2 : 1 | AA | AAA |
| ![#a25e53](../../a11y_pygments/assets/a25e53.png) | `#a25e53` | 4.5 : 1 | AA | AAA |
| ![#98661b](../../a11y_pygments/assets/98661b.png) | `#98661b` | 4.5 : 1 | AA | AAA |
| ![#437a6b](../../a11y_pygments/assets/437a6b.png) | `#437a6b` | 4.5 : 1 | AA | AAA |
| ![#3d73a9](../../a11y_pygments/assets/3d73a9.png) | `#3d73a9` | 4.6 : 1 | AA | AAA |
| ![#974eb7](../../a11y_pygments/assets/974eb7.png) | `#974eb7` | 4.7 : 1 | AA | AAA |
@@ -0,0 +1,23 @@
# Greative
This style mimics greative theme from vscode themes.
![Screenshot of the greative theme in a bash script](./images/greative.png)
## Colors
Background color: ![#010726](https://via.placeholder.com/20/010726/010726.png) `#010726`
Highlight color: ![#473d18](https://via.placeholder.com/20/473d18/473d18.png) `#473d18`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#797979](../../a11y_pygments/assets/797979.png) | `#797979` | 4.6 : 1 | AA | AAA |
| ![#f78c6c](../../a11y_pygments/assets/f78c6c.png) | `#f78c6c` | 8.4 : 1 | AAA | AAA |
| ![#9e8741](../../a11y_pygments/assets/9e8741.png) | `#9e8741` | 5.7 : 1 | AA | AAA |
| ![#c5e478](../../a11y_pygments/assets/c5e478.png) | `#c5e478` | 13.9 : 1 | AAA | AAA |
| ![#a2bffc](../../a11y_pygments/assets/a2bffc.png) | `#a2bffc` | 10.8 : 1 | AAA | AAA |
| ![#5ca7e4](../../a11y_pygments/assets/5ca7e4.png) | `#5ca7e4` | 7.6 : 1 | AAA | AAA |
| ![#9e86c8](../../a11y_pygments/assets/9e86c8.png) | `#9e86c8` | 6.3 : 1 | AA | AAA |
@@ -0,0 +1,25 @@
# Pitaya Smoothie
This style mimics the a11 light theme from eric bailey's accessible themes.
![Screenshot of the pitaya-smoothie theme in a bash script](./images/pitaya-smoothie.png)
## Colors
Background color: ![#181036](https://via.placeholder.com/20/181036/181036.png) `#181036`
Highlight color: ![#2A1968](https://via.placeholder.com/20/2A1968/2A1968.png) `#2A1968`
**WCAG compliance**
| Color | Hex | Ratio | Normal text | Large text |
| ------------------------------------------------- | --------- | -------- | ----------- | ---------- |
| ![#8786ac](../../a11y_pygments/assets/8786ac.png) | `#8786ac` | 5.2 : 1 | AA | AAA |
| ![#f26196](../../a11y_pygments/assets/f26196.png) | `#f26196` | 5.9 : 1 | AA | AAA |
| ![#f5a394](../../a11y_pygments/assets/f5a394.png) | `#f5a394` | 9.0 : 1 | AAA | AAA |
| ![#fad000](../../a11y_pygments/assets/fad000.png) | `#fad000` | 12.1 : 1 | AAA | AAA |
| ![#18c1c4](../../a11y_pygments/assets/18c1c4.png) | `#18c1c4` | 8.1 : 1 | AAA | AAA |
| ![#66e9ec](../../a11y_pygments/assets/66e9ec.png) | `#66e9ec` | 12.4 : 1 | AAA | AAA |
| ![#7998f2](../../a11y_pygments/assets/7998f2.png) | `#7998f2` | 6.5 : 1 | AA | AAA |
| ![#c4a2f5](../../a11y_pygments/assets/c4a2f5.png) | `#c4a2f5` | 8.4 : 1 | AAA | AAA |
| ![#fefeff](../../a11y_pygments/assets/fefeff.png) | `#fefeff` | 17.9 : 1 | AAA | AAA |
@@ -0,0 +1,34 @@
Copyright (c) 2020 Jeff Forcier.
Based on original work copyright (c) 2011 Kenneth Reitz and copyright (c) 2010
Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms of the theme, with or
without modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,30 @@
Extensions allow extending the debugger without modifying the debugger code. This is implemented with explicit namespace
packages.
To implement your own extension:
1. Ensure that the root folder of your extension is in sys.path (add it to PYTHONPATH)
2. Ensure that your module follows the directory structure below
3. The ``__init__.py`` files inside the pydevd_plugin and extension folder must contain the preamble below,
and nothing else.
Preamble:
```python
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
```
4. Your plugin name inside the extensions folder must start with `"pydevd_plugin"`
5. Implement one or more of the abstract base classes defined in `_pydevd_bundle.pydevd_extension_api`. This can be done
by either inheriting from them or registering with the abstract base class.
* Directory structure:
```
|-- root_directory-> must be on python path
| |-- pydevd_plugins
| | |-- __init__.py -> must contain preamble
| | |-- extensions
| | | |-- __init__.py -> must contain preamble
| | | |-- pydevd_plugin_plugin_name.py
```
@@ -0,0 +1,31 @@
BSD 3-Clause License
Copyright (c) 2013-2024, Kim Davies and contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,19 @@
The MIT License (MIT)
----------------------------
Copyright © 2016 Yoshiki Shibukawa
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the “Software”), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,41 @@
=============================
The IPython licensing terms
=============================
IPython is licensed under the terms of the Modified BSD License (also known as
New or Revised or 3-Clause BSD). See the LICENSE file.
About the IPython Development Team
----------------------------------
Fernando Perez began IPython in 2001 based on code from Janko Hauser
<jhauser@zscout.de> and Nathaniel Gray <n8gray@caltech.edu>. Fernando is still
the project lead.
The IPython Development Team is the set of all contributors to the IPython
project. This includes all of the IPython subprojects.
The core team that coordinates development on GitHub can be found here:
https://github.com/ipython/.
Our Copyright Policy
--------------------
IPython uses a shared copyright model. Each contributor maintains copyright
over their contributions to IPython. But, it is important to note that these
contributions are typically only changes to the repositories. Thus, the IPython
source code, in its entirety is not the copyright of any single person or
institution. Instead, it is the collective copyright of the entire IPython
Development Team. If individual contributors want to maintain a record of what
changes/contributions they have specific copyright on, they should indicate
their copyright in the commit message of the change, when they commit the
change to one of the IPython repositories.
With this in mind, the following banner should be used in any source code file
to indicate the copyright and license terms:
::
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
@@ -0,0 +1,11 @@
# Welcome to your Jupyter Book
This is a small sample book to give you a feel for how book content is
structured.
It shows off a few of the major file types, as well as some sample content.
It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.
Check out the content pages bundled with this sample book to see more.
```{tableofcontents}
```
@@ -0,0 +1,53 @@
---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.11.5
kernelspec:
display_name: Python 3
language: python
name: python3
---
# Notebooks with MyST Markdown
Jupyter Book also lets you write text-based notebooks using MyST Markdown.
See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.
This page shows off a notebook written in MyST Markdown.
## An example cell
With MyST Markdown, you can define code cells with a directive like so:
```{code-cell}
print(2 + 2)
```
When your book is built, the contents of any `{code-cell}` blocks will be
executed with your default Jupyter kernel, and their outputs will be displayed
in-line with the rest of your content.
```{seealso}
Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html).
```
## Create a notebook with MyST Markdown
MyST Markdown notebooks are defined by two things:
1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).
See the YAML at the top of this page for example.
2. The presence of `{code-cell}` directives, which will be executed with your book.
That's all that is needed to get started!
## Quickly add YAML metadata for MyST Notebooks
If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command:
```
jupyter-book myst init path/to/markdownfile.md
```
@@ -0,0 +1,55 @@
# Markdown Files
Whether you write your book's content in Jupyter Notebooks (`.ipynb`) or
in regular markdown files (`.md`), you'll write in the same flavor of markdown
called **MyST Markdown**.
This is a simple file to help you get started and show off some syntax.
## What is MyST?
MyST stands for "Markedly Structured Text". It
is a slight variation on a flavor of markdown called "CommonMark" markdown,
with small syntax extensions to allow you to write **roles** and **directives**
in the Sphinx ecosystem.
For more about MyST, see [the MyST Markdown Overview](https://jupyterbook.org/content/myst.html).
## Sample Roles and Directives
Roles and directives are two of the most powerful tools in Jupyter Book. They
are like functions, but written in a markup language. They both
serve a similar purpose, but **roles are written in one line**, whereas
**directives span many lines**. They both accept different kinds of inputs,
and what they do with those inputs depends on the specific role or directive
that is being called.
Here is a "note" directive:
```{note}
Here is a note
```
It will be rendered in a special box when you build your book.
Here is an inline directive to refer to a document: {doc}`markdown-notebooks`.
## Citations
You can also cite references that are stored in a `bibtex` file. For example,
the following syntax: `` {cite}`holdgraf_evidence_2014` `` will render like
this: {cite}`holdgraf_evidence_2014`.
Moreover, you can insert a bibliography into your page with this syntax:
The `{bibliography}` directive must be used for all the `{cite}` roles to
render properly.
For example, if the references for your book are stored in `references.bib`,
then the bibliography is inserted with:
```{bibliography}
```
## Learn more
This is just a simple starter to get you started.
You can learn a lot more at [jupyterbook.org](https://jupyterbook.org).
@@ -0,0 +1,122 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Content with notebooks\n",
"\n",
"You can also create content with Jupyter Notebooks. This means that you can include\n",
"code blocks and their outputs in your book.\n",
"\n",
"## Markdown + notebooks\n",
"\n",
"As it is markdown, you can embed images, HTML, etc into your posts!\n",
"\n",
"![](https://myst-parser.readthedocs.io/en/latest/_static/logo-wide.svg)\n",
"\n",
"You can also $add_{math}$ and\n",
"\n",
"$$\n",
"math^{blocks}\n",
"$$\n",
"\n",
"or\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
"\\mbox{mean} la_{tex} \\\\ \\\\\n",
"math blocks\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"But make sure you \\$Escape \\$your \\$dollar signs \\$you want to keep!\n",
"\n",
"## MyST markdown\n",
"\n",
"MyST markdown works in Jupyter Notebooks as well. For more information about MyST markdown, check\n",
"out [the MyST guide in Jupyter Book](https://jupyterbook.org/content/myst.html),\n",
"or see [the MyST markdown documentation](https://myst-parser.readthedocs.io/en/latest/).\n",
"\n",
"## Code blocks and outputs\n",
"\n",
"Jupyter Book will also embed your code blocks and output in your book.\n",
"For example, here's some sample Matplotlib code:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from matplotlib import rcParams, cycler\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"plt.ion()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Fixing random state for reproducibility\n",
"np.random.seed(19680801)\n",
"\n",
"N = 10\n",
"data = [np.logspace(0, 1, 100) + np.random.randn(100) + ii for ii in range(N)]\n",
"data = np.array(data).T\n",
"cmap = plt.cm.coolwarm\n",
"rcParams['axes.prop_cycle'] = cycler(color=cmap(np.linspace(0, 1, N)))\n",
"\n",
"\n",
"from matplotlib.lines import Line2D\n",
"custom_lines = [Line2D([0], [0], color=cmap(0.), lw=4),\n",
" Line2D([0], [0], color=cmap(.5), lw=4),\n",
" Line2D([0], [0], color=cmap(1.), lw=4)]\n",
"\n",
"fig, ax = plt.subplots(figsize=(10, 5))\n",
"lines = ax.plot(data)\n",
"ax.legend(custom_lines, ['Cold', 'Medium', 'Hot']);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is a lot more that you can do with outputs (such as including interactive outputs)\n",
"with your book. For more information about this, see [the Jupyter Book documentation](https://jupyterbook.org)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.0"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}
@@ -0,0 +1,26 @@
Main authors:
* David Eppstein
- wrote the original LaTeX codec as a recipe on ActiveState
http://code.activestate.com/recipes/252124-latex-codec/
* Peter Tröger
- wrote the original latexcodec package, which contained a simple
but very effective LaTeX encoder
* Matthias Troffaes (matthias.troffaes@gmail.com)
- wrote the lexer
- integrated codec with the lexer for a simpler and more robust
design
- various bugfixes
Contributors:
* Michael Radziej
* Philipp Spitzer
@@ -0,0 +1,23 @@
| latexcodec is a lexer and codec to work with LaTeX code in Python
| Copyright (c) 2011-2020 by Matthias C. M. Troffaes
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,95 @@
# markdown-it-container
[![Build Status](https://img.shields.io/travis/markdown-it/markdown-it-container/master.svg?style=flat)](https://travis-ci.org/markdown-it/markdown-it-container)
[![NPM version](https://img.shields.io/npm/v/markdown-it-container.svg?style=flat)](https://www.npmjs.org/package/markdown-it-container)
[![Coverage Status](https://img.shields.io/coveralls/markdown-it/markdown-it-container/master.svg?style=flat)](https://coveralls.io/r/markdown-it/markdown-it-container?branch=master)
> Plugin for creating block-level custom containers for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
__v2.+ requires `markdown-it` v5.+, see changelog.__
With this plugin you can create block containers like:
```
::: warning
*here be dragons*
:::
```
.... and specify how they should be rendered. If no renderer defined, `<div>` with
container name class will be created:
```html
<div class="warning">
<em>here be dragons</em>
</div>
```
Markup is the same as for [fenced code blocks](http://spec.commonmark.org/0.18/#fenced-code-blocks).
Difference is, that marker use another character and content is rendered as markdown markup.
## Installation
node.js, browser:
```bash
$ npm install markdown-it-container --save
$ bower install markdown-it-container --save
```
## API
```js
var md = require('markdown-it')()
.use(require('markdown-it-container'), name [, options]);
```
Params:
- __name__ - container name (mandatory)
- __options:__
- __validate__ - optional, function to validate tail after opening marker, should
return `true` on success.
- __render__ - optional, renderer function for opening/closing tokens.
- __marker__ - optional (`:`), character to use in delimiter.
## Example
```js
var md = require('markdown-it')();
md.use(require('markdown-it-container'), 'spoiler', {
validate: function(params) {
return params.trim().match(/^spoiler\s+(.*)$/);
},
render: function (tokens, idx) {
var m = tokens[idx].info.trim().match(/^spoiler\s+(.*)$/);
if (tokens[idx].nesting === 1) {
// opening tag
return '<details><summary>' + md.utils.escapeHtml(m[1]) + '</summary>\n';
} else {
// closing tag
return '</details>\n';
}
}
});
console.log(md.render('::: spoiler click me\n*content*\n:::\n'));
// Output:
//
// <details><summary>click me</summary>
// <p><em>content</em></p>
// </details>
```
## License
[MIT](https://github.com/markdown-it/markdown-it-container/blob/master/LICENSE)
@@ -0,0 +1,38 @@
# markdown-it-deflist
[![Build Status](https://img.shields.io/travis/markdown-it/markdown-it-deflist/master.svg?style=flat)](https://travis-ci.org/markdown-it/markdown-it-deflist)
[![NPM version](https://img.shields.io/npm/v/markdown-it-deflist.svg?style=flat)](https://www.npmjs.org/package/markdown-it-deflist)
[![Coverage Status](https://img.shields.io/coveralls/markdown-it/markdown-it-deflist/master.svg?style=flat)](https://coveralls.io/r/markdown-it/markdown-it-deflist?branch=master)
> Definition list (`<dl>`) tag plugin for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
__v2.+ requires `markdown-it` v5.+, see changelog.__
Syntax is based on [pandoc definition lists](http://johnmacfarlane.net/pandoc/README.html#definition-lists).
## Install
node.js, browser:
```bash
npm install markdown-it-deflist --save
bower install markdown-it-deflist --save
```
## Use
```js
var md = require('markdown-it')()
.use(require('markdown-it-deflist'));
md.render(/*...*/);
```
_Differences in browser._ If you load script directly into the page, without
package system, module will add itself globally as `window.markdownitDeflist`.
## License
[MIT](https://github.com/markdown-it/markdown-it-deflist/blob/master/LICENSE)
@@ -0,0 +1,137 @@
[![License](https://img.shields.io/github/license/goessner/markdown-it-texmath.svg)](https://github.com/goessner/markdown-it-texmath/blob/master/licence.txt)
[![npm](https://img.shields.io/npm/v/markdown-it-texmath.svg)](https://www.npmjs.com/package/markdown-it-texmath)
[![npm](https://img.shields.io/npm/dt/markdown-it-texmath.svg)](https://www.npmjs.com/package/markdown-it-texmath)
# markdown-it-texmath
Add TeX math equations to your Markdown documents rendered by [markdown-it](https://github.com/markdown-it/markdown-it) parser. [KaTeX](https://github.com/Khan/KaTeX) is used as a fast math renderer.
## Features
Simplify the process of authoring markdown documents containing math formulas.
This extension is a comfortable tool for scientists, engineers and students with markdown as their first choice document format.
* Macro support
* Simple formula numbering
* Inline math with tables, lists and blockquote.
* User setting delimiters:
* `'dollars'` (default)
* inline: `$...$`
* display: `$$...$$`
* display + equation number: `$$...$$ (1)`
* `'brackets'`
* inline: `\(...\)`
* display: `\[...\]`
* display + equation number: `\[...\] (1)`
* `'gitlab'`
* inline: ``$`...`$``
* display: `` ```math ... ``` ``
* display + equation number: `` ```math ... ``` (1)``
* `'julia'`
* inline: `$...$` or ``` ``...`` ```
* display: `` ```math ... ``` ``
* display + equation number: `` ```math ... ``` (1)``
* `'kramdown'`
* inline: ``$$...$$``
* display: `$$...$$`
* display + equation number: `$$...$$ (1)`
## Show me
View a [test table](https://goessner.github.io/markdown-it-texmath/index.html).
[try it out ...](https://goessner.github.io/markdown-it-texmath/markdown-it-texmath-demo.html)
## Use with `node.js`
Install the extension. Verify having `markdown-it` and `katex` already installed .
```
npm install markdown-it-texmath
```
Use it with JavaScript.
```js
let kt = require('katex'),
tm = require('markdown-it-texmath').use(kt),
md = require('markdown-it')().use(tm,{delimiters:'dollars',macros:{"\\RR": "\\mathbb{R}"}});
md.render('Euler\'s identity \(e^{i\pi}+1=0\) is a beautiful formula in $\\RR 2$.')
```
## Use in Browser
```html
<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="katex.min.css">
<link rel="stylesheet" href="texmath.css">
<script src="markdown-it.min.js"></script>
<script src="katex.min.js"></script>
<script src="texmath.js"></script>
</head>
<body>
<div id="out"></div>
<script>
let md;
document.addEventListener("DOMContentLoaded", () => {
const tm = texmath.use(katex);
md = markdownit().use(tm,{delimiters:'dollars',macros:{"\\RR": "\\mathbb{R}"}});
out.innerHTML = md.render('Euler\'s identity $e^{i\pi}+1=0$ is a beautiful formula in //RR 2.');
})
</script>
</body>
</html>
```
## CDN
Use following links for `texmath.js` and `texmath.css`
* `https://gitcdn.xyz/cdn/goessner/markdown-it-texmath/master/texmath.js`
* `https://gitcdn.xyz/cdn/goessner/markdown-it-texmath/master/texmath.css`
## Dependencies
* [`markdown-it`](https://github.com/markdown-it/markdown-it): Markdown parser done right. Fast and easy to extend.
* [`katex`](https://github.com/Khan/KaTeX): This is where credits for fast rendering TeX math in HTML go to.
## ToDo
nothing yet
## FAQ
* __`markdown-it-texmath` with React Native does not work, why ?__
* `markdown-it-texmath` is using regular expressions with `y` [(sticky) property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) and cannot avoid this. The use of the `y` flag in regular expressions means the plugin is not compatible with React Native (which as of now doesn't support it and throws an error `Invalid flags supplied to RegExp constructor`).
## CHANGELOG
### [0.6.0] on October 04, 2019
* Add support for [Julia Markdown](https://docs.julialang.org/en/v1/stdlib/Markdown/) on [request](https://github.com/goessner/markdown-it-texmath/issues/15).
### [0.5.5] on February 07, 2019
* Remove [rendering bug with brackets delimiters](https://github.com/goessner/markdown-it-texmath/issues/9).
### [0.5.4] on January 20, 2019
* Remove pathological [bug within blockquotes](https://github.com/goessner/mdmath/issues/50).
### [0.5.3] on November 11, 2018
* Add support for Tex macros (https://katex.org/docs/supported.html#macros) .
* Bug with [brackets delimiters](https://github.com/goessner/markdown-it-texmath/issues/9) .
### [0.5.2] on September 07, 2018
* Add support for [Kramdown](https://kramdown.gettalong.org/) .
### [0.5.0] on August 15, 2018
* Fatal blockquote bug investigated. Implemented workaround to vscode bug, which has finally gone with vscode 1.26.0 .
### [0.4.6] on January 05, 2018
* Escaped underscore bug removed.
### [0.4.5] on November 06, 2017
* Backslash bug removed.
### [0.4.4] on September 27, 2017
* Modifying the `block` mode regular expression with `gitlab` delimiters, so removing the `newline` bug.
## License
`markdown-it-texmath` is licensed under the [MIT License](./license.txt)
© [Stefan Gössner](https://github.com/goessner)
@@ -0,0 +1,31 @@
BSD 3-Clause License
Copyright (c) 2013-2024, Kim Davies and contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,11 @@
Authors
=======
Creator
-------
Jonathan Slenders <jonathan AT slenders.be>
Contributors
------------
- Amjith Ramanujam <amjith.r AT gmail.com>
@@ -0,0 +1,23 @@
| pybtex-docutils is a docutils backend for pybtex
| Copyright (c) 2013-2021 by Matthias C. M. Troffaes
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
BSD 3-Clause License
Copyright (c) 2009-2012, Brian Granger, Min Ragan-Kelley
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 - 2025 Isaac Muse <isaacmuse@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,67 @@
License for Sphinx
==================
Unless otherwise indicated, all code in the Sphinx project is licenced under the
two clause BSD licence below.
Copyright (c) 2007-2024 by the Sphinx team (see AUTHORS file).
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Licenses for incorporated software
==================================
The included implementation of NumpyDocstring._parse_numpydoc_see_also_section
was derived from code under the following license:
-------------------------------------------------------------------------------
Copyright (C) 2008 Stefan van der Walt <stefan@mentat.za.net>, Pauli Virtanen <pav@iki.fi>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------------------
@@ -0,0 +1,53 @@
# Translation workflow
This folder contains code and translations for supporting multiple languages with Sphinx.
See [the Sphinx internationalization documentation](https://www.sphinx-doc.org/en/master/usage/configuration.html) for more details.
## Structure of translation files
### Translation source files
The source files for our translations are hand-edited, and contain the raw mapping of words onto various languages.
They are checked in to `git` history with this repository.
`src/sphinx_book_theme/assets/translations/jsons` contains a collection of JSON files that define the translation for various phrases in this repository.
Each file is a different phrase, and its contents define language codes and translated phrases for each language we support.
They were originally created with [the smodin.io language translator](https://smodin.me/translate-one-text-into-multiple-languages) (see below for how to update them).
### Compiled translation files
The translation source files are compiled at build time (when we run `stb compile`) automatically.
This is executed by the Python script at `python src/sphinx_book_theme/_compile_translations.py` (more information on that below).
These compiled files are **not checked into `.git` history**, but they **are** bundled with the theme when it is distributed in a package.
Here's a brief explanation of each:
- `src/sphinx_book_theme/theme/sphinx_book_theme/static/locales` contains Sphinx locale files that were auto-converted from the files in `jsons/` by the helper script below.
- `src/sphinx_book_theme/_compile_translations.py` is a helper script to auto-generate Sphinx locale files from the JSONs in `jsons/`.
## Workflow of translations
Here's a short workflow of how to add a new translation, assuming that you are translating using the [smodin.io service](https://smodin.io/translate-one-text-into-multiple-languages).
1. Go to [the smodin.io service](https://smodin.io/translate-one-text-into-multiple-languages)
2. Select as many languages as you like.
3. Type in the phrase you'd like to translate.
4. Click `TRANSLATE` and then `Download JSON`.
5. This will download a JSON file with a bunch of `language-code: translated-phrase` mappings.
6. Put this JSON in the `jsons/` folder, and rename it to be the phrase you've translated in English.
So if the original phrase is `My phrase`, you should name the file `My phrase.json`.
7. Run [the `prettier` formatter](https://prettier.io/) on this JSON to split it into multiple lines (this makes it easier to read and edit if translations should be updated)
```bash
prettier sphinx_book_theme/translations/jsons/<message name>.json
```
8. Run `python src/sphinx_book_theme/_compile_translations.py`
9. This will generate the locale files (`.mo`) that Sphinx uses in its translation machinery, and put them in `locales/<language-code>/LC_MESSAGES/<msg>.mo`.
Sphinx should now know how to translate this message!
## To update a translation
To update a translation, you may go to the phase you'd like to modify in `jsons/`, then find the entry for the language you'd like to update, and change its value.
Finally, run `python src/sphinx_book_theme/_compile_translations.py` and this will update the `.mo` files.
@@ -0,0 +1,26 @@
| sphinxcontrib-bibtex is a Sphinx extension for BibTeX style citations
| Copyright (c) 2011-2024 by Matthias C. M. Troffaes
| All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1 @@
PyZMQ's CFFI support is designed only for (Unix) systems conforming to `have_sys_un_h = True`.
@@ -245,9 +245,13 @@
"id": "831db06c",
"metadata": {},
"source": [
"**a)** Show that you can rewrite this in terms of a term which contains the variance of the model itself (the so-called variance term), a\n",
"term which measures the deviation from the true data and the mean value of the model (the bias term) and finally the variance of the noise Note that in order to be able to evaluate the bias them, you will need to approximate the function $f$ with the model ${\\bf y}$.\n",
"show that\n"
"**a)** Show that you can rewrite this into an expression which contains\n",
"\n",
"- the variance of the model (the variance term)\n",
"- the expected deviation of the mean of the model from the true data (the bias term)\n",
"- the variance of the noise\n",
"\n",
"In other words, show that:\n"
]
},
{
@@ -403,6 +407,8 @@
"# X = ...\n",
"# X_train, X_test, y_train, y_test = ...\n",
"#\n",
"# #this is where you fit your model on the sampled data\n",
"#\n",
"# predictions[b, :] =\n",
"# targets[b, :] =\n",
"#\n",
@@ -418,7 +424,7 @@
"source": [
"**e)** Discuss the bias-variance trade-off as function of your model complexity (the degree of the polynomial).\n",
"\n",
"**f)** Compute and discuss the bias and variance as function of the number of data points (choose a suitable polynomial degree to show something interesiting).\n"
"**f)** Compute and discuss the bias and variance as function of the number of data points (choose a suitable polynomial degree to show something interesting).\n"
]
},
{
@@ -56,7 +56,7 @@
"source": [
"We require all projects to be formatted as proper scientific reports, and this includes using LaTeX for typesetting. We strongly recommend that you use the online LaTeX editor Overleaf, as it is much easier to start using, and has excellent support for collaboration.\n",
"\n",
"**a)** Create an account on Overleaf.com\n",
"**a)** Create an account on Overleaf.com, or log in using SSO with your UiO email.\n",
"\n",
"**b)** Download [this](https://github.com/CompPhysics/MachineLearning/blob/master/doc/LectureNotes/data/FYS_STK_Template.zip) template project.\n",
"\n",
@@ -67,18 +67,6 @@
"**e)** Look at the provided example of an earlier project, found at <https://github.com/CompPhysics/MachineLearning/blob/master/doc/Projects/ReportExample/ReportExampleDanielBH.pdf>\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "338b2ee1",
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "ec36f4c3",
@@ -130,7 +118,7 @@
"id": "2f512b59",
"metadata": {},
"source": [
"## Exercise 4: Making the code avaliable and presentable\n"
"## Exercise 4: Making the code available and presentable\n"
]
},
{