From 229244c14ea3a7dae98c2bd5511106c75e729613 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 1 Jan 2009 19:56:35 +0100 Subject: [PATCH] lilypond-book: Improve LaTeX wrapper. 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 2564aea75f..a0ee6fb0ad 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -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, -- 2.39.2