File tree Expand file tree Collapse file tree 2 files changed +54
-2
lines changed
src/resources/filters/customnodes
tests/docs/smoke-all/crossrefs/theorem Expand file tree Collapse file tree 2 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,16 @@ theorem_types = {
4040 style = " definition" ,
4141 title = " Example" ,
4242 },
43- exr = {
43+ exr = {
4444 env = " exercise" ,
4545 style = " definition" ,
4646 title = " Exercise"
47- }
47+ },
48+ alg = {
49+ env = " algorithm" ,
50+ style = " plain" ,
51+ title = " Algorithm"
52+ },
4853}
4954
5055function has_theorem_ref (el )
Original file line number Diff line number Diff line change 1+ ---
2+ format :
3+ typst :
4+ keep-typ : true
5+ _quarto :
6+ tests :
7+ html :
8+ ensureHtmlElements :
9+ -
10+ - " a.quarto-xref"
11+ - []
12+ latex :
13+ ensureFileRegexMatches :
14+ -
15+ - " hypertarget{alg-gcd}"
16+ - " label{alg-gcd}"
17+ - " Alg.~\\\\ ref\\ {alg-gcd\\ }"
18+ - " alg.~\\\\ ref\\ {alg-gcd\\ }"
19+ - []
20+ typst :
21+ ensureTypstFileRegexMatches :
22+ -
23+ - " #ref\\ (<alg-gcd>, supplement: \\ [alg.\\ ]\\ )"
24+ - " #ref\\ (<alg-gcd>, supplement: \\ [Alg.\\ ]\\ )"
25+ - " #algorithm\\ (\" Euclid\"\\ )"
26+ - []
27+ markdown :
28+ ensureFileRegexMatches :
29+ -
30+ - " \\ [alg. 1\\ ]\\ (#alg-gcd\\ )\\ {.quarto-xref\\ }" # note the non-breaking space in "alg. 1"
31+ - ' \[\*\*Algorithm 1 \(Euclid\)\*\*\]\{.theorem-title\}'
32+ ---
33+
34+ ::: {#alg-gcd}
35+
36+ ## Euclid
37+
38+ ```
39+ gcd(a, b) =
40+ if b == 0 then return a
41+ return gcd(b, a mod b)
42+ ```
43+
44+ :::
45+
46+
47+ See @alg-gcd . @Alg-gcd has been known since the antiquity.
You can’t perform that action at this time.
0 commit comments