summaryrefslogtreecommitdiff
path: root/tests/typ/meta/heading.typ
diff options
context:
space:
mode:
authortingerrr <me@tinger.dev>2024-02-29 09:51:56 +0100
committerGitHub <noreply@github.com>2024-02-29 08:51:56 +0000
commit5a03c818c8b595c9bb62613c8da6d7464ccff05c (patch)
tree21cd4d3664dac88f43350b14ceb227b716f295ec /tests/typ/meta/heading.typ
parentedf957399c59332f1472321e72106d31fc9f610b (diff)
Add `depth` and `offset` field to `heading` (#3038)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests/typ/meta/heading.typ')
-rw-r--r--tests/typ/meta/heading.typ20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/typ/meta/heading.typ b/tests/typ/meta/heading.typ
index 7db2a5cf..a253913e 100644
--- a/tests/typ/meta/heading.typ
+++ b/tests/typ/meta/heading.typ
@@ -46,6 +46,26 @@ multiline.
#heading(level: 5)[Heading]
---
+// Test setting the starting offset.
+#set heading(numbering: "1.1")
+#show heading.where(level: 2): set text(blue)
+= Level 1
+
+#heading(depth: 1)[We're twins]
+#heading(level: 1)[We're twins]
+
+== Real level 2
+
+#set heading(offset: 1)
+= Fake level 2
+== Fake level 3
+
+---
+// Passing level directly still overrides all other set values
+#set heading(numbering: "1.1", offset: 1)
+#heading(level: 1)[Still level 1]
+
+---
// Edge cases.
#set heading(numbering: "1.")
=