From: Christopher Creutzig <christopher@creutzig.de>
Subject: Re: An idea
Date: Sat, 03 Dec 2005 23:48:32 +0100 [thread overview]
Message-ID: <439220C0.5000007@creutzig.de> (raw)
In-Reply-To: <20051203194557.GA8903@puritan.petwork>
Nikolai Weibull wrote:
> this than I have is welcome to finish it. The \highlight command should
> be defined something like this (pseudo-tex-code):
>
> \pdef\highlight[#1]{#2}%
> {\bgroup
> \setupcolorforgroup[#1]%
> \type{#2}%
> \egroup}
>
> #1 is a group name, such as Statement, Operator, or Comment. #2 may
> contain multiple lines, and I don’t know how well this will work on the
> TeX side. It may also contain special characters like {, #, &, and so
> on. Suggestions?
The most simple one I expect to work would be
\def\highlight[#1]{%
\bgroup
\setuphighlightcolors[{#1}]% never forget those {},
% % since [] aren't balanced!
\processinlineverbatim\egroup}% \egroup is an argument to
% % \processinlineverbatim here
(I did have some mildly elaborate low-level code here, but upon
searching for the ConTeXt way of switching of everything, I came upon
\processinlineverbatim, which probably does everything you want. If it
does not, please come back and I'll send you something more low-level
that should.)
regards,
Christopher
next prev parent reply other threads:[~2005-12-03 22:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-01 16:29 Zeljko Vrba
2005-12-02 14:14 ` Hans Hagen
2005-12-02 17:43 ` Zeljko Vrba
2005-12-02 16:56 ` Nikolai Weibull
2005-12-02 17:04 ` Taco Hoekwater
2005-12-02 19:15 ` Re[2]: " Giuseppe Bilotta
2005-12-02 17:46 ` Zeljko Vrba
2005-12-02 18:43 ` Nikolai Weibull
2005-12-03 19:45 ` Nikolai Weibull
2005-12-03 22:48 ` Christopher Creutzig [this message]
2005-12-04 17:57 ` Nikolai Weibull
2005-12-04 19:00 ` Hans Hagen
2005-12-11 21:17 ` Christopher Creutzig
2005-12-04 18:59 ` Hans Hagen
2005-12-04 19:14 ` Nikolai Weibull
2005-12-04 20:38 ` Hans Hagen
2005-12-05 20:48 ` Nikolai Weibull
2005-12-06 9:11 ` Hans Hagen
2005-12-05 19:27 ` Mojca Miklavec
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=439220C0.5000007@creutzig.de \
--to=christopher@creutzig.de \
--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).