test: add test for counter used in RTL grid layout

This commit is contained in:
Tobias Schmitz 2025-05-02 14:59:42 +02:00
parent ef14e1e28d
commit 2d18ebe865
No known key found for this signature in database
2 changed files with 20 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

View File

@ -193,3 +193,23 @@
),
..range(0, 10).map(i => ([\##i], table.cell(stroke: green)[123], table.cell(stroke: blue)[456], [789], [?], table.hline(start: 4, end: 5, stroke: red))).flatten()
)
--- grid-rtl-counter ---
// Test interaction between RTL and counters
#set text(dir: rtl)
#let test = counter("test")
#grid(
columns: (1fr, 1fr),
inset: 5pt,
align: center,
[
a: // should produce 1
#test.step()
#context test.get().first()
],
[
b: // should produce 2
#test.step()
#context test.get().first()
],
)