Skip to content

Commit 4b569ea

Browse files
committed
test: check unnumbered proofs and titles with Typst markup
1 parent 7480f31 commit 4b569ea

3 files changed

Lines changed: 76 additions & 3 deletions

File tree

‎tests/docs/smoke-all/2026/02/04/issue-13992-proof.qmd‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ _quarto:
1313
- []
1414
- ['Proof content visible']
1515
typst:
16-
noErrors: default
1716
ensureTypstFileRegexMatches:
1817
- ['#proof\(']
1918
- []
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "Theorem and proof titles that hold Typst markup"
3+
format: typst
4+
language:
5+
crossref-thm-title: "Thm #y [*x*]"
6+
environment-proof-title: "Pf #y [*x*] \"q\""
7+
_quarto:
8+
tests:
9+
typst:
10+
ensurePdfRegexMatches:
11+
-
12+
- 'Thm #y \[\*x\*\] 1\. A theorem'
13+
- 'Pf #y \[\*x\*\] "q"\. An unnumbered proof'
14+
- []
15+
---
16+
17+
Theorem and proof titles come from the language files, so an author can put
18+
any text in them. The titles are written into the Typst frame definitions and
19+
the unnumbered proof prefix, and must reach the page as written instead of
20+
being read as Typst markup.
21+
22+
::: {#thm-a}
23+
24+
A theorem.
25+
26+
:::
27+
28+
::: {.proof}
29+
30+
An unnumbered proof.
31+
32+
:::

‎tests/docs/smoke-all/2026/04/04/issue-14290.qmd‎

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ keep-typ: true
44
_quarto:
55
tests:
66
typst:
7-
noErrors: default
87
ensureTypstFileRegexMatches:
98
-
109
- '#remark\('
@@ -15,9 +14,38 @@ _quarto:
1514
- '#show: show-solution'
1615
- '#ref\(<rem-example>'
1716
- '#ref\(<sol-exercise>'
17+
# unnumbered blocks pin their number and keep the counter still
18+
- '#remark\(number: "", get-prefix: '
19+
- '#proof\(number: "", get-prefix: '
20+
# a numbered proof keeps theorion's own number
21+
- '#proof\(\)\[(\r\n?|\n)Numbered proof\.'
1822
- []
23+
ensurePdfRegexMatches:
24+
-
25+
- 'Remark\. An unnumbered remark'
26+
- 'Remark 1 \(A Remark\)'
27+
- 'Solution 1 \(A Solution\)'
28+
- 'Proof\. This is an unnumbered proof'
29+
- 'Proof 1\. Numbered proof'
30+
- 'Proof \(With code\)\. A named proof'
31+
- 'See Remark 1, Solution 1 and Proof 1'
32+
-
33+
- 'Remark 2'
34+
- 'Proof 2'
35+
- 'Proof \.'
1936
---
2037

38+
An unnumbered `proof`, `remark` or `solution` block uses the same theorion
39+
frame, and so the same counter, as the numbered block of that kind. It must
40+
show no number and must not move the counter, so that `rem-example` is still
41+
Remark 1 although an unnumbered remark comes before it.
42+
43+
::: {.remark}
44+
45+
An unnumbered remark.
46+
47+
:::
48+
2149
::: {#rem-example}
2250

2351
## A Remark
@@ -40,4 +68,18 @@ This is an unnumbered proof.
4068

4169
:::
4270

43-
See @rem-example and @sol-exercise.
71+
::: {#prf-a}
72+
73+
Numbered proof.
74+
75+
:::
76+
77+
::: {.proof}
78+
79+
## With `code`
80+
81+
A named proof.
82+
83+
:::
84+
85+
See @rem-example, @sol-exercise and @prf-a.

0 commit comments

Comments
 (0)