]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-book: Improve LaTeX wrapper.
authorWerner Lemberg <wl@gnu.org>
Thu, 1 Jan 2009 18:56:35 +0000 (19:56 +0100)
committerWerner Lemberg <wl@gnu.org>
Thu, 1 Jan 2009 18:56:35 +0000 (19:56 +0100)
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).

scripts/lilypond-book.py

index 2564aea75ffb98e0b50fc5ceb60c7c5325e6f50e..a0ee6fb0ada7e4370d4911728859dcb32e114a9e 100644 (file)
@@ -719,27 +719,27 @@ output = {
         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,