3
% LilyPond titling for LaTeX
7
% Defining a value, but leaving it empty:
9
% makes LaTeX break on the \\ in:
10
% \ifx\lilypondfoo\undefined\else{\lilypondfoo\\}\fi
12
\edef\titledefsELC{\the\endlinechar}%
15
% The feta characters for use in titles
18
\font\fetasixteen=feta16
19
\def\fetafont{\fetasixteen}
20
\def\fetachar#1{\hbox{\fetasixteen#1}}
22
\def\makelilypondtitle{
24
\lilypondifundefined{lilyponddedication}
26
{\normalfont\lilyponddedication\\}
30
\lilypondifundefined{lilypondtitle}
32
{\huge\lilypondtitle\\}
34
\lilypondifundefined{lilypondsubtitle}
36
{\Large\lilypondsubtitle\\}
38
\lilypondifundefined{lilypondsubsubtitle}
40
{\large\lilypondsubsubtitle\\}
45
\begin{minipage}[t]{0.45\textwidth}
46
\lilypondifundefined{lilypondpoet}
50
\lilypondifundefined{lilypondtexttranslator}
52
{\lilypondtexttranslator\\}
54
\lilypondifundefined{lilypondmeter}
61
\begin{minipage}[t]{0.45\textwidth}
63
\lilypondifundefined{lilypondcomposer}
65
{\large\normalfont\scshape\lilypondcomposer\\}
67
\lilypondifundefined{lilypondopus}
71
\lilypondifundefined{lilypondarranger}
79
\lilypondifundefined{lilypondinstrument}
81
{\centerline{\large\lilypondinstrument}}
83
\lilypondifundefined{lilypondpiece}
85
{\flushleft{\large\normalfont\lilypondpiece}
90
\global\let\lilypondopus\undefined
91
\global\let\lilypondpiece\undefined
92
\global\let\mustmakelilypondtitle\undefined
95
\def\makelilypondpiecetitle{
98
\lilypondifundefined{lilypondopus}
100
{\flushright{\lilypondopus}
103
\lilypondifundefined{lilypondpiece}
105
{\flushleft{\large\normalfont\lilypondpiece}
110
\global\let\lilypondopus\undefined
111
\global\let\lilypondpiece\undefined
112
\global\let\mustmakelilypondpiecetitle\undefined
116
% these names can't be changed: they're used in mutopia headers
119
\lilypondifundefined{lilypondhead}
125
\lilypondifundefined{lilypondfooter}
130
\def\makelilypondtagline{
131
\lilypondifundefined{lilypondtagline}
137
\lilypondifundefined{lilypondcopyright}
142
% Moved header and footer definitions here from the lilypond script.
143
% Separate page styles for first, last and ordinary (plain) pages.
147
\renewcommand{\ps@plain}{
148
\renewcommand{\@oddfoot}{
149
\parbox{\textwidth}{\mbox{}\thefooter}}
150
\renewcommand{\@evenfoot}{
152
\renewcommand{\@evenhead}{
153
\hbox to \textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
154
\renewcommand{\@oddhead}{
155
\hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}
158
\newcommand{\ps@firstpage}{
159
\renewcommand{\@oddfoot}{
160
\parbox{\textwidth}{\mbox{}\thecopyright}}
161
\renewcommand{\@evenfoot}{
165
\newcommand{\ps@lastpage}{
166
\renewcommand{\@oddfoot}{
167
\parbox{\textwidth}{\mbox{}\makelilypondtagline}}
168
\renewcommand{\@evenfoot}{
174
\endlinechar \titledefsELC