From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/86212 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: suggestion on [option=TEX] Date: Fri, 7 Feb 2014 00:36:19 +0100 Message-ID: References: <52F287F0.9060902@gmx.es> <3F1F8792-209A-4030-8D2D-509587A615B3@gmail.com> <52F3D477.90507@gmx.es> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: multipart/mixed; boundary="===============1220867054==" X-Trace: ger.gmane.org 1391729811 13356 80.91.229.3 (6 Feb 2014 23:36:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Feb 2014 23:36:51 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Feb 07 00:36:59 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WBYV8-0007Rw-4R for gctc-ntg-context-518@m.gmane.org; Fri, 07 Feb 2014 00:36:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6B5D2101FB; Fri, 7 Feb 2014 00:36:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FI5J6cR1hQhw; Fri, 7 Feb 2014 00:36:52 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 772D4101EB; Fri, 7 Feb 2014 00:36:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 02AB6101EB for ; Fri, 7 Feb 2014 00:36:50 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Yo2tCXzT9kLP for ; Fri, 7 Feb 2014 00:36:38 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id E8DD9101E1 for ; Fri, 7 Feb 2014 00:36:28 +0100 (CET) Original-Received: from mail-bk0-x22c.google.com (mail-bk0-x22c.google.com [IPv6:2a00:1450:4008:c01::22c]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s16NaP8M004043 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 7 Feb 2014 00:36:25 +0100 Original-Received: by mail-bk0-f44.google.com with SMTP id mz12so836157bkb.17 for ; Thu, 06 Feb 2014 15:36:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=N59h5sDw91M1Ck5btec6jLF14VhiW67p4mX/pD6fbyM=; b=bjoJRP9iEEE4AFV1mByWRM4TNxOmhmVxXSubrbztGCmJlZATO8iOvb/XGBZnES/LWe ZW1WsPwfjyKW8OFIlQBf3/Qe6gKu7CUNYuHcrFiIbTS36fwn0Ym8+8DLvTirjMQR9CVL LWjeeaJ9Y90ALwPiXP+Ob4PMX79FfyQQM3Pb/2M4PPzokDJUxCkqVeVQUGmDZBdh+HkV VJJlLwCSxglpdIMRVQFoOvJOyvsFG790MVIkg+Bjgoa+kRNvxzTJaP/L41x9AE9oMIOW /NkUX3gXVdnaMsVzXLtCJ5AnYPLICxNQ8w4cX8bJGqGid+YrqDaBT/1eYUeCVM4cq77X sXDA== X-Received: by 10.204.172.71 with SMTP id k7mr6532818bkz.7.1391729784851; Thu, 06 Feb 2014 15:36:24 -0800 (PST) Original-Received: from keima.localdomain (x2f2560f.dyn.telefonica.de. [2.242.86.15]) by mx.google.com with ESMTPSA id f3sm2670538bkk.4.2014.02.06.15.36.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Feb 2014 15:36:20 -0800 (PST) In-Reply-To: <52F3D477.90507@gmx.es> X-Mailer: Apple Mail (2.1827) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:4008:c01::22c; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03LnbApjD - d36dc07bb6ea - 20140207 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:86212 Archived-At: --===============1220867054== Content-Type: multipart/alternative; boundary="Apple-Mail=_16476E16-F6F1-4C8F-8FA4-5CE426C1E3A7" --Apple-Mail=_16476E16-F6F1-4C8F-8FA4-5CE426C1E3A7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 06.02.2014 um 19:29 schrieb Pablo Rodriguez : > On 02/06/2014 12:57 AM, Wolfgang Schuster wrote: >> Am 05.02.2014 um 19:50 schrieb Pablo Rodriguez : >>=20 >>> Hi Hans, >>>=20 >>> I have the following sample: >>>=20 >>> \setuptyping[option=3DTEX] >>> \starttext >>> \starttyping >>> \input zapf % knuth >>> \stoptyping >>> \stoptext >>>=20 >>> The percent character is in bold font and gray color, but the rest = of >>> the commented text isn=92t. >>> [...] >>=20 >> http://pragma-ade.com/general/magazines/mag-1102.pdf >=20 > Many thanks for your reply, Wolfgang. >=20 > After reading the document, I think it could be achieved with: >=20 > \definefontfamily[mainface][mono][DejaVu Sans Mono] > \setupbodyfont[mainface] > \defineprocessor[myescape][style=3Dbold,color=3Dgray, left=3D\%] > \setuptyping[TEX][escape=3Dmyescape->{\%}] > \starttext > \startTEX > This is a c%omment. >=20 > % And this is another one. >=20 > \command > [with colored] > {brackets} > \stopTEX > \stoptext >=20 > But this doesn=92t work. I must be missing something obvious. >=20 > What am I doing wrong here? >=20 > Many thanks for your help, You have to add a comma after \letterpercent. You should also be careful = with the text in the comments because commands are expanded, e.g. take a look at the \TeX in the comment. \setupbodyfont[dejavu] \defineprocessor[myescape][style=3D\ttbf,color=3Dgray,left=3D{\letterperce= nt}] \setuptyping[TEX][escape=3Dmyescape->{\letterpercent,}] \starttext \startTEX This is \TeX\ code % and this is a \TeX\ comment. \stopTEX \stoptext Wolfgang= --Apple-Mail=_16476E16-F6F1-4C8F-8FA4-5CE426C1E3A7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Am 06.02.2014 um 19:29 schrieb Pablo = Rodriguez <oinos@gmx.es>:

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=3DTEX]
\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=92t.
[...]

http://pragm= a-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=3Dbo= ld,color=3Dgray, = left=3D\%]
\setuptyping[TEX][escape=3Dmyescape->{\%}]
\starttext<= br>\startTEX
This is a c%omment.

% And this is another = one.

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

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

What am I = doing wrong here?

Many thanks for your = help,

You have to add a = comma after \letterpercent. You should also be careful = with
the text in the comments because commands are expanded, = e.g. take a look
at the \TeX in the = comment.

\setupbodyfont[dejavu]

\defineprocessor[myescape][style=3D\ttbf,color=3Dgray,left=3D{\letterper= cent}]

\setuptyping[TEX][escape=3Dmyescape->{\= letterpercent,}]

\starttext
\startTEX
This is \TeX\ code % and this is a \TeX\ = comment.
\stopTEX
\stoptext

=
Wolfgang
= --Apple-Mail=_16476E16-F6F1-4C8F-8FA4-5CE426C1E3A7-- --===============1220867054== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1220867054==--