-
Notifications
You must be signed in to change notification settings - Fork 433
Expand file tree
/
Copy pathalgorithm.qmd
More file actions
47 lines (41 loc) · 981 Bytes
/
algorithm.qmd
File metadata and controls
47 lines (41 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
format:
typst:
keep-typ: true
_quarto:
tests:
html:
ensureHtmlElements:
-
- "a.quarto-xref"
- []
latex:
ensureFileRegexMatches:
-
- "hypertarget{alg-gcd}"
- "label{alg-gcd}"
- "Alg.~\\\\ref\\{alg-gcd\\}"
- "alg.~\\\\ref\\{alg-gcd\\}"
- []
typst:
ensureTypstFileRegexMatches:
-
- "#ref\\(<alg-gcd>, supplement: \\[alg.\\]\\)"
- "#ref\\(<alg-gcd>, supplement: \\[Alg.\\]\\)"
- "#algorithm\\(title: \\[Euclid\\]\\)"
- []
markdown:
ensureFileRegexMatches:
-
- "\\[alg. 1\\]\\(#alg-gcd\\)\\{.quarto-xref\\}" # note the non-breaking space in "alg. 1"
- '\[\*\*Algorithm 1 \(Euclid\)\*\*\]\{.theorem-title\}'
---
::: {#alg-gcd}
## Euclid
```
gcd(a, b) =
if b == 0 then return a
return gcd(b, a mod b)
```
:::
See @alg-gcd. @Alg-gcd has been known since the antiquity.