summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
author+merlan #flirora <uruwi@protonmail.com>2024-05-30 11:40:01 -0400
committerGitHub <noreply@github.com>2024-05-30 15:40:01 +0000
commit23746ee18901e08852306f35639298ad234d3481 (patch)
tree7fb02376e4e621910720d7fff78d61c2453d7d46 /tests
parenta51bd3f0b6afacbab4529558d65144d303f9b804 (diff)
Add flush element (#4141)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/place-figure-flush.pngbin0 -> 5197 bytes
-rw-r--r--tests/ref/place-float-flush.pngbin0 -> 2644 bytes
-rw-r--r--tests/suite/layout/place.typ27
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/ref/place-figure-flush.png b/tests/ref/place-figure-flush.png
new file mode 100644
index 00000000..2e6e0310
--- /dev/null
+++ b/tests/ref/place-figure-flush.png
Binary files differ
diff --git a/tests/ref/place-float-flush.png b/tests/ref/place-float-flush.png
new file mode 100644
index 00000000..67c01c2c
--- /dev/null
+++ b/tests/ref/place-float-flush.png
Binary files differ
diff --git a/tests/suite/layout/place.typ b/tests/suite/layout/place.typ
index b8765e93..0922800d 100644
--- a/tests/suite/layout/place.typ
+++ b/tests/suite/layout/place.typ
@@ -121,6 +121,33 @@ Second
image("/assets/images/diagram.svg", width: 80%),
)
+--- place-float-flush ---
+#set page(height: 150pt, width: 150pt)
+
+#let floater = place(auto, float: true, rect(width: 100%, height: 90pt, text(size: 24pt)[I float!]))
+
+Some introductory text.
+
+#floater #floater #floater #floater
+
+Some additional text.
+
+#place.flush()
+
+Some conclusive text. // Should appear after all the floating figures
+
+--- place-figure-flush ---
+
+#set page(height: 165pt, width: 150pt)
+
+Some introductory text: #lorem(15)
+
+#figure(placement: auto, caption: [A self-describing figure], rect(width: 100%, height: 64pt, [I float with a caption!]))
+
+#place.flush()
+
+Some conclusive text that must occur after the figure.
+
--- place-bottom-in-box ---
#box(
fill: aqua,