]> git.donarmstrong.com Git - lilypond.git/blobdiff - tex/titledefs.tex
release: 1.2.17
[lilypond.git] / tex / titledefs.tex
index 420f5fe9ac247bc1ac52e4aaf122f30302147524..5b02ba912f9ce46da21a2b5c0c74d9fc0c8b6eaa 100644 (file)
 \def\theinstrument{}
 \def\theopus{}
 \def\thepiece{}
+\def\themeter{}
+\def\thepoet{}
 %
 % duh.  LaTeX has a \title too.
-\renewcommand*{\title}[1]{\def\thetitle{#1\\}}
-\newcommand*{\subtitle}[1]{\def\thesubtitle{#1\\}}
-\newcommand*{\composer}[1]{\def\thecomposer{#1\\}}
+\renewcommand*{\title}[1]{\def\thetitle{#1}}
+\newcommand*{\subtitle}[1]{\def\thesubtitle{#1}}
+\newcommand*{\composer}[1]{\def\thecomposer{#1}}
 \newcommand*{\arranger}[1]{\def\thearranger{#1}}
 \newcommand*{\instrument}[1]{\def\theinstrument{#1}}
 \newcommand*{\opus}[1]{\def\theopus{#1}}
 \newcommand*{\piece}[1]{\def\thepiece{#1}}
+\newcommand*{\meter}[1]{\def\themeter{#1}}
+\newcommand*{\poet}[1]{\def\thepoet{#1}}
 %
-\newcommand*{\mudelatitle}[1]{\def\thetitle{#1\\}}
-\newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1\\}}
-\newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1\\}}
+\newcommand*{\mudelatitle}[1]{\def\thetitle{#1}}
+\newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1}}
+\newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1}}
 \newcommand*{\mudelaarranger}[1]{\def\thearranger{#1}}
 \newcommand*{\mudelainstrument}[1]{\def\theinstrument{#1}}
 \newcommand*{\mudelaopus}[1]{\def\theopus{#1}}
 \newcommand*{\mudelapiece}[1]{\def\thepiece{#1}}
+\newcommand*{\mudelametre}[1]{\def\themeter{#1}}
+\newcommand*{\mudelameter}[1]{\def\themeter{#1}}
+\newcommand*{\mudelapoet}[1]{\def\thepoet{#1}}
 %
-\def\makelilytitle
-{
-  {\center\bfseries\center\sethuge{\thetitle}}
-        \par
-       {\center\bfseries\setLarge{\thesubtitle}}
+%
+\def\mudelanull{}%
+%
+\def\makelilytitle{%
+  \begin{center}
+        \bfseries
+        \ifx\mudelanull\thetitle\else{\huge\thetitle}\\ \fi
+        \ifx\mudelanull\thesubtitle\else{\Large\thesubtitle}\\ \fi
+  \end{center}
   \bigskip
-  {\flushright\setlarge{\normalfont\scshape\thecomposer}\par}
   % urg
   \edef\saveparskip{\parskip}\parskip-5mm
-  {\flushright\settext{\theopus}\par}
-  {\flushright\settext{\thearranger}\par}
+  \begin{minipage}[t]{0.45\textwidth}
+        \ifx\mudelanull\thepoet\else{\thepoet}\\ \fi
+        \ifx\mudelanull\themeter\else{\themeter}\\ \fi
+  \end{minipage}\hspace*{\fill}
+  \begin{minipage}[t]{0.45\textwidth}
+      \begin{flushright}
+          \ifx\mudelanull\thecomposer\else{\large\normalfont\scshape\thecomposer}\\ \fi
+          \ifx\mudelanull\theopus\else{\theopus}\\ \fi
+          \ifx\mudelanull\thearranger\else{\thearranger}\\ \fi
+        \end{flushright}%
+  \end{minipage}\par
   \parskip\saveparskip
-  {\center\setlarge{\theinstrument}\par}
-  {\flushleft\setLarge{\normalfont\scshape\thepiece}}
+  {\center{\large\theinstrument}\par}
+  {\flushleft{\large\normalfont\scshape\thepiece}}
+%  \leavevmode
+  \global\let\theopus\relax%
+  \global\let\thepiece\relax%
 }
 \def\makelilypiecetitle
 {
   \bigskip
-  {\flushright\settext{\theopus}\par}
-  {\flushleft\setLarge{\normalfont\scshape\thepiece}}
+  {\flushright{\theopus}\par}
+  {\flushleft{\large\normalfont\scshape\thepiece}}
+  \global\let\theopus\relax%
+  \global\let\thepiece\relax%
 }
 \endinput