From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31561 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: In-line syntax highlighting for type Date: Wed, 25 Oct 2006 16:28:19 +0200 Message-ID: <6faad9f00610250728s656b71a3v38b95060f9a244e4@mail.gmail.com> References: <453F184D.9090102@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1161786529 3963 80.91.229.2 (25 Oct 2006 14:28:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Oct 2006 14:28:49 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 25 16:28:45 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GcjkC-0002cb-75 for gctc-ntg-context-518@m.gmane.org; Wed, 25 Oct 2006 16:28:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AF4161FF78; Wed, 25 Oct 2006 16:28:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29032-06-3; Wed, 25 Oct 2006 16:28:27 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3BC391FF66; Wed, 25 Oct 2006 16:28:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C29061FF71 for ; Wed, 25 Oct 2006 16:28:25 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29032-06-2 for ; Wed, 25 Oct 2006 16:28:20 +0200 (CEST) Original-Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.224]) by ronja.ntg.nl (Postfix) with SMTP id 8CB901FF4E for ; Wed, 25 Oct 2006 16:28:20 +0200 (CEST) Original-Received: by hu-out-0506.google.com with SMTP id 32so1653641huf for ; Wed, 25 Oct 2006 07:28:20 -0700 (PDT) Original-Received: by 10.82.135.13 with SMTP id i13mr152679bud; Wed, 25 Oct 2006 07:28:19 -0700 (PDT) Original-Received: by 10.82.138.15 with HTTP; Wed, 25 Oct 2006 07:28:19 -0700 (PDT) Original-To: "mailing list for ConTeXt users" In-Reply-To: Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:31561 Archived-At: On 10/25/06, Aditya Mahajan wrote: > On Wed, 25 Oct 2006, Aditya Mahajan wrote: > > > On Wed, 25 Oct 2006, Hans Hagen wrote: > > > >> Aditya Mahajan wrote: > >>> Hi, > >>> > >>> How can I define a command that is the inline version of \startTEX ... > >>> \stopTEX. (I need to show inline commands in color). > >> > >> \setupcolors[state=start] > >> > >> \setuptype[option=TEX] > >> > >> \definetype[typeTEX][option=tex] > >> > >> \starttext > >> > >> \type+\type{\type is a wonderful macro}+, isn't it? > >> > >> \typeTEX+\typeTEX{\typeTEX is a wonderful macro}+, isn't it? > >> > >> \stoptext > > > > Thanks, that looks easy :-) > > > > However, there seems to be a bug, sometimes the color spills across > > the type boundary. I wanted to warn you about that, but you were faster. A workaround is to create an additional space: so to \type{\commands }like that. There are many bugs in \type-ing code, but the code is rather complex ... even Taco complaind about complexity. Hopefully lua will be able to do the task better ;) Mojca