[dev-context] delimitedtext indentnext bug

Aditya Mahajan adityam at umich.edu
Mon Jun 4 06:08:05 CEST 2007


Hi,

There is a bug in delimitedtext with indentnext. For example


\setupdelimitedtext[quotation][indentnext=no]
\setupwhitespace[big]
\setupindenting[big,yes]

\starttext
\input knuth
\startquotation
   \input tufte
\stopquotation
\input knuth
\stoptext

The text after the quotation is indented. This is a bug. I think that 
this can be corrected by

\def\dostartdelimitedtextpar[#1]%
   {\let\dostopdelimitedtext\dostopdelimitedtextpar
    \doifsomething{\delimitedtextparameter\c!spacebefore}
      {\blank[\delimitedtextparameter\c!spacebefore]}%
    \delimitedtextparameter\c!before
    % nicer:
    % \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
    % \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
    % backward compatible:
    \doifelsenothing{#1}
      {\endgraf
       \doadaptleftskip {\delimitedtextparameter\c!leftmargin}%
       \doadaptrightskip{\delimitedtextparameter\c!rightmargin}%
       \let\dodostopdelimitedtextpar\endgraf}
      {\startnarrower[#1]\let\dodostopdelimitedtextpar\stopnarrower}%
    % so far
    % \dochecknextindentation{\??ci\currentdelimitedtext}% AM: not here
    \dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color\empty
    \leftdelimitedtextmark
    \ignorespaces}

\def\dostopdelimitedtextpar
   {\removeunwantedspaces
    \removelastskip
    \rightdelimitedtextmark
    \dostopattributes
    \dodostopdelimitedtextpar
    \delimitedtextparameter\c!after
    \doifsomething{\delimitedtextparameter\c!spaceafter}
      {\blank[\delimitedtextparameter\c!spaceafter]}%
    \dochecknextindentation{\??ci\currentdelimitedtext}% AM: here
    \dorechecknextindentation}%AM: This was missing!

Aditya



More information about the dev-context mailing list