ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: fix for verbatim
Date: Wed, 09 Nov 2005 10:55:28 +0100	[thread overview]
Message-ID: <4371C790.2060408@wxs.nl> (raw)

The following patch

\unprotect

\let\protectedfirsttype\string

\bgroup
\catcode`\[=\@@begingroup
\catcode`\]=\@@endgroup
\catcode`\{=\@@active
\catcode`\}=\@@active
\gdef\initializetypegrouping%
  [\catcode`\{=\@@active
   \catcode`\}=\@@active
   \let\normalactivebgroup{%
   \let\normalactiveegroup}%
   \def\activeleftargument%
     [\bgroup
      \let}\activerightargument
      \normalactivebgroup
     ]%
   \def\activerightargument%
     [\normalactiveegroup
      \egroup]%
   \let{=\activeleftargument
   \let}=\egroup
  ]
\egroup

\protect

works ok for

\setupcolors[state=start]
\setuptype[option=color]
\setuptyping[option=color]
\setupwhitespace[big]

\starttext

\starttyping
x\pdfoutput{xx} {nn}
\pdfoutput{xx} {nn}
\stoptyping

\type{x\pdfoutput {xx} {nn}}
\type{x\pdfoutput{xx} {nn}}
\type{x\pdfoutput{xx} {nn}}

\stoptext

but no coloring here:

\starttabulate[|l|]
\NC \type{\pdfoutput {xx}{,,}}  \NC\NR
\NC \type{\pdfoutput{xx}{,,}}  \NC\NR
\NC \type{{xx}{,,}}  \NC\NR
\stoptabulate

beware: since in tabulate args are passed, the { } in \type are seen as 
grouping tokens and disappear.

i'll try to make up a solution (no way around space after \cs then, 
unless taco fixes tex -)

Hans

             reply	other threads:[~2005-11-09  9:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09  9:55 Hans Hagen [this message]
2005-11-09 10:33 ` Hans Hagen
2005-11-09 17:33   ` Peter Münster
2005-11-10 12:57     ` Hans Hagen

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=4371C790.2060408@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).