File tree 3 files changed +58
-2
lines changed
src/resources/filters/customnodes
tests/docs/smoke-all/crossrefs/theorem
3 files changed +58
-2
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,7 @@ All changes included in 1.8:
12
12
13
13
- ([ #12551 ] ( https://github.com/quarto-dev/quarto-cli/pull/12551 ) ): Improve warning issued when ` aliases ` would overwrite an existing document.
14
14
- ([ #12616 ] ( https://github.com/quarto-dev/quarto-cli/issues/12616 ) ): find SVG images in image discovery for listings.
15
+
16
+ ## Crossrefs
17
+
18
+ - ([ #12615 ] ( https://github.com/quarto-dev/quarto-cli/pull/12615 ) ): Adds ` algorithm ` to theorem environments. (author: @jeremy9959 )
Original file line number Diff line number Diff line change @@ -40,11 +40,16 @@ theorem_types = {
40
40
style = " definition" ,
41
41
title = " Example" ,
42
42
},
43
- exr = {
43
+ exr = {
44
44
env = " exercise" ,
45
45
style = " definition" ,
46
46
title = " Exercise"
47
- }
47
+ },
48
+ alg = {
49
+ env = " algorithm" ,
50
+ style = " plain" ,
51
+ title = " Algorithm"
52
+ },
48
53
}
49
54
50
55
function 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