From 1deba1fe151bc7929ddc8211042abe2b09a3f8e2 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Sat, 1 Jan 2011 19:41:10 +0700 Subject: [PATCH] Fix 1465. Reverse the label-page-table so that larger page numbers will appear when there is a duplicate label. --- lily/page-breaking.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc index 7e58ec4285..e6a5740b2e 100644 --- a/lily/page-breaking.cc +++ b/lily/page-breaking.cc @@ -529,6 +529,11 @@ Page_breaking::make_pages (vector lines_per_page, SCM systems) ret = scm_cons (page, ret); --page_num; } + + // By reversing the table, we ensure that duplicated labels (eg. those + // straddling a page turn) will appear in the table with their last + // occurence first. + label_page_table = scm_reverse_x (label_page_table, SCM_EOL); book_->top_paper ()->set_variable (ly_symbol2scm ("label-page-table"), label_page_table); return ret; } -- 2.39.2