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 11:17:56 -0400
User-agent: Mutt/1.3.28i

On Tue, Apr 08, 2003 at 04:04:21PM +0200, Stepan Kasal wrote:
> On Tue, Apr 08, 2003 at 09:35:31AM -0400, Simon Law wrote:
> > 1. Preserve \everypar
> > 2. Save \parindent and set it to 0pt
> > 3. Redefine \everypar such that it:
> >    a) Redefines \everypar again such that it:
> >       i)   Restores \parindent
> >       ii)  Restores \everypar
> >       iii) Runs \everypar
> >    b) Runs the preserved \everypar
> 
> if I understand it correctly, then you use two levels to handle
> the title first, then the first paragraph of the text.
> 
> I would try the following approach instead:
> 
> Consider:
>       \outer\def\numberedsec{\parsearg\secyyy}
> 
> If we hook to \secyyy (or \seczzz, or whatever), instead of the
> original \numberedsec, we could redefine \everypar _after_ the
> section title has been printed, so we can use only one level of
> \everypar redefining instead of two.

        Hmm.  I don't see how we can avoid the second redefinition,
since we want \parindent to be restored on the second paragraph, and not
the first.  (Which would be rather useless.)

> I'm sorry I don't have time to try it.  So I'm not absolutely
> sure whether this approach works and whether it'll give more
> elegant result then your one.
> 
> I'll be very glad if you try this and tell me what happened.
>        ;-)

        I think I will try it out.

> Happy hacking,
>       Stepan Kasal
> 
> PS:
> if the above was not possible, we could try this:
> 1. Preserve \par
> 2. Redefine \par, so that it:
>       a) restores \par
>       b) preserves \everypar
>       c) redefines \everypar so that it:
>               i)   does \kern-\parskip
>               ii)  restores \everypar
>               iii) runs \everypar
> 
> The idea is that we can be sure that first \par appears just after
> the section title.  That \par can perform one-level \everypar trick.

        Well, right now, no \par appears after the section title.  But
it's rather trivial just to put the \par in there.  It seems that this
second method is fine as well.  Although we'd probably want d) Runs \par.

Simon




reply via email to

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