X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tex%2Ftitledefs.tex;h=6793d310975c1d2a7b3d02ff5d0e700c69cb8d30;hb=5dab6cfb28ecc175ca8f4c24808082719246fdb7;hp=000cb6f1f66f9697d44b70fb4a815c86f7849eaf;hpb=a0a2265e998de797121d8feb51eb07f561012e6a;p=lilypond.git diff --git a/tex/titledefs.tex b/tex/titledefs.tex index 000cb6f1f6..6793d31097 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -1,35 +1,175 @@ +% titledefs.tex % -% ideally, we should create a LaTeX/TeX class -% for setting music in different sizes. +% LilyPond titling for LaTeX % -\input lilyponddefs -\def\EndLilyPondOutput{\endinput} -\def\thetitle{} -\def\thecomposer{} -\def\thearranger{} -\def\theinstrument{} -\def\theLineOne{} -\def\theLineTwo{} -\def\theLineThree{} -\def\lineOne#1{\def\theLineOne{#1}} -\def\lineTwo#1{\def\theLineTwo{#1}} -\def\lineThree#1{\def\theLineThree{#1}} -\def\title#1{\def\thetitle{#1}} -\def\composer#1{\def\thecomposer{#1}} -\def\arranger#1{\def\thearranger{#1}} -\def\instrument#1{\def\theinstrument{#1}} - -\def\makelilytitle{ +% 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{ \begin{center} - {\Large\bfseries\thetitle}\\ - \vskip12pt - {\scshape\theLineOne} - {\hfill\scshape\thecomposer} - \vskip4pt - {\bfseries\theLineTwo} - {\bfseries\thearranger} + \lilypondifundefined{lilyponddedication} + {} + {\normalfont\lilyponddedication\\} + + \bfseries + + \lilypondifundefined{lilypondtitle} + {} + {\huge\lilypondtitle\\} + + \lilypondifundefined{lilypondsubtitle} + {} + {\Large\lilypondsubtitle\\} + + \lilypondifundefined{lilypondsubsubtitle} + {} + {\large\lilypondsubsubtitle\\} \end{center} - \bfseries\theLineThree - \bfseries\theinstrument + \bigskip - } + + \begin{minipage}[t]{0.45\textwidth} + \lilypondifundefined{lilypondpoet} + {} + {\lilypondpoet\\} + + \lilypondifundefined{lilypondtexttranslator} + {} + {\lilypondtexttranslator\\} + + \lilypondifundefined{lilypondmeter} + {} + {\lilypondmeter\\} + \end{minipage} + + \hspace*{\fill} + + \begin{minipage}[t]{0.45\textwidth} + \begin{flushright} + \lilypondifundefined{lilypondcomposer} + {} + {\large\normalfont\scshape\lilypondcomposer\\} + + \lilypondifundefined{lilypondopus} + {} + {\lilypondopus\\} + + \lilypondifundefined{lilypondarranger} + {} + {\lilypondarranger\\} + \end{flushright} + \end{minipage} + + \par + + \lilypondifundefined{lilypondinstrument} + {} + {\centerline{\large\lilypondinstrument}} + + \lilypondifundefined{lilypondpiece} + {} + {\flushleft{\large\normalfont\lilypondpiece} + \par} + +% \leavevmode + + \global\let\lilypondopus\undefined + \global\let\lilypondpiece\undefined + \global\let\mustmakelilypondtitle\undefined +} + +\def\makelilypondpiecetitle{ + \bigskip\myfilbreak + + \lilypondifundefined{lilypondopus} + {} + {\flushright{\lilypondopus} + \par} + + \lilypondifundefined{lilypondpiece} + {} + {\flushleft{\large\normalfont\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 used in mutopia headers + +\def\theheader{ + \lilypondifundefined{lilypondhead} + {} + \lilypondhead +} + +\def\thefooter{ + \lilypondifundefined{lilypondfooter} + {} + \lilypondfooter +} + +\def\makelilypondtagline{ + \lilypondifundefined{lilypondtagline} + {} + \lilypondtagline +} + +\def\thecopyright{ + \lilypondifundefined{lilypondcopyright} + \thefooter + \lilypondcopyright +} + +% 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}}} +} + +\newcommand{\ps@firstpage}{ + \renewcommand{\@oddfoot}{ + \parbox{\textwidth}{\mbox{}\thecopyright}} + \renewcommand{\@evenfoot}{ + \@oddfoot} +} + +\newcommand{\ps@lastpage}{ + \renewcommand{\@oddfoot}{ + \parbox{\textwidth}{\mbox{}\makelilypondtagline}} + \renewcommand{\@evenfoot}{ + \@oddfoot} +} + +\makeatother + +\endlinechar \titledefsELC +\endinput