Rewrite songbook as pure LaTeX project (Carmina Leonis style)

Replace the Kotlin/Gradle multi-module pipeline with a pure LaTeX
songbook using the leadsheets package and LuaLaTeX. Style matches
the Carmina Leonis (CL6) scout songbook: Fraktur titles, chords
above lyrics, metadata at page bottom, reference book footer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
shahondin1624
2026-04-01 08:23:57 +02:00
parent e386501b57
commit 4024d0e421
65 changed files with 402 additions and 5121 deletions

100
songbook-style.sty Normal file
View File

@@ -0,0 +1,100 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{songbook-style}[2026/04/01 Pfadfinder Liederbuch Style]
% --- Core packages ---
\RequirePackage{fontspec}
\RequirePackage[ngerman]{babel}
\RequirePackage[
a5paper,
top=15mm,
bottom=20mm,
inner=20mm,
outer=12mm
]{geometry}
\RequirePackage[hidelinks]{hyperref}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage[minimal]{leadsheets}
% Pre-mark musicsymbols as loaded to avoid missing musix11 font error
\ExplSyntaxOn
\cs_new:cpn {leadsheets-library-musicsymbols-loaded} {}
\ExplSyntaxOff
\useleadsheetslibraries{chordnames,chords,shorthands,properties,templates,translations,songs}
% --- Font setup ---
\setmainfont{TeX Gyre Heros}
\newfontfamily\frakfont{UnifrakturMaguntia-Book}[Path=fonts/,Extension=.ttf]
% --- Page style: page numbers at bottom-outer, large ---
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[LE]{\large\bfseries\thepage}
\fancyfoot[RO]{\large\bfseries\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% --- Custom song properties ---
\definesongproperty{alias}
\definesongproperty{note}
\definesongproperty{mundorgel}
\definesongproperty{pfadfinderliederbuch}
% --- leadsheets settings ---
\setleadsheets{
title-template = songbook,
verse/numbered = false,
verse/named = false,
chorus/named = false,
chorus/numbered = false,
after-song = \songendsection,
}
% --- Chord appearance: regular weight, black (matching reference style) ---
\setchords{
format = \small,
}
% --- Command to render metadata at bottom of song ---
\newcommand{\songendsection}{%
\vfill
\ifsongproperty{note}{%
{\footnotesize\songproperty{note}\par\smallskip}%
}{}%
\begingroup\footnotesize
\ifsongproperty{lyrics}{%
\ifsongproperty{composer}{%
Worte: \songproperty{lyrics}\par
Weise: \songproperty{composer}\par
}{%
Worte und Weise: \songproperty{lyrics}\par
}%
}{%
\ifsongproperty{composer}{%
Weise: \songproperty{composer}\par
}{}%
}%
\endgroup
% Reference book footer
\vspace{3mm}%
\begingroup\footnotesize
\noindent
\makebox[0.18\textwidth][c]{MO}%
\makebox[0.18\textwidth][c]{PfLB}%
\hfill\par\noindent
\makebox[0.18\textwidth][c]{%
\ifsongproperty{mundorgel}{\songproperty{mundorgel}}{}%
}%
\makebox[0.18\textwidth][c]{%
\ifsongproperty{pfadfinderliederbuch}{\songproperty{pfadfinderliederbuch}}{}%
}%
\hfill
\endgroup
\newpage
}
% --- Song title template: Fraktur title, metadata at bottom ---
\definesongtitletemplate{songbook}{%
{\LARGE\frakfont\songproperty{title}\par}%
\addcontentsline{toc}{section}{\songproperty{title}}%
\vspace{4mm}%
}