From 560791afe84c87c9ef212b1e4289edc30ce50646 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 8 May 2024 11:31:28 +0200 Subject: Fix footnote migration (#4095) --- tests/ref/issue-3481-cite-location.png | Bin 0 -> 602 bytes tests/ref/issue-footnotes-skip-first-page.png | Bin 0 -> 571 bytes tests/suite/model/cite.typ | 17 +++++++++++++++++ tests/suite/model/footnote.typ | 7 +++++++ 4 files changed, 24 insertions(+) create mode 100644 tests/ref/issue-3481-cite-location.png create mode 100644 tests/ref/issue-footnotes-skip-first-page.png (limited to 'tests') diff --git a/tests/ref/issue-3481-cite-location.png b/tests/ref/issue-3481-cite-location.png new file mode 100644 index 00000000..cfc13db5 Binary files /dev/null and b/tests/ref/issue-3481-cite-location.png differ diff --git a/tests/ref/issue-footnotes-skip-first-page.png b/tests/ref/issue-footnotes-skip-first-page.png new file mode 100644 index 00000000..d24387e3 Binary files /dev/null and b/tests/ref/issue-footnotes-skip-first-page.png differ diff --git a/tests/suite/model/cite.typ b/tests/suite/model/cite.typ index c6bdccb1..df8b7e76 100644 --- a/tests/suite/model/cite.typ +++ b/tests/suite/model/cite.typ @@ -90,3 +90,20 @@ B #cite() #cite(). #show bibliography: none #bibliography("/assets/bib/works.bib") + +--- issue-3481-cite-location --- +// The locator was cloned in the wrong location, leading to inconsistent +// citation group locations in the second footnote attempt. +#set page(height: 60pt) + +// First page shouldn't be empty because otherwise we won't skip the first +// region which causes the bug in the first place. +#v(10pt) + +// Everything moves to the second page because we want to keep the line and +// its footnotes together. +#footnote[@netwok] +#footnote[A] + +#show bibliography: none +#bibliography("/assets/bib/works.bib") diff --git a/tests/suite/model/footnote.typ b/tests/suite/model/footnote.typ index c41db577..34450ca4 100644 --- a/tests/suite/model/footnote.typ +++ b/tests/suite/model/footnote.typ @@ -180,3 +180,10 @@ B #footnote[b] - #footnote[1] - #footnote[2] + +--- issue-footnotes-skip-first-page --- +// In this issue, we would get an empty page at the beginning because footnote +// layout didn't properly check for in_last. +#set page(height: 50pt) +#footnote[A] +#footnote[B] -- cgit v1.2.3