Monday, March 10, 2003 Bruce D'Arcus wrote:

BDA> Since I've earlier agreed with you on this Giuseppe, I'll do so here
BDA> too.

BDA> However, there seems to be something weird with this sample file.  In
BDA> the first Knuth entry, the first paragraph is not indented, while in
BDA> the second (at the end) it is.  This is a matter of trivial detail
BDA> though, and I agree with your basic request.

Actually that indent/noindent for the first line of the displayed
material was just a personal test to see if I could make it work
(so as to distinguish when the displayed material started a new
paragraph and when not --when there is indentation on the first
line it's because it starts a new paragraph ...)

Anyway, I built a "quick and dirty" patch which seems to work for
most environments which, I think, require it: itemgroups,
definitions, formulas, verbatim. You can put it in your cont-loc
between \unprotect ... \protect pairs:

=== BEGIN PATCH ===
\startvariables all
    auto: auto
\stopvariables

\def\@@stopdefinitie#1%
  {\par
   \dostopattributes
   \endgroup
   \getvalue{\??dd#1\c!na}%
   \egroup % temporary hack
   \doifvalue{\??dd#1\c!springvolgendein}\v!nee\noindentation
   \doifvalue{\??dd#1\c!springvolgendein}\v!auto\noindent}
 
\def\stopitemgroup
  {\iftextitems
     \removeunwantedspaces\space\ignorespaces
   \else
     \par
   \fi
   \ifnum\itemcolumndepth=\zerocount \dolistreference \fi % beware !
   \iffirstlist \else \endgroup \fi % toegevoegd, eerste \som opent groep
   \ifnum\itemcolumndepth=\itemlevel\relax
     \stopkolommen
     \doglobal\newcounter\itemcolumndepth
     \getitemparameter\itemlevel\c!na
   \else
     \ifnum\itemlevel=\plusone
       \doitembreak\allowbreak           % toegevoegd
       \getitemparameter1\c!na
       \doif\@@oospringvolgendein\v!nee\noindentation
       \doif\@@oospringvolgendein\v!auto\noindent
     \fi
   \fi
   \endgroup
   \doglobal\decrement(\itemlevel,\itemincrement)%
   \egroup}

\def\dostopformula
  {\doplaceformulanumber
   \getvalue{\e!stop\getvalue{\??fm\currentformula\c!variant}\e!formule}%
    \resetlastlinewidth
    \nonoindentation
    \doifvalue{\??fm\currentformula\c!springvolgendein}\v!nee\noindentation
    \doifvalue{\??fm\currentformula\c!springvolgendein}\v!auto\noindent
    \egroup}

\def\dostoptyping#1%
  {\stopverbatimcolor
     \stopopelkaar  % includes \egroup
        \getvalue{\??tp#1\c!na}%
           \doifvalue{\??tp#1\c!springvolgendein}\v!nee\noindentation
           \doifvalue{\??tp#1\c!springvolgendein}\v!auto\noindent}
            
=== END PATCH ===

Remember to issue the following instructions:

\setupformulas[indentnext=auto]
\setupitemgroups[indentnext=auto]

to make it work. No need to regenerate the formats (you may need
to refresh the filename database if you didn't have a cont-loc.tex
before that). Hans, can we hope for this to go into the core for
the next beta?

Note: while I think it should be done for quotations as well, this
seems to be a feature "in development" so I won't touch it for
now.

-- 
Giuseppe "Oblomov" Bilotta


_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to