ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: suggestion on [option=TEX]
Date: Thu, 06 Feb 2014 19:29:11 +0100	[thread overview]
Message-ID: <52F3D477.90507@gmx.es> (raw)
In-Reply-To: <3F1F8792-209A-4030-8D2D-509587A615B3@gmail.com>

On 02/06/2014 12:57 AM, Wolfgang Schuster wrote:
> Am 05.02.2014 um 19:50 schrieb Pablo Rodriguez <oinos@gmx.es>:
> 
>> Hi Hans,
>>
>> I have the following sample:
>>
>> \setuptyping[option=TEX]
>> \starttext
>> \starttyping
>> \input zapf % knuth
>> \stoptyping
>> \stoptext
>>
>> The percent character is in bold font and gray color, but the rest of
>> the commented text isn’t.
>> [...]
> 
> http://pragma-ade.com/general/magazines/mag-1102.pdf

Many thanks for your reply, Wolfgang.

After reading the document, I think it could be achieved with:

\definefontfamily[mainface][mono][DejaVu Sans Mono]
\setupbodyfont[mainface]
\defineprocessor[myescape][style=bold,color=gray, left=\%]
\setuptyping[TEX][escape=myescape->{\%}]
\starttext
\startTEX
This is a c%omment.

% And this is another one.

\command
  [with colored]
  {brackets}
\stopTEX
\stoptext

But this doesn’t work. I must be missing something obvious.

What am I doing wrong here?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2014-02-06 18:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 18:50 Pablo Rodriguez
2014-02-05 23:57 ` Wolfgang Schuster
2014-02-06 18:29   ` Pablo Rodriguez [this message]
2014-02-06 23:36     ` Wolfgang Schuster
2014-02-12 20:10       ` Pablo Rodriguez

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=52F3D477.90507@gmx.es \
    --to=oinos@gmx.es \
    --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).