summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-10-31 01:33:06 +0100
committerLaurenz <laurmaedje@gmail.com>2023-10-31 01:33:06 +0100
commitab5dd2a1cb5e6e038f92fbdca0996f602e42f16a (patch)
tree90de80cbf5b43c0f525dab20a4b3e901a8933fce /tests/typ
parent27ab2bb9a2e49bd6b8190eb39b18957b27aca222 (diff)
CSL support
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/meta/bibliography-full.typ5
-rw-r--r--tests/typ/meta/bibliography.typ15
-rw-r--r--tests/typ/meta/cite-form.typ10
-rw-r--r--tests/typ/meta/outline-entry.typ7
-rw-r--r--tests/typ/text/quote.typ25
5 files changed, 42 insertions, 20 deletions
diff --git a/tests/typ/meta/bibliography-full.typ b/tests/typ/meta/bibliography-full.typ
new file mode 100644
index 00000000..0adc0b85
--- /dev/null
+++ b/tests/typ/meta/bibliography-full.typ
@@ -0,0 +1,5 @@
+// Test the full bibliography.
+
+---
+#set page(paper: "a6")
+#bibliography("/files/works.bib", full: true)
diff --git a/tests/typ/meta/bibliography.typ b/tests/typ/meta/bibliography.typ
index e3d746e6..ec90a96a 100644
--- a/tests/typ/meta/bibliography.typ
+++ b/tests/typ/meta/bibliography.typ
@@ -2,8 +2,9 @@
---
#set page(width: 200pt)
+
= Details
-See also #cite("arrgh", "distress", supplement: [p. 22]), @arrgh[p. 4], and @distress[p. 5].
+See also @arrgh #cite(<distress>, supplement: [p.~22]), @arrgh[p.~4], and @distress[p.~5].
#bibliography("/files/works.bib")
---
@@ -16,23 +17,18 @@ See also #cite("arrgh", "distress", supplement: [p. 22]), @arrgh[p. 4], and @dis
)
#line(length: 100%)
-#[#set cite(brackets: false)
-As described by @netwok],
+As described by #cite(<netwok>, form: "prose"),
the net-work is a creature of its own.
This is close to piratery! @arrgh
And quark! @quark
---
-// Error: 15-55 duplicate bibliography keys: arrgh, distress, glacier-melt, issue201, mcintosh_anxiety, netwok, psychology25, quark, restful, sharing, tolkien54
-#bibliography(("/files/works.bib", "/files/works.bib"))
-
----
#set page(width: 200pt)
#set heading(numbering: "1.")
#show bibliography: set heading(numbering: "1.")
= Multiple Bibs
-Now we have multiple bibliographies containing #cite("glacier-melt", "keshav2007read")
+Now we have multiple bibliographies containing @glacier-melt @keshav2007read
#bibliography(("/files/works.bib", "/files/works_too.bib"))
---
@@ -43,3 +39,6 @@ Now we have multiple bibliographies containing #cite("glacier-melt", "keshav2007
@arrgh
#bibliography("/files/works.bib")
+---
+// Error: 15-55 duplicate bibliography keys: netwok, issue201, arrgh, quark, distress, glacier-melt, tolkien54, sharing, restful, mcintosh_anxiety, psychology25
+#bibliography(("/files/works.bib", "/files/works.bib"))
diff --git a/tests/typ/meta/cite-form.typ b/tests/typ/meta/cite-form.typ
new file mode 100644
index 00000000..3c11e1f6
--- /dev/null
+++ b/tests/typ/meta/cite-form.typ
@@ -0,0 +1,10 @@
+// Test citation forms.
+
+---
+#set page(width: 200pt)
+
+Nothing: #cite(<arrgh>, form: none)
+
+#cite(<netwok>, form: "prose") say stuff.
+
+#bibliography("/files/works.bib", style: "apa")
diff --git a/tests/typ/meta/outline-entry.typ b/tests/typ/meta/outline-entry.typ
index 8f290157..74a785a9 100644
--- a/tests/typ/meta/outline-entry.typ
+++ b/tests/typ/meta/outline-entry.typ
@@ -54,7 +54,6 @@
=== Lower heading
---
-// Error: 2-23 cannot outline cite
-#outline(target: cite)
-#cite("arrgh", "distress", supplement: [p. 22])
-#bibliography("/files/works.bib")
+// Error: 2-27 cannot outline metadata
+#outline(target: metadata)
+#metadata("hello")
diff --git a/tests/typ/text/quote.typ b/tests/typ/text/quote.typ
index b815b032..0fd96ff5 100644
--- a/tests/typ/text/quote.typ
+++ b/tests/typ/text/quote.typ
@@ -18,6 +18,7 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum].
---
// Spacing with other blocks
#set quote(block: true)
+#set text(8pt)
#lorem(10)
#quote(lorem(10))
@@ -25,27 +26,35 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum].
---
// Inline citation
-#bibliography("/files/works.bib")
-
+#set text(8pt)
#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+#set text(0pt)
+#bibliography("/files/works.bib")
+
---
// Citation-format: label or numeric
+#set text(8pt)
#set quote(block: true)
-#bibliography("/files/works.bib", style: "ieee")
-
#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+#set text(0pt)
+#bibliography("/files/works.bib", style: "ieee")
+
---
// Citation-format: note
+#set text(8pt)
#set quote(block: true)
-#bibliography("/files/works.bib", style: "chicago-notes")
-
#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+#set text(0pt)
+#bibliography("/files/works.bib", style: "chicago-notes")
+
---
// Citation-format: author-date or author
+#set text(8pt)
#set quote(block: true)
-#bibliography("/files/works.bib", style: "apa")
-
#quote(attribution: <tolkien54>)[In a hole in the ground there lived a hobbit.]
+
+#set text(0pt)
+#bibliography("/files/works.bib", style: "apa")