Skip to content

Commit c00ce42

Browse files
committed
Better tests for always-first in outline/figures captions/headings
1 parent ee86095 commit c00ce42

File tree

6 files changed

+86
-77
lines changed

6 files changed

+86
-77
lines changed

tests/with-outline/.gitignore renamed to tests/outline-figure-caption-heading-always-first/.gitignore

File renamed without changes.
56 KB
Loading

tests/with-outline/ref/2.png renamed to tests/outline-figure-caption-heading-always-first/ref/2.png

File renamed without changes.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#import "../../themes/default.typ": *
2+
3+
#let entry-list(n) = (
4+
(
5+
key: str((n - 1) * 3 + 1),
6+
long: lorem((n - 1) * 3 + 1).slice(0, -1).replace(" ", ""),
7+
),
8+
(
9+
key: str((n - 1) * 3 + 2),
10+
long: lorem((n - 1) * 3 + 2).slice(0, -1).replace(" ", ""),
11+
),
12+
(
13+
key: str((n - 1) * 3 + 3),
14+
long: lorem((n - 1) * 3 + 3).slice(0, -1).replace(" ", ""),
15+
),
16+
)
17+
18+
#set page(paper: "a5")
19+
#register-glossary(entry-list(1) + entry-list(2) + entry-list(3))
20+
21+
== Test: outline-always-first
22+
23+
#{
24+
show: make-glossary.with(
25+
outline-always-first: true,
26+
)
27+
28+
outline(target: figure, title: "Figures")
29+
figure([`outline-always-first: true`], caption: [@1])
30+
}
31+
32+
#{
33+
show: make-glossary.with(
34+
outline-always-first: false,
35+
)
36+
37+
outline(target: figure, title: "Figures")
38+
figure([`outline-always-first: false`], caption: [@2])
39+
}
40+
41+
== Test: figure-caption-always-first
42+
43+
#{
44+
show: make-glossary.with(
45+
figure-caption-always-first: true,
46+
)
47+
48+
figure([`figure-caption-always-first: true`], caption: [@3])
49+
}
50+
51+
#{
52+
show: make-glossary.with(
53+
figure-caption-always-first: false,
54+
)
55+
56+
figure([`figure-caption-always-first: false`], caption: [@4])
57+
}
58+
59+
== Test: heading-always-first
60+
61+
#{
62+
show: make-glossary.with(
63+
heading-always-first: true,
64+
)
65+
66+
[=== `heading-always-first: true` @5]
67+
}
68+
69+
#{
70+
show: make-glossary.with(
71+
heading-always-first: false,
72+
)
73+
74+
[=== `heading-always-first: false` @6]
75+
}
76+
77+
#pagebreak()
78+
= Glossary
79+
80+
#show: make-glossary
81+
#print-glossary(
82+
(entry-list(1) + entry-list(2) + entry-list(3)),
83+
show-all: true,
84+
disable-back-references: true,
85+
)
86+

tests/with-outline/ref/1.png

-55.5 KB
Binary file not shown.

tests/with-outline/test.typ

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)