ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* RE: Possible bug in verbatim
@ 2005-04-16 17:04 Idris Samawi Hamid
  0 siblings, 0 replies; 6+ messages in thread
From: Idris Samawi Hamid @ 2005-04-16 17:04 UTC (permalink / raw)


Hi Willi
>===== Original Message From Willi Egger <w.egger@boede.nl> =====
>Hi Idris,
>
>Asking for brace-trickery ...
>
>What about: \textbraceleft\type{A}\textbraceright

Wow! that's ingenious;)

Thank you Willi, Taco, and Hans for your help on this.

best
Idris

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug in verbatim
  2005-04-15  3:21 Idris Samawi Hamid
  2005-04-15  6:48 ` Taco Hoekwater
  2005-04-15 20:05 ` Willi Egger
@ 2005-04-15 21:19 ` Nikolai Weibull
  2 siblings, 0 replies; 6+ messages in thread
From: Nikolai Weibull @ 2005-04-15 21:19 UTC (permalink / raw)


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);}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug in verbatim
  2005-04-15  3:21 Idris Samawi Hamid
  2005-04-15  6:48 ` Taco Hoekwater
@ 2005-04-15 20:05 ` Willi Egger
  2005-04-15 21:19 ` Nikolai Weibull
  2 siblings, 0 replies; 6+ messages in thread
From: Willi Egger @ 2005-04-15 20:05 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug in verbatim
  2005-04-15  6:48 ` Taco Hoekwater
@ 2005-04-15  9:52   ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-04-15  9:52 UTC (permalink / raw)


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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible bug in verbatim
  2005-04-15  3:21 Idris Samawi Hamid
@ 2005-04-15  6:48 ` Taco Hoekwater
  2005-04-15  9:52   ` Hans Hagen
  2005-04-15 20:05 ` Willi Egger
  2005-04-15 21:19 ` Nikolai Weibull
  2 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2005-04-15  6:48 UTC (permalink / raw)


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)

Taco

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Possible bug in verbatim
@ 2005-04-15  3:21 Idris Samawi Hamid
  2005-04-15  6:48 ` Taco Hoekwater
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Idris Samawi Hamid @ 2005-04-15  3:21 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-04-16 17:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-16 17:04 Possible bug in verbatim Idris Samawi Hamid
  -- strict thread matches above, loose matches on Subject: below --
2005-04-15  3:21 Idris Samawi Hamid
2005-04-15  6:48 ` Taco Hoekwater
2005-04-15  9:52   ` Hans Hagen
2005-04-15 20:05 ` Willi Egger
2005-04-15 21:19 ` Nikolai Weibull

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).