bug-texinfo
[Top][All Lists]
Advanced

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

Re: Paragraph indentation suppression


From: Simon Law
Subject: Re: Paragraph indentation suppression
Date: Tue, 8 Apr 2003 19:42:40 -0400
User-agent: Mutt/1.3.28i

So here is my second attempt at a reasonable patch.  Thanks to Karl and
Stepan's suggestions, this one is much cleaner and far more robust.

        The only concern with it is that I do not preserve what
\everypar is set to.  There are only three other occurrances of
\everypar in the source, so it doesn't seem like too much of an issue.
Perhaps someone could make a suggestion as to how we should handle this?

        I have tested my implementation against Using the GCC, and it
looks fine.  This applies cleanly to CVS HEAD.

Simon

Index: texinfo.tex
===================================================================
RCS file: /cvsroot/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.67
diff -u -r1.67 texinfo.tex
--- texinfo.tex 22 Mar 2003 16:50:15 -0000      1.67
+++ texinfo.tex 8 Apr 2003 23:37:44 -0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2003-03-22.08}
+\def\texinfoversion{2003-04-08.19}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
@@ -608,7 +608,7 @@
     % and the first line afterwards is too small.  But we can't put the
     % strut in \Egroup, since there it would be on a line by itself.
     % Hence this just inserts a strut at the beginning of each line.
-    \everypar = {\strut}%
+    \everypar = {\killfirstindent\strut}%
     %
     % Since we have a strut on every line, we don't need any of TeX's
     % normal interline spacing.
@@ -866,6 +866,26 @@
   \parindent = \defaultparindent
 }
 
+% @firstparagraphindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+\let\surpressfirstparagraphindent=\relax
+\let\killfirstindent=\relax
+\newdimen\currentparindent
+\gdef\surpressword{surpress}
+\gdef\firstparagraphindent{\parsearg\dofirstparagraphindent}
+\gdef\dofirstparagraphindent#1{%
+  \def\temp{#1}%
+  \ifx\temp\surpressword
+    \gdef\surpressfirstparagraphindent{%
+      \gdef\killfirstindent{%
+        \kern-\parindent
+        \let\killfirstindent=\relax
+      }%
+      \everypar = {\killfirstindent}%
+    }%
+  \fi
+}
+
 % @exampleindent NCHARS
 % We'll use ems for NCHARS like @paragraphindent.
 % It seems @exampleindent asis isn't necessary, but
@@ -3721,6 +3741,7 @@
     \numberedsubsubseczzz{#2}
   \fi
 \fi
+\surpressfirstparagraphindent
 }
 
 % like \numhead, but chooses appendix heading levels
@@ -3740,6 +3761,7 @@
     \appendixsubsubseczzz{#2}
   \fi
 \fi
+\surpressfirstparagraphindent
 }
 
 % like \numhead, but chooses numberless heading levels
@@ -3759,6 +3781,7 @@
     \unnumberedsubsubseczzz{#2}
   \fi
 \fi
+\surpressfirstparagraphindent
 }
 
 % @chapter, @appendix, @unnumbered.
@@ -4758,7 +4781,7 @@
   % make each space count
   % must do in this order:
   \obeylines \uncatcodespecials \sepspaces
-  \everypar{\starttabbox}%
+  \everypar{\killfirstindent\starttabbox}%
 }
 
 % Do the @verb magic: verbatim text is quoted by unique 
@@ -6198,7 +6221,7 @@
   %
   % Hang the footnote text off the number.  Use \everypar in case the
   % footnote extends for more than one paragraph.
-  \everypar = {\hang}%
+  \everypar = {\killfirstindent\hang}%
   \textindent{\thisfootno}%
   %
   % Don't crash into the line above the footnote text.  Since this




reply via email to

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