From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55839 Path: news.gmane.org!not-for-mail From: Tad Ashlock Newsgroups: gmane.comp.tex.context Subject: Re: Verbatim Text with Embedded Formatting Commands (MkIV) Date: Fri, 29 Jan 2010 16:15:08 -0700 Message-ID: <2b4e76bb1001291515s7798efecj4aac82cf12500fd6@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=000e0cd51c907e1378047e55cee3 X-Trace: ger.gmane.org 1264806955 4603 80.91.229.12 (29 Jan 2010 23:15:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2010 23:15:55 +0000 (UTC) Cc: Hans Hagen To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 30 00:15:52 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nb044-0007IJ-6G for gctc-ntg-context-518@m.gmane.org; Sat, 30 Jan 2010 00:15:48 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5FC5EC9C07; Sat, 30 Jan 2010 00:16:20 +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 vKE0Q9tMz30D; Sat, 30 Jan 2010 00:16:17 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 378D9C9AE6; Sat, 30 Jan 2010 00:16:16 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BFCD5C9AAA for ; Sat, 30 Jan 2010 00:16:10 +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 GNoG+f7x-Wa8 for ; Sat, 30 Jan 2010 00:15:46 +0100 (CET) Original-Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.211.194]) by balder.ntg.nl (Postfix) with ESMTP id 103D9C9AE6 for ; Sat, 30 Jan 2010 00:15:44 +0100 (CET) Original-Received: by ywh32 with SMTP id 32so1696813ywh.14 for ; Fri, 29 Jan 2010 15:15:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=c3X4nRdpOo9ig4fPeRYUa0augTQHiEuLTR1M+1Fyk0c=; b=TuQm0j6r1JxWVCS0hXWeBmZc3tLnjS7DWFjfAiMApiWYMlYi//nA9VqHU9ZXcaSgFT 5djphsnA7xoILdOkr06Fd4VJxoaLU1A4TQk/KNt9rfpnycDf6eEKc9m1TYIKLwlTRmaX O4ns0egGAlRhAgg/pah4s1KIfdh5z9uLSRui8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=XIwDQFyaUjij018vIHv7zcjc/hROHQHmowG9qbc4MkQCf/EGDySOpQNfcuqPuPFN6s ETizwm7CSEmGfTSyyNlCORIQdrpmIvE6CVLQOP0oUAx+JNJamPUdG6FBbZyf6H3aeBJY IBb/hFsX81zqolPcI8oXfCY4NbEiGcGAm8jjY= Original-Received: by 10.150.180.9 with SMTP id c9mr2536777ybf.268.1264806908531; Fri, 29 Jan 2010 15:15:08 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55839 Archived-At: --000e0cd51c907e1378047e55cee3 Content-Type: text/plain; charset=ISO-8859-1 Hans Hagen wrote: > On 9-1-2010 0:52, Tad Ashlock wrote: > > > ... > > you can try the beta with > > \enabletrackers[buffers.visualize] > > \starttext > > \definetyping[C] % [option=C] > \setuptyping[C][escape=yes] > > \startC > #include > int main(){ > return 0; > /BTEX{\em unreachedCode;}/ETEX > } > \stopC > > \setuptyping[escape=yes] > > \startTEX > /BTEX\em sometex/ETEX > /BTEX\em sometex/ETEX \after > \before /BTEX\em sometex/ETEX > \before /BTEX\em sometex/ETEX \after > \before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after > \before \after > \stopTEX > > \setuptyping[TEX][escape=no] > > \startTEX > /BTEX\em sometex/ETEX > /BTEX\em sometex/ETEX \after > \before /BTEX\em sometex/ETEX > \before /BTEX\em sometex/ETEX \after > \before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after > \before \after > \stopTEX > > \stoptext I did try the beta with that example and it worked, of course. But if I add a second \startC ... \stopC section, then it breaks. For example, this code (also attached as tadtest0.tex): ============================================================ \enabletrackers[buffers.visualize] \starttext \definetyping[C] % [option=C] \setuptyping[C][escape=yes] \startC #include int main(){ return 0; /BTEX{\em unreachedCode;}/ETEX } \stopC \startC printf("The second C segment doesn't work.\n"); \stopC \stoptext ============================================================ Produces this output: ============================================================ systems : begin file test.tex at line 3 !buffers : mapping 'c' visualizer onto 'typing' !buffers : setting escape range for visualizer 'C' to /BTEX -> /ETEX ! LuaTeX error ...text/tex/texmf-context/tex/context/base/buff-ini.lua:705: attempt to index local 'visualizer' (a number value) stack traceback: ...text/tex/texmf-context/tex/context/base/buff-ini.lua:705: in function 'set_escape'
:1: in main chunk. \setupcommandsintype ...rameter \c!escape \!!es )} \doinitializeverbatim ...\everyinitializeverbatim \relax \nododowithbuffer ->\egroup \doinitializeverbatim \beginofverbatimlines \ctx... l.18 \stopC ============================================================ Tad --000e0cd51c907e1378047e55cee3 Content-Type: application/x-tex; name="tadtest0.tex" Content-Disposition: attachment; filename="tadtest0.tex" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g51l9v610 XGVuYWJsZXRyYWNrZXJzW2J1ZmZlcnMudmlzdWFsaXplXQ0KDQpcc3RhcnR0ZXh0DQoNClxkZWZp bmV0eXBpbmdbQ10gJSBbb3B0aW9uPUNdDQpcc2V0dXB0eXBpbmdbQ11bZXNjYXBlPXllc10NCg0K XHN0YXJ0Qw0KI2luY2x1ZGUgPHN0ZGlvLmg+DQppbnQgbWFpbigpew0KICAgIHJldHVybiAwOw0K ICAgIC9CVEVYe1xlbSB1bnJlYWNoZWRDb2RlO30vRVRFWA0KfQ0KXHN0b3BDDQoNClxzdGFydEMN CnByaW50ZigiVGhlIHNlY29uZCBDIHNlZ21lbnQgZG9lc24ndCB3b3JrLlxuIik7DQpcc3RvcEMN Cg0KXHN0b3B0ZXh0DQo= --000e0cd51c907e1378047e55cee3 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 ___________________________________________________________________________________ --000e0cd51c907e1378047e55cee3--