From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/22154 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: How to customize the default verbatim colors Date: Sat, 27 Aug 2005 11:12:30 +0200 Message-ID: <43102E7E.2070301@elvenkind.com> References: <430DAA1C.9050809@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1125134113 7999 80.91.229.2 (27 Aug 2005 09:15:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 27 Aug 2005 09:15:13 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Aug 27 11:15:04 2005 Return-path: 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 1E8wlE-0003pI-5q for gctc-ntg-context-518@m.gmane.org; Sat, 27 Aug 2005 11:14:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 36A3A127FC; Sat, 27 Aug 2005 11:13:50 +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 06659-04; Sat, 27 Aug 2005 11:13:44 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 12F92127CF; Sat, 27 Aug 2005 11:13:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 308E4127CF for ; Sat, 27 Aug 2005 11:13:43 +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 06419-07 for ; Sat, 27 Aug 2005 11:13:42 +0200 (CEST) Original-Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by ronja.ntg.nl (Postfix) with ESMTP id 52DFA127C8 for ; Sat, 27 Aug 2005 11:13:41 +0200 (CEST) Original-Received: from boo.demon.nl ([82.161.175.147]:60081 helo=[192.168.1.3]) by post-22.mail.nl.demon.net with esmtp (Exim 4.51) id 1E8wkv-000EPy-Eg for ntg-context@ntg.nl; Sat, 27 Aug 2005 09:13:41 +0000 User-Agent: Mozilla Thunderbird 1.0 (X11/20050215) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:22154 Archived-At: Eugene Toporov wrote: > Thanks a lot, Taco! > > I knew there should be a good way! > Maybe it would be useful to add it to > http://contextgarden.net/Verbatim_text ? Be my guest ;-) > I also noticed that XML verbatim does not correctly handle tags with > namespace. > In the xml like the "ns" gets colored > with tag-color, the "tag" with attr-color. I think the whole "ns:tag" > should be of tag-color. How about this? %% allows XML tag names to continue after colons (namespaces) \input verb-xml % TRICK \appended\gdef\XMLsetspecials{\setpretty`\:=10 } \starttext \startXML \stopXML \stoptext %% You can use \setpretty`\:=17 instead, if you want the colon to be indistinguisable from the rest of the tag. The line I've marked 'TRICK' is needed to make sure that the original definition of \XMLsetspecials is loaded before the new addition takes place (verbatim definitions are loaded runtime). Cheers, Taco