summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorPg Biel <9021226+PgBiel@users.noreply.github.com>2023-05-30 05:46:39 -0300
committerGitHub <noreply@github.com>2023-05-30 10:46:39 +0200
commit47f81f0da57fb36214d2db19e425f9d73309e10a (patch)
tree528a4ecd1b4106975fe5b8f42151bf512147086c /tests/typ
parent644bbf99145042266ea8cf2890cef5771bd04be4 (diff)
Custom outline indenting (#1157)
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/meta/outline-indent.typ60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/typ/meta/outline-indent.typ b/tests/typ/meta/outline-indent.typ
new file mode 100644
index 00000000..a4ef6c81
--- /dev/null
+++ b/tests/typ/meta/outline-indent.typ
@@ -0,0 +1,60 @@
+// Tests outline 'indent' option.
+
+---
+// With heading numbering
+#set page(width: 200pt)
+#set heading(numbering: "1.a.")
+#outline()
+#outline(indent: false)
+#outline(indent: true)
+#outline(indent: none)
+#outline(indent: auto)
+#outline(indent: 2em)
+#outline(indent: n => ([-], [], [==], [====]).at(n))
+#outline(indent: n => "!" * calc.pow(2, n))
+
+= About ACME Corp.
+
+== History
+#lorem(10)
+
+== Products
+#lorem(10)
+
+=== Categories
+#lorem(10)
+
+==== General
+#lorem(10)
+
+---
+// Without heading numbering
+#set page(width: 200pt)
+#outline()
+#outline(indent: false)
+#outline(indent: true)
+#outline(indent: none)
+#outline(indent: auto)
+#outline(indent: 2em)
+#outline(indent: n => ([-], [], [==], [====]).at(n))
+#outline(indent: n => "!" * calc.pow(2, n))
+
+= About ACME Corp.
+
+== History
+#lorem(10)
+
+== Products
+#lorem(10)
+
+=== Categories
+#lorem(10)
+
+==== General
+#lorem(10)
+
+---
+// Error: 2-35 indent function must return content
+#outline(indent: n => (a: "dict"))
+
+= Heading