bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: extra blank lines from @ifset inside @example


From: Karl Berry
Subject: Re: extra blank lines from @ifset inside @example
Date: Sat, 11 Feb 2006 18:18:36 -0600

    once again, it has a problem: some nested conditionals fail to
    parse.  The attached file demonstrates the problem.

Thanks for your continued patience and bug reports.  Here's another
attempt at a patch.  Please let me know how it does for you before I
commit this one ...

Thanks,
k

--- texinfo.tex.~1.207.~        2006-01-27 14:45:32.000000000 -0800
+++ texinfo.tex 2006-02-11 16:17:05.000000000 -0800
@@ -2978,10 +2978,8 @@
     % #1 contains the command name as a string, e.g., `ifinfo'.
     %
-    % Define a command to find the next address@hidden #1', which must be on a 
line
-    % by itself.  Ignore anything after the `#1'; this matters in
-    % verbatim environments, where otherwise the newline after an
-    % ignored conditional would result in a blank line in the output.
-    address@hidden #1##2^^M{%
+    % Define a command to find the next address@hidden #1'.
+    address@hidden #1{%
       address@hidden
+    %
     % And this command to find another #1 command, at the beginning of a
     % line.  (Otherwise, we would consider a line address@hidden @ifset', for
@@ -3019,7 +3017,12 @@
 }
 
-% Finish off ignored text.
-\def\enddoignore{\endgroup\ignorespaces}
-
+% Finish off ignored text by looking for a following \lisppar and
+% ignoring it, if present.  This happens in
+% verbatim environments, where otherwise the newline after an
+% ignored conditional would result in a blank line in the output.
+% It would be better to ignore everything to the end of the line, but
+% I'm not sure how to do that if we are *not* in a verbatim env.
+\def\enddoignore{\futurelet\next\finishignore}%
+\def\finishignore{\ifx\next\lisppar\aftergroup\gobble\fi\endgroup}
 
 % @set VAR sets the variable VAR to an empty value.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]