[NTG-context] quotation/blockquote bug

Wolfgang Schuster schuster.wolfgang at googlemail.com
Fri Dec 28 00:15:22 CET 2007


On Thu, 27 Dec 2007 14:32:59 -0700
"Idris Samawi Hamid" <ishamid at colostate.edu> wrote:

> Dear syndicate,
> 
> There is a bug in \quotation and/or \blockquote (pdf attached): there is a  
> spurious dbl-quote mark at the end of the par that only occurs when  
> \quotation is invoked.
> 
> Please advise, workarounds welcome :-)
> 
> Best wishes
> Idris
> 
> ============================
> % engine=luatex
> 
> \starttext
> 
> \startblockquote
> The now also must be indivisible: that is, the now in the essential
> and primary sense in which the now is inherent in all time; not,
> indeed, the now in the derived sense of a period of time…This now,
> which functions as the border between both past and future, must,
> indeed, be identical….If the now were separate limits [of both the
> past and the future], there would be a time between them, since
> every [real] continuum must have something of the same kind between
> its limits; and the time between them would be divisible, since we
> have proved that all time is divisible. Accordingly, the now would
> be divisible [and it would not, then, be the now we are talking
> about]….Thus, it is clear that time includes something indivisible,
> which we call a \quotation{now.} Obviously, too, nothing can be
> moving during a now.
> \stopblockquote
> 
> \stoptext

Your example is too long, I could reproduce this also with the folowing
short example.

\startquotation text \quote{text} text\stopquotation

The wrong right values did only appear if you use singlecommand
quotations within a quotation environment.

The push and popdelimitedtext macros did not work correct in this case
and ConTeXt thinks there current environment is "quotation" and not
"blockquote" when it reaches the \stopblockquote command.

A group around the single quote command helps, you core macros would
look like:

\unprotect

\def\delimitedtext[#1]%
  {\bgroup
   \pushdelimitedtext{#1}%
   \doifelse{\delimitedtextparameter\c!method}\s!font
     {\dofontdrivendelimited}
     {\doifinsetelse{\delimitedtextparameter\c!location}{\v!paragraph,
\v!margin}% \dodelimitedtextpar\dodelimitedtexttxt}}

\unexpanded\def\dodelimitedtextpar
  {\dohandleleftdelimitedtext\c!left\relax
   \groupedcommand
     \donothing
     {\dohandlerightdelimitedtext\c!right\removelastskip
      \popdelimitedtext
      \egroup}}

\def\doquoteddelimited
  {\dohandleleftdelimitedtext\c!left\relax
   \groupedcommand
     \donothing
     {\dohandlerightdelimitedtext\c!right
      \removelastskip
      \popdelimitedtext
      \egroup}}

\def\doattributeddelimited
  {\groupedcommand
     {\dostartattributes{\??ci\currentdelimitedtext}\c!style\c!color}
     {\dostopattributes
      \popdelimitedtext
      \egroup}}

\protect

I added in the macros above only a \bgroup in \delimitedtext and a
\egroup in every of the other three commands.

Wolfgang
 


More information about the ntg-context mailing list