From 2d18ebe8658def7ec5bbb8b025e197c604948be8 Mon Sep 17 00:00:00 2001 From: Tobias Schmitz Date: Fri, 2 May 2025 14:59:42 +0200 Subject: [PATCH] test: add test for counter used in RTL grid layout --- tests/ref/grid-rtl-counter.png | Bin 0 -> 272 bytes tests/suite/layout/grid/rtl.typ | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/ref/grid-rtl-counter.png diff --git a/tests/ref/grid-rtl-counter.png b/tests/ref/grid-rtl-counter.png new file mode 100644 index 0000000000000000000000000000000000000000..fb0df44ad40da59bfc8ee7d98b1445de8c70d3a3 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^6+o=Y0VEjK$QP*tsq3CDjv*Ddl7HAcG$dYm6xi*q zE4Q@*#5lR}$N9$H%qfMZf+Rj4Ul(fcY4Y(nv{N3;QLEU8< zD>nBvMb>BE7Z5$5uXcuyIY=aW&y(;2^ACqNtodcEuP&Tic=DpR>E*9$tG7JM57 ([\##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() + ], +)