Add song aliases to TOC and fix page numbering

- 82 songs get alias entries (alternate titles/opening lines) shown
  in italic in the TOC, pointing to the same page as the main title
- Front matter (title, foreword, TOC) has no page numbers
- Song pages start at page 1
- Aliases extracted from reference PDF (CL6) TOC by title matching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-04-02 18:08:20 +02:00
parent 44ea072716
commit e771264244
84 changed files with 102 additions and 0 deletions

View File

@@ -88,6 +88,7 @@
\ExplSyntaxOn
\iow_new:N \g__sb_toc_iow
\tl_new:N \l__sb_title_tl
\tl_new:N \l__sb_alias_tl
\tl_new:N \l__sb_bulibu_tl
\tl_new:N \l__sb_cl_tl
\tl_new:N \l__sb_swa_tl
@@ -141,6 +142,18 @@
{ \l__sb_libock_tl }
{ \exp_not:N \pageref { song: \l__sb_num_tl } }
}
% Write alias entry (italic, same page ref, no ref numbers)
\tl_set:Nx \l__sb_alias_tl { \songproperty{alias} }
\tl_if_empty:NF \l__sb_alias_tl
{
\iow_now:Nx \g__sb_toc_iow
{
\exp_not:N \songtocrow
{ \exp_not:N \textit { \l__sb_alias_tl } }
{}{}{}{}{}
{ \exp_not:N \pageref { song: \l__sb_num_tl } }
}
}
}
% Label MUST be outside guard: measurement pass label is discarded (inside vbox),
% but the real pass label survives and gets written to .aux