From 47f81f0da57fb36214d2db19e425f9d73309e10a Mon Sep 17 00:00:00 2001 From: Pg Biel <9021226+PgBiel@users.noreply.github.com> Date: Tue, 30 May 2023 05:46:39 -0300 Subject: Custom outline indenting (#1157) --- tests/ref/meta/outline-indent.png | Bin 0 -> 309889 bytes tests/typ/meta/outline-indent.typ | 60 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 tests/ref/meta/outline-indent.png create mode 100644 tests/typ/meta/outline-indent.typ (limited to 'tests') diff --git a/tests/ref/meta/outline-indent.png b/tests/ref/meta/outline-indent.png new file mode 100644 index 00000000..816d86a5 Binary files /dev/null and b/tests/ref/meta/outline-indent.png differ 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 -- cgit v1.2.3