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 \ifx\lilyponddedication\undefined
26 {\normalfont\lilyponddedication\\
}
31 \ifx\lilypondtitle\undefined
33 {\huge\lilypondtitle\\
}
36 \ifx\lilypondsubtitle\undefined
38 {\Large\lilypondsubtitle\\
}
41 \ifx\lilypondsubsubtitle\undefined
43 {\large\lilypondsubsubtitle\\
}
49 \begin{minipage
}[t
]{0.45\textwidth}
50 \ifx\lilypondpoet\undefined
55 \ifx\lilypondtexttranslator\undefined
57 {\lilypondtexttranslator\\
}
60 \ifx\lilypondmeter\undefined
68 \begin{minipage
}[t
]{0.45\textwidth}
70 \ifx\lilypondcomposer\undefined
72 {\large\normalfont\scshape\lilypondcomposer\\
}
75 \ifx\lilypondopus\undefined
80 \ifx\lilypondarranger\undefined
89 \ifx\lilypondinstrument\undefined
91 {\center{\large\lilypondinstrument}
95 \ifx\lilypondpiece\undefined
97 {\flushleft{\large\normalfont\scshape\lilypondpiece}
103 \global\let\lilypondopus\relax
104 \global\let\lilypondpiece\relax
105 \global\let\mustmakelilypondtitle\undefined
108 \def\makelilypondpiecetitle{
111 \ifx\lilypondopus\undefined
113 {\flushright{\lilypondopus}
117 \ifx\lilypondpiece\undefined
119 {\flushleft{\large\normalfont\scshape\lilypondpiece}
125 \global\let\lilypondopus\relax
126 \global\let\lilypondpiece\relax
127 \global\let\mustmakelilypondpiecetitle\undefined
131 % these names can't be changed: they're used in mutopia headers
134 \ifx\lilypondhead\undefined
141 \ifx\lilypondfooter\undefined
147 \def\makelilypondtagline{
148 \ifx\undefined\lilypondtagline
155 \ifx\lilypondcopyright\undefined
162 % Moved header and footer definitions here from the ly2dvi script.
163 % Separate page styles for first, last and ordinary (plain) pages.
167 \renewcommand{\ps@plain
}{
168 \renewcommand{\@oddfoot
}{
169 \parbox{\textwidth}{\mbox{}\thefooter}}
170 \renewcommand{\@evenfoot
}{
172 \renewcommand{\@evenhead
}{
173 \hbox to
\textwidth{\textbf{\thepage}\hfill{\small\theheader}}}
174 \renewcommand{\@oddhead
}{
175 \hbox to
\textwidth{{\small\theheader}\hfill\textbf{\thepage}}}
178 \newcommand{\ps@firstpage
}{
179 \renewcommand{\@oddfoot
}{
180 \parbox{\textwidth}{\mbox{}\thecopyright}}
181 \renewcommand{\@evenfoot
}{
185 \newcommand{\ps@lastpage
}{
186 \renewcommand{\@oddfoot
}{
187 \parbox{\textwidth}{\mbox{}\makelilypondtagline}}
188 \renewcommand{\@evenfoot
}{
194 \endlinechar \titledefsELC