[Top][All Lists]
[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:58:56 -0400 |
User-agent: |
Mutt/1.3.28i |
On Tue, Apr 08, 2003 at 07:42:40PM -0400, Simon Law wrote:
> 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.
Come to think of it, I'm not _sure_ I should be using all those
\gdefs instead of \def. I think some meditation on this issue is in
order.
If someone encloses something in an @iftex...
@iftex
@chapter Only in TeX
@end iftex
Now we shall write something.
It will come out completely wrong unless \killfirstindent is
\gdef so that seems right. But what about \surpressfirstparagraphindent?
And I know that \surpressword, @firstparagraphindent and
\dofirstparagraphindent ought ot be plain old \def since we expect
@firstparagraphindent to be a global document option.
Hmm... The following revised implementation is better.
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:57:22 -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
+\def\surpressword{surpress}
+\def\firstparagraphindent{\parsearg\dofirstparagraphindent}
+\def\dofirstparagraphindent#1{%
+ \def\temp{#1}%
+ \ifx\temp\surpressword
+ \gdef\surpressfirstparagraphindent{%
+ \gdef\killfirstindent{%
+ \kern-\parindent
+ \global\let\killfirstindent=\relax
+ }%
+ \global\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
- Paragraph indentation suppression, Simon Law, 2003/04/07
- Re: Paragraph indentation suppression, Karl Berry, 2003/04/07
- Re: Paragraph indentation suppression, Simon Law, 2003/04/07
- Re: Paragraph indentation suppression, Stepan Kasal, 2003/04/08
- Re: Paragraph indentation suppression, Simon Law, 2003/04/08
- Re: Paragraph indentation suppression, Stepan Kasal, 2003/04/08
- Re: Paragraph indentation suppression, Simon Law, 2003/04/08
- Re: Paragraph indentation suppression, Simon Law, 2003/04/08
- Re: Paragraph indentation suppression,
Simon Law <=
- Re: Paragraph indentation suppression, Simon Law, 2003/04/08
- Re: Paragraph indentation suppression, Stepan Kasal, 2003/04/09
- Re: Paragraph indentation suppression, Simon Law, 2003/04/09
- Re: Paragraph indentation suppression, Stepan Kasal, 2003/04/10
- Re: Paragraph indentation suppression, Simon Law, 2003/04/12
- Re: Paragraph indentation suppression, Simon Law, 2003/04/12
- Re: Paragraph indentation suppression, Simon Law, 2003/04/12
- Re: Paragraph indentation suppression, Stepan Kasal, 2003/04/13
- Re: Paragraph indentation suppression, Simon Law, 2003/04/14
- Re: Paragraph indentation suppression, Simon Law, 2003/04/16