summaryrefslogtreecommitdiff
path: root/tests/typ/text
diff options
context:
space:
mode:
authortingerrr <me@tinger.dev>2023-10-10 11:59:11 +0200
committerGitHub <noreply@github.com>2023-10-10 11:59:11 +0200
commit0f24990579382818c5e1d03679a226ad2d2b730b (patch)
tree30e61e2bc31cae67ba5406df5ad681e639a80bb4 /tests/typ/text
parent0dd79bbad2f7eb8d5673317d982833b7a34a412a (diff)
Add `quote` element (#2252)
Diffstat (limited to 'tests/typ/text')
-rw-r--r--tests/typ/text/quote.typ51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/typ/text/quote.typ b/tests/typ/text/quote.typ
new file mode 100644
index 00000000..b815b032
--- /dev/null
+++ b/tests/typ/text/quote.typ
@@ -0,0 +1,51 @@
+// Test the quote element.
+
+---
+// Text direction affects author positioning
+And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum].
+
+#set text(lang: "ar")
+#quote(attribution: [عالم])[مرحبًا]
+
+---
+// Text direction affects block alignment
+#set quote(block: true)
+#quote(attribution: [René Descartes])[cogito, ergo sum]
+
+#set text(lang: "ar")
+#quote(attribution: [عالم])[مرحبًا]
+
+---
+// Spacing with other blocks
+#set quote(block: true)
+
+#lorem(10)
+#quote(lorem(10))
+#lorem(10)
+
+---
+// Inline citation
+#bibliography("/files/works.bib")
+
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+---
+// Citation-format: label or numeric
+#set quote(block: true)
+#bibliography("/files/works.bib", style: "ieee")
+
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+---
+// Citation-format: note
+#set quote(block: true)
+#bibliography("/files/works.bib", style: "chicago-notes")
+
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+---
+// Citation-format: author-date or author
+#set quote(block: true)
+#bibliography("/files/works.bib", style: "apa")
+
+#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]