]> git.donarmstrong.com Git - lilypond.git/commitdiff
[lilypond-book]: Minor documentation clarification.
authorWerner Lemberg <wl@gnu.org>
Sun, 20 Sep 2009 09:33:05 +0000 (11:33 +0200)
committerWerner Lemberg <wl@gnu.org>
Sun, 20 Sep 2009 09:33:05 +0000 (11:33 +0200)
Documentation/application/lilypond-book.itely

index defc539e03f6981cf657faf65a8239c5dde14889..fa22f2e72e7faeba0bcebb5a06fd2e040defe614 100644 (file)
@@ -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