summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-10-12 14:01:31 +0200
committerGitHub <noreply@github.com>2024-10-12 12:01:31 +0000
commitbb0e0894748e572b29957acefa661e5ed68d5a15 (patch)
treee3d498373f04c758401e313886738c79605ad6a0 /tests
parent16736feb13eec87eb9ca114deaeb4f7eeb7409d2 (diff)
Fix logical ordering of floats and footnotes (#5185)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/footnote-break-across-pages.pngbin5467 -> 5473 bytes
-rw-r--r--tests/ref/footnote-nested-break-across-pages.pngbin0 -> 1324 bytes
-rw-r--r--tests/ref/footnote-nested.pngbin2555 -> 2539 bytes
-rw-r--r--tests/ref/issue-4966-figure-float-counter.pngbin0 -> 1127 bytes
-rw-r--r--tests/ref/place-float-counter.pngbin683 -> 670 bytes
-rw-r--r--tests/suite/layout/flow/footnote.typ7
-rw-r--r--tests/suite/layout/flow/place.typ1
-rw-r--r--tests/suite/model/figure.typ22
8 files changed, 27 insertions, 3 deletions
diff --git a/tests/ref/footnote-break-across-pages.png b/tests/ref/footnote-break-across-pages.png
index 2d05fcd5..878227cb 100644
--- a/tests/ref/footnote-break-across-pages.png
+++ b/tests/ref/footnote-break-across-pages.png
Binary files differ
diff --git a/tests/ref/footnote-nested-break-across-pages.png b/tests/ref/footnote-nested-break-across-pages.png
new file mode 100644
index 00000000..889fb067
--- /dev/null
+++ b/tests/ref/footnote-nested-break-across-pages.png
Binary files differ
diff --git a/tests/ref/footnote-nested.png b/tests/ref/footnote-nested.png
index 501b257e..06617d98 100644
--- a/tests/ref/footnote-nested.png
+++ b/tests/ref/footnote-nested.png
Binary files differ
diff --git a/tests/ref/issue-4966-figure-float-counter.png b/tests/ref/issue-4966-figure-float-counter.png
new file mode 100644
index 00000000..9988baea
--- /dev/null
+++ b/tests/ref/issue-4966-figure-float-counter.png
Binary files differ
diff --git a/tests/ref/place-float-counter.png b/tests/ref/place-float-counter.png
index 42d40ab5..3253fbab 100644
--- a/tests/ref/place-float-counter.png
+++ b/tests/ref/place-float-counter.png
Binary files differ
diff --git a/tests/suite/layout/flow/footnote.typ b/tests/suite/layout/flow/footnote.typ
index 945ae4d3..4cf49777 100644
--- a/tests/suite/layout/flow/footnote.typ
+++ b/tests/suite/layout/flow/footnote.typ
@@ -9,13 +9,16 @@ A#footnote[A] \
A #footnote[A]
--- footnote-nested ---
-// Currently, numbers a bit out of order if a nested footnote ends up in the
-// same frame as another one. :(
First \
Second #footnote[A, #footnote[B, #footnote[C]]]
Third #footnote[D, #footnote[E]] \
Fourth #footnote[F]
+--- footnote-nested-break-across-pages ---
+#set page(height: 80pt)
+A #footnote([I: ] + lines(6) + footnote[II])
+B #footnote[III]
+
--- footnote-entry ---
// Test customization.
#show footnote: set text(red)
diff --git a/tests/suite/layout/flow/place.typ b/tests/suite/layout/flow/place.typ
index f3b77118..ec27139f 100644
--- a/tests/suite/layout/flow/place.typ
+++ b/tests/suite/layout/flow/place.typ
@@ -165,7 +165,6 @@ C
place(auto, float: true, block(width: 100%, height: 100%, fill: aqua))
)
-
--- place-float-column-align-auto ---
#set page(height: 150pt, columns: 2)
#set place(auto, float: true, clearance: 10pt)
diff --git a/tests/suite/model/figure.typ b/tests/suite/model/figure.typ
index fbd0ab29..19e81116 100644
--- a/tests/suite/model/figure.typ
+++ b/tests/suite/model/figure.typ
@@ -267,3 +267,25 @@ HI#footnote.entry(clearance: 2.5em)[There]
// Test that figure caption separator is synthesized correctly.
#show figure.caption: c => test(c.separator, [#": "])
#figure(table[], caption: [This is a test caption])
+
+--- issue-4966-figure-float-counter ---
+#let c = context counter(figure.where(kind: image)).display()
+#set align(center)
+
+#c
+
+#figure(
+ square(c),
+ placement: bottom,
+ caption: [A]
+)
+
+#c
+
+#figure(
+ circle(c),
+ placement: top,
+ caption: [B]
+)
+
+#c