Using `\expandafter' ensures that the if-clause is finished before executing
the \{pre,post}LilyPondExample hooks. This allows usage of other TeX
conditionals within those two macros without getting warnings (or even hard
to find errors in case of more complex macros).
OUTPUT: r'''{%%
\parindent 0pt
\ifx\preLilyPondExample \undefined
- \relax
\else
- \preLilyPondExample
+ \expandafter\preLilyPondExample
\fi
\def\lilypondbook{}%%
\input %(base)s-systems.tex
\ifx\postLilyPondExample \undefined
- \relax
\else
- \postLilyPondExample
+ \expandafter\postLilyPondExample
\fi
}''',
PRINTFILENAME: '''\\texttt{%(filename)s}
''',
- QUOTE: r'''\begin{quotation}%(str)s
+ QUOTE: r'''\begin{quotation}
+%(str)s
\end{quotation}''',
VERBATIM: r'''\noindent
-\begin{verbatim}%(verb)s\end{verbatim}''',
+\begin{verbatim}%(verb)s\end{verbatim}
+''',
VERSION: program_version,