summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMALO <57839069+MDLC01@users.noreply.github.com>2023-06-26 13:40:52 +0200
committerGitHub <noreply@github.com>2023-06-26 13:40:52 +0200
commit33803b16148ec064ccabc9bffd4a9383b969e23e (patch)
tree37727816b2ff4b0bd152086f761847509cf5cb7d /tests
parent9ef4643ba104acc08cd3a4fce8cfea72253654b1 (diff)
Make footnotes referenceable (#1546)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/meta/footnote-refs.pngbin0 -> 28467 bytes
-rw-r--r--tests/typ/meta/footnote-refs.typ40
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/ref/meta/footnote-refs.png b/tests/ref/meta/footnote-refs.png
new file mode 100644
index 00000000..3fab7bd5
--- /dev/null
+++ b/tests/ref/meta/footnote-refs.png
Binary files differ
diff --git a/tests/typ/meta/footnote-refs.typ b/tests/typ/meta/footnote-refs.typ
new file mode 100644
index 00000000..0caee7bc
--- /dev/null
+++ b/tests/typ/meta/footnote-refs.typ
@@ -0,0 +1,40 @@
+// Test references to footnotes.
+
+---
+A footnote #footnote[Hi]<fn> \
+A reference to it @fn
+
+---
+// Multiple footnotes are refs
+First #footnote[A]<fn1> \
+Second #footnote[B]<fn2> \
+First ref @fn1 \
+Third #footnote[C] \
+Fourth #footnote[D]<fn4> \
+Fourth ref @fn4 \
+Second ref @fn2 \
+Second ref again @fn2
+
+---
+// Forward reference
+Usage @fn \
+Definition #footnote[Hi]<fn>
+
+---
+// Footnote ref in footnote
+#footnote[Reference to next @fn]
+#footnote[Reference to myself @fn]<fn>
+#footnote[Reference to previous @fn]
+
+---
+// Styling
+#show footnote: text.with(fill: red)
+Real #footnote[...]<fn> \
+Ref @fn
+
+---
+// Footnote call with label
+#footnote(<fn>)
+#footnote[Hi]<fn>
+#ref(<fn>)
+#footnote(<fn>)