From: Werner Lemberg Date: Sun, 20 Sep 2009 09:33:05 +0000 (+0200) Subject: [lilypond-book]: Minor documentation clarification. X-Git-Tag: release/2.13.4-1~12^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7343fa0420aefbc1f55c516a01d3879bd1474451;p=lilypond.git [lilypond-book]: Minor documentation clarification. --- diff --git a/Documentation/application/lilypond-book.itely b/Documentation/application/lilypond-book.itely index defc539e03..fa22f2e72e 100644 --- a/Documentation/application/lilypond-book.itely +++ b/Documentation/application/lilypond-book.itely @@ -320,14 +320,20 @@ is trivial. If a greater number of systems is requested, a @TeX{} conditional must be used before the @code{\endinput}. In this example, replace @q{2} by -the number of systems you want in the output, +the number of systems you want in the output. @example \def\betweenLilyPondSystem#1@{ - \ifnum##1<2\else\endinput\fi + \ifnum##1<2\else\expandafter\endinput\fi @} @end example +@noindent +(Since @code{\endinput} immediately stops the processing of the current +input file we need @code{\expandafter} to delay the call of @code{\endinput} +after executing @code{\fi} so that the @code{\if}-@code{\fi} clause is +balanced.) + Remember that the definition of @code{\betweenLilyPondSystem} is effective until @TeX{} quits the current group (such as the @LaTeX{} environment) or is overridden by another definition (which is, in @@ -345,7 +351,8 @@ This may be simplified by defining a @TeX{} macro @example \def\onlyFirstNSystems#1@{ - \def\betweenLilyPondSystem##1@{\ifnum##1<#1\else\endinput\fi@} + \def\betweenLilyPondSystem##1@{% + \ifnum##1<#1\else\expandafter\endinput\fi@} @} @end example