summaryrefslogtreecommitdiff
path: root/tests/suite/model/quote.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-04-13 10:39:45 +0200
committerGitHub <noreply@github.com>2024-04-13 08:39:45 +0000
commit020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch)
treec0027ad22046e2726c22298461327823d6b88d53 /tests/suite/model/quote.typ
parent72dd79210602ecc799726fc096b078afbb47f299 (diff)
Better test runner (#3922)
Diffstat (limited to 'tests/suite/model/quote.typ')
-rw-r--r--tests/suite/model/quote.typ86
1 files changed, 86 insertions, 0 deletions
diff --git a/tests/suite/model/quote.typ b/tests/suite/model/quote.typ
new file mode 100644
index 00000000..446784ee
--- /dev/null
+++ b/tests/suite/model/quote.typ
@@ -0,0 +1,86 @@
+// Test the quote element.
+
+--- quote-dir-author-pos ---
+// Text direction affects author positioning
+And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum].
+
+#set text(lang: "ar")
+#quote(attribution: [عالم])[مرحبًا]
+
+--- quote-dir-align ---
+// Text direction affects block alignment
+#set quote(block: true)
+#quote(attribution: [René Descartes])[cogito, ergo sum]
+
+#set text(lang: "ar")
+#quote(attribution: [عالم])[مرحبًا]
+
+--- quote-block-spacing ---
+// Spacing with other blocks
+#set quote(block: true)
+#set text(8pt)
+
+#lorem(10)
+#quote(lorem(10))
+#lorem(10)
+
+--- quote-inline ---
+// Inline citation
+#set text(8pt)
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+#set text(0pt)
+#bibliography("/assets/bib/works.bib")
+
+--- quote-cite-format-label-or-numeric ---
+// Citation-format: label or numeric
+#set text(8pt)
+#set quote(block: true)
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+#set text(0pt)
+#bibliography("/assets/bib/works.bib", style: "ieee")
+
+--- quote-cite-format-note ---
+// Citation-format: note
+#set text(8pt)
+#set quote(block: true)
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+#set text(0pt)
+#bibliography("/assets/bib/works.bib", style: "chicago-notes")
+
+--- quote-cite-format-author-date ---
+// Citation-format: author-date or author
+#set text(8pt)
+#set quote(block: true)
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+#set text(0pt)
+#bibliography("/assets/bib/works.bib", style: "apa")
+
+--- quote-nesting ---
+// Test quote selection.
+#set page(width: auto)
+#set text(lang: "en")
+=== EN
+#quote[An apostroph'] \
+#quote[A #quote[nested] quote] \
+#quote[A #quote[very #quote[nested]] quote]
+
+#set text(lang: "de")
+=== DE
+#quote[Satz mit Apostroph'] \
+#quote[Satz mit #quote[Zitat]] \
+#quote[A #quote[very #quote[nested]] quote]
+
+#set smartquote(alternative: true)
+=== DE Alternative
+#quote[Satz mit Apostroph'] \
+#quote[Satz mit #quote[Zitat]] \
+#quote[A #quote[very #quote[nested]] quote]
+
+--- quote-nesting-custom ---
+// With custom quotes.
+#set smartquote(quotes: (single: ("<", ">"), double: ("(", ")")))
+#quote[A #quote[nested] quote]