Possible bug in verbatim
Dear cartel, There is an apparent bug in the verbatim mechanism. In the following example, the `A' is typed but the curly brackets are not typed after \head. \type works as expected in the other two instances. I tried \relax (and a couple of other hacks) but that does not help. Please advise. Thnx in advance Idris ========================= % output=pdf interface=en \type{ {A} } \startitemize \head\relax \type{ {A} } \type{ {A} } \stopitemize \bye ========================= ============================ Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
Taco Hoekwater wrote:
Idris Samawi Hamid wrote:
Dear cartel,
\head\relax \type{ {A} }
Not a solution, but a workaround:
\head\relax \expandafter\type\scantokens{{ {A} }}
(I don't know how to solve this)
I do, but i have no idea how robust it is ... % in cont-new.tex \unprotect \def\dostartitemattributes#1{\dostartattributes{\??op\currentitemgroup#1}} \def\dostopitemattributes {\dostopattributes} \def\complexdoitemgrouphead[#1]% beter in \complexdosom hangen met een if {\iffirstlist\else\doitembreak\allowbreak\fi \ifpackeditems\else\getitemparameter\itemlevel\c!beforehead\fi \iffirstlist\ifitemintro\else\ifcase\itemlevel % incr in \complexdosom \doitembreak\allowbreak \fi\fi\fi \complexdoitemgroupitem[#1]% \bgroup \dostartitemattributes\itemlevel\c!headstyle\c!headcolor\empty \ignorespaces \let\par\enditemhead} % brrrr but simple anyway \def\enditemhead {\removeunwantedspaces \dostopitemattributes \egroup \iftextitems \space\ignorespaces \else \par \fi \doitembreak\nobreak \ifpackeditems\else\getitemparameter\itemlevel\c!afterhead\fi \doitembreak\nobreak \noindentation} \protect % test file \starttext \setupitemgroup[itemize][1][headcolor=red,headstyle=bold] \setupcolors[state=start] (\type{ {A} }) \startitemize \head \input tufte (\type{ {A} }) \input tufte \par \input tufte \item \input tufte (\type{ {A} }) \input tufte \stopitemize \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Idris, Asking for brace-trickery ... What about: \textbraceleft\type{A}\textbraceright Kind regards Willi (member of the gang) Idris Samawi Hamid wrote:
Dear cartel,
There is an apparent bug in the verbatim mechanism. In the following example, the `A' is typed but the curly brackets are not typed after \head. \type works as expected in the other two instances. I tried \relax (and a couple of other hacks) but that does not help. Please advise.
Thnx in advance Idris
========================= % output=pdf interface=en
\type{ {A} }
\startitemize
\head\relax \type{ {A} }
\type{ {A} }
\stopitemize
\bye =========================
============================ Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Idris Samawi Hamid, April 14:
\type{ {A} }
Wait, what? You can have nested braces in \type? I had no idea! That actually saves me a lot of trouble, thanks, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
participants (5)
-
Hans Hagen
-
Idris Samawi Hamid
-
Nikolai Weibull
-
Taco Hoekwater
-
Willi Egger