X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tex%2Ftitledefs.tex;h=3ca748c76401fbd05b12f5556bccb5bd27e87a65;hb=377bdb36c4f09fb20a1c55b0358cc5d0714eb85e;hp=653afeb09cd1d3922d2c230a74d734e22ee33c96;hpb=d765f3af45be51f15da55cf570a4b172200e1035;p=lilypond.git diff --git a/tex/titledefs.tex b/tex/titledefs.tex index 653afeb09c..3ca748c764 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -1,100 +1,176 @@ -%% -%% LilyPond titling for LaTeX -%% -%% Note -%% -%% Defining a value, but leaving it empty: -%% \def\lilypondfoo{} -%% makes LaTeX break on the \\ in: -%% \ifx\lilypondfoo\undefined\else{\lilypondfoo\\}\fi -%% +% titledefs.tex +% +% LilyPond titling for LaTeX +% +% Note: +% +% Defining a value, but leaving it empty: +% \def\lilypondfoo{} +% makes LaTeX break on the \\ in: +% \ifx\lilypondfoo\undefined\else{\lilypondfoo\\}\fi +% +\edef\titledefsELC{\the\endlinechar}% +\endlinechar -1\relax + % The feta characters for use in titles \input feta20.tex -% + \font\fetasixteen=feta16 \def\fetafont{\fetasixteen} \def\fetachar#1{\hbox{\fetasixteen#1}} -% -\def\makelilypondtitle -{ + +\def\makelilypondtitle{ \begin{center} - \ifx\lilyponddedication\undefined\else{\normalfont\lilyponddedication\\}\fi - \bfseries - \ifx\lilypondtitle\undefined\else{\huge\lilypondtitle\\}\fi - \ifx\lilypondsubtitle\undefined\else{\Large\lilypondsubtitle\\}\fi - \ifx\lilypondsubsubtitle\undefined\else{\large\lilypondsubsubtitle\\}\fi + \lilypondifundefined{lilyponddedication} + {} + {\normalfont\lilyponddedication\\} + + \bfseries + + \lilypondifundefined{lilypondtitle} + {} + {\huge\lilypondtitle\\} + + \lilypondifundefined{lilypondsubtitle} + {} + {\Large\lilypondsubtitle\\} + + \lilypondifundefined{lilypondsubsubtitle} + {} + {\large\lilypondsubsubtitle\\} \end{center} + \bigskip - % urg - \edef\saveparskip{\parskip}\parskip-5mm + \begin{minipage}[t]{0.45\textwidth} - \ifx\lilypondpoet\undefined\else{\lilypondpoet\\}\fi - \ifx\lilypondtexttranslator\undefined\else{\lilypondtexttranslator\\}\fi - \ifx\lilypondmeter\undefined\else{\lilypondmeter\\}\fi - \end{minipage}\hspace*{\fill} + \lilypondifundefined{lilypondpoet} + {} + {\lilypondpoet\\} + + \lilypondifundefined{lilypondtexttranslator} + {} + {\lilypondtexttranslator\\} + + \lilypondifundefined{lilypondmeter} + {} + {\lilypondmeter\\} + \end{minipage} + + \hspace*{\fill} + \begin{minipage}[t]{0.45\textwidth} - \begin{flushright} - \ifx\lilypondcomposer\undefined\else{\large\normalfont\scshape\lilypondcomposer\\}\fi - \ifx\lilypondopus\undefined\else{\lilypondopus\\}\fi - \ifx\lilypondarranger\undefined\else{\lilypondarranger\\}\fi - \end{flushright}% - \end{minipage}\par - \parskip\saveparskip - \ifx\lilypondinstrument\undefined\else{\center{\large\lilypondinstrument}\par}\fi - \ifx\lilypondpiece\undefined\else{\flushleft{\large\normalfont\scshape\lilypondpiece}\par}\fi -% \leavevmode - \global\let\lilypondopus\relax% - \global\let\lilypondpiece\relax% - \global\let\mustmakelilypondtitle\undefined% + \begin{flushright} + \lilypondifundefined{lilypondcomposer} + {} + {\large\normalfont\scshape\lilypondcomposer\\} + + \lilypondifundefined{lilypondopus} + {} + {\lilypondopus\\} + + \lilypondifundefined{lilypondarranger} + {} + {\lilypondarranger\\} + \end{flushright} + \end{minipage} + + \par + + \lilypondifundefined{lilypondinstrument} + {} + {\center{\large\lilypondinstrument} + \par} + + \lilypondifundefined{lilypondpiece} + {} + {\flushleft{\large\normalfont\lilypondpiece} + \par} + +% \leavevmode + + \global\let\lilypondopus\undefined + \global\let\lilypondpiece\undefined + \global\let\mustmakelilypondtitle\undefined } -% -\def\makelilypondpiecetitle -{ + +\def\makelilypondpiecetitle{ \bigskip\myfilbreak - \ifx\lilypondopus\undefined\else{\flushright{\lilypondopus}\par}\fi - \ifx\lilypondpiece\undefined\else{\flushleft{\large\normalfont\scshape\lilypondpiece}\par}\fi - \nopagebreak% - \global\let\lilypondopus\relax% - \global\let\lilypondpiece\relax% - \global\let\mustmakelilypondpiecetitle\undefined% + + \lilypondifundefined{lilypondopus} + {} + {\flushright{\lilypondopus} + \par} + + \lilypondifundefined{lilypondpiece} + {} + {\flushleft{\large\normalfont\scshape\lilypondpiece} + \par} + + \nopagebreak + + \global\let\lilypondopus\undefined + \global\let\lilypondpiece\undefined + \global\let\mustmakelilypondpiecetitle\undefined } + % header -- head ? -% these names can't be changed: they're uses in mutopia headers -\def\theheader -{ - \ifx\lilypondhead\undefined\relax\else% - \lilypondhead\fi +% these names can't be changed: they're used in mutopia headers + +\def\theheader{ + \lilypondifundefined{lilypondhead} + {} + \lilypondhead } -\def\thefooter -{ - \ifx\lilypondfooter\undefined\relax\else% - \lilypondfooter\fi + +\def\thefooter{ + \lilypondifundefined{lilypondfooter} + {} + \lilypondfooter } -\def\makelilypondtagline -{ - \ifx\undefined\lilypondtagline\relax\else\lilypondtagline\fi + +\def\makelilypondtagline{ + \lilypondifundefined{lilypondtagline} + {} + \lilypondtagline } -\def\thecopyright -{ - \ifx\lilypondcopyright\undefined\thefooter\else% - \lilypondcopyright\fi + +\def\thecopyright{ + \lilypondifundefined{lilypondcopyright} + \thefooter + \lilypondcopyright } -% -% Moved header and footer definitions here from the ly2dvi script. + +% Moved header and footer definitions here from the lilypond script. % Separate page styles for first, last and ordinary (plain) pages. + \makeatletter + \renewcommand{\ps@plain}{ - \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}% - \renewcommand{\@evenfoot}{\@oddfoot}% - \renewcommand{\@evenhead}{\hbox to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}} - \renewcommand{\@oddhead}{\hbox to - \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}} + \renewcommand{\@oddfoot}{ + \parbox{\textwidth}{\mbox{}\thefooter}} + \renewcommand{\@evenfoot}{ + \@oddfoot} + \renewcommand{\@evenhead}{ + \hbox to \textwidth{\textbf{\thepage}\hfill{\small\theheader}}} + \renewcommand{\@oddhead}{ + \hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}} +} + \newcommand{\ps@firstpage}{ - \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thecopyright}}% - \renewcommand{\@evenfoot}{\@oddfoot}} + \renewcommand{\@oddfoot}{ + \parbox{\textwidth}{\mbox{}\thecopyright}} + \renewcommand{\@evenfoot}{ + \@oddfoot} +} + \newcommand{\ps@lastpage}{ - \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}% - \renewcommand{\@evenfoot}{\@oddfoot}} + \renewcommand{\@oddfoot}{ + \parbox{\textwidth}{\mbox{}\makelilypondtagline}} + \renewcommand{\@evenfoot}{ + \@oddfoot} +} + \makeatother -\endinput +\endlinechar \titledefsELC +\endinput