Skip to content

Commit 17fe44b

Browse files
committed
Adjusting docs
1 parent f7e5c86 commit 17fe44b

File tree

4 files changed

+42
-15
lines changed

4 files changed

+42
-15
lines changed

docs/javascripts/mathjax.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
window.MathJax = {
2+
tex: {
3+
inlineMath: [["\\(", "\\)"]],
4+
displayMath: [["\\[", "\\]"]],
5+
processEscapes: true,
6+
processEnvironments: true
7+
},
8+
options: {
9+
ignoreHtmlClass: ".*|",
10+
processHtmlClass: "arithmatex"
11+
}
12+
};
13+
14+
document$.subscribe(() => {
15+
MathJax.typesetPromise()
16+
})

docs/snippets/alice-header.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
![Alice](../img/Alice_Adventures-top-right-light.png#only-light){ .alice align=right .off-glb }
2+
![Alice](../img/Alice_Adventures-top-right-dark.png#only-dark){ .alice align=right .off-glb }

docs/test.md

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
---
22
hide:
33
- footer
4+
tags:
5+
- Ada
6+
- Example
7+
- Bash
48
---
59

6-
![Alice](img/Alice_Adventures-top-right-light.png#only-light){ .alice align=right .off-glb }
7-
![Alice](img/Alice_Adventures-top-right-dark.png#only-dark){ .alice align=right .off-glb }
10+
--8<-- "docs/snippets/alice-header.md"
811

912
# MKDOCS & MATERIAL <br>THEME TEST
13+
*Adventures for Learning and Inspiring Coding Excellence*
1014

11-
## Character
15+
This file contains tests for `mkdocs` and `material` theme, with particular
16+
instructions to manage images and publications with versions.
17+
18+
## Formatting
1219

1320
### Basic Markdown
1421

1522
Text in __bold__ and _italic_.
1623

1724

18-
``` markdown
25+
```md title="character"
1926
Text in __bold__ and _italic_.
2027
```
2128

@@ -36,7 +43,7 @@ paragraphs.
3643

3744
Using the [keys] extension one ca write keyboard commands:
3845

39-
```
46+
```md title="keys"
4047
Press ++ctrl+alt+"C"++ to exit.
4148
```
4249

@@ -51,7 +58,7 @@ $$
5158
\sigma^2 = \frac{1}{N-1} \sum_{i=1}^{N} (x_i - \bar{X})^2
5259
$$
5360

54-
```
61+
```md title="mathjax"
5562
One can write maths like for $X = \{x_1, x_2, \ldots x_N\}$ with
5663
$\bar{X} = 1/N \sum_{1}^{N}x_i$, variance is defined by
5764

@@ -62,7 +69,7 @@ $$
6269

6370
### Footnotes
6471

65-
``` title="Footnote"
72+
```md title="footnote"
6673
[^1]: Lorem Ipsum dolor sit amet, consectetur adipiscing elit.
6774
```
6875

@@ -149,15 +156,15 @@ And now jump to [Figure 1](#Figure-1)
149156
#### Basic block
150157

151158

152-
```ada
159+
```ada title="package"
153160
package Hello_World is
154161
procedure Say_Hello;
155162
end Hello_World;
156163
```
157164

158165
#### Code with line numbers
159166

160-
```ada linenums="1"
167+
```ada linenums="1" title="with lines"
161168
package Hello_World is
162169
procedure Say_Hello;
163170
end Hello_World;
@@ -185,19 +192,19 @@ And now jump to [Figure 1](#Figure-1)
185192

186193
```ada linenums="1" title="Nice example" hl_lines="1 2"
187194
package Hello_World is
188-
procedure Say_Hello; -- (1)!
189-
end Hello_World;
195+
procedure Say_Hello;
196+
end Hello_World; -- (1)!
190197
```
191198

192-
1. This is the classic procedure to write `Text_IO.Put_Line ("Hello, world");`
199+
1. This line defines the end of the `Hello_World` package.
193200

194201
#### Code including an external file
195202

196203
!!! Note inline end
197204
Note that line 14 (highlighted) clearly shows _font ligatures_ enabled.
198205

199206
```js linenums="1" title="Javascript to enable MathJax" hl_lines="14"
200-
--8<-- "javascripts/mathjax.js"
207+
--8<-- "docs/javascripts/mathjax.js"
201208
```
202209

203210

mkdocs.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ theme:
4747
- navigation.path
4848
# - navigation.sections
4949
- navigation.tabs
50+
- navigation.top
5051
- navigation.tracking
5152
- search.highlight
5253
- toc.integrate
@@ -85,8 +86,8 @@ markdown_extensions:
8586
- pymdownx.inlinehilite
8687
- pymdownx.mark
8788
- pymdownx.snippets:
88-
base_path:
89-
- snippets
89+
# base_path:
90+
# - docs/snippets
9091
- pymdownx.superfences
9192
- pymdownx.tabbed:
9293
alternate_style: true
@@ -137,6 +138,7 @@ nav:
137138
- HOME:
138139
- Home: index.md
139140
- About: about.md
141+
- Test: test.md
140142
- "&nbsp;For Participants&nbsp;":
141143
- participant/index.md
142144
- Project Euler: participant/Project_Euler.md

0 commit comments

Comments
 (0)