ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Possible bug in verbatim
Date: Fri, 15 Apr 2005 11:52:34 +0200	[thread overview]
Message-ID: <425F8EE2.6080406@wxs.nl> (raw)
In-Reply-To: <425F63AB.7070906@elvenkind.com>

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

  reply	other threads:[~2005-04-15  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-15  3:21 Idris Samawi Hamid
2005-04-15  6:48 ` Taco Hoekwater
2005-04-15  9:52   ` Hans Hagen [this message]
2005-04-15 20:05 ` Willi Egger
2005-04-15 21:19 ` Nikolai Weibull
2005-04-16 17:04 Idris Samawi Hamid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425F8EE2.6080406@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).