From bef4e20434334d450a9d3cf3a41ada9c6cde1535 Mon Sep 17 00:00:00 2001 From: Eric Biedert Date: Wed, 28 May 2025 13:03:17 +0200 Subject: [PATCH] Add test for location of migrated block Previously, this would result in a position on the first page. --- tests/ref/locate-migrated-breakable.png | Bin 0 -> 243 bytes tests/suite/introspection/locate.typ | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/ref/locate-migrated-breakable.png diff --git a/tests/ref/locate-migrated-breakable.png b/tests/ref/locate-migrated-breakable.png new file mode 100644 index 0000000000000000000000000000000000000000..2ee414e4592b61fe02b6da2217adc63c2e0d50c9 GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^6+j%w0VEh~*4TakQoB4|978H@y}h!Li;+?0_{VDQ z-4i_37T@HqU~vsJI-OvAr)9Rt>7&vo7U=|ubsrTzk!mnu*XsYahp(3IU$^hR_z#}_ zzbw^GF|x6-`LXBiHTkgB{Q7}+%QYLD->v)@aNym~cfKqi$}_&LZ@qcAyD(w;!8T@) zS_tstS)G)eknkYpa9ySCZS4f@o4fTIwa;G-ViM=S{LP;+{H)tPhCZ&exr-U@eck)E c7g=i@PXwRKjuSCLY#`rwy85}Sb4q9e0L=JZ5&!@I literal 0 HcmV?d00001 diff --git a/tests/suite/introspection/locate.typ b/tests/suite/introspection/locate.typ index 18611dded..420c8b92a 100644 --- a/tests/suite/introspection/locate.typ +++ b/tests/suite/introspection/locate.typ @@ -72,6 +72,18 @@ B #pagebreak(weak: true) #metadata(none) +--- locate-migrated-breakable --- +// Ensure that when a breakable element fully migrates to the next page without +// orphan frames, its position correctly reflects that. +#set page(height: 40pt) +A +#block[B] + +#context test( + locate().position(), + (page: 2, x: 10pt, y: 10pt), +) + --- issue-4029-locate-after-spacing --- #set page(margin: 10pt) #show heading: it => v(40pt) + it