From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24082 Path: news.gmane.org!not-for-mail From: Christopher Creutzig Newsgroups: gmane.comp.tex.context Subject: Re: An idea Date: Sat, 03 Dec 2005 23:48:32 +0100 Message-ID: <439220C0.5000007@creutzig.de> References: <20051201162914.GA14497@fly.srk.fer.hr> <20051202165636.GA8858@puritan.petwork> <20051202174653.GB3376@fly.srk.fer.hr> <20051202184337.GB8858@puritan.petwork> <20051203194557.GA8903@puritan.petwork> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1133650407 17977 80.91.229.2 (3 Dec 2005 22:53:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 3 Dec 2005 22:53:27 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Dec 03 23:53:25 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 1EigEk-0007Sq-Kd for gctc-ntg-context-518@m.gmane.org; Sat, 03 Dec 2005 23:52:10 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1CD461278F; Sat, 3 Dec 2005 23:52:10 +0100 (CET) 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 08466-01; Sat, 3 Dec 2005 23:52:09 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8B6C0127B9; Sat, 3 Dec 2005 23:48:36 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7ADAD127B9 for ; Sat, 3 Dec 2005 23:48:34 +0100 (CET) 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 08202-07 for ; Sat, 3 Dec 2005 23:48:33 +0100 (CET) Original-Received: from bayes.math.uni-paderborn.de (bayes.math.uni-paderborn.de [131.234.116.40]) by ronja.ntg.nl (Postfix) with ESMTP id 7F918127B7 for ; Sat, 3 Dec 2005 23:48:33 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by bayes.math.uni-paderborn.de (Postfix) with ESMTP id 7993DE000124 for ; Sat, 3 Dec 2005 23:48:32 +0100 (CET) Original-Received: from bayes.math.uni-paderborn.de ([127.0.0.1]) by localhost (bayes [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15868-01 for ; Sat, 3 Dec 2005 23:48:30 +0100 (CET) Original-Received: from [192.168.1.3] (p548B3CE5.dip0.t-ipconnect.de [84.139.60.229]) by bayes.math.uni-paderborn.de (Postfix) with ESMTP id 6C9D0E00011C for ; Sat, 3 Dec 2005 23:48:30 +0100 (CET) User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.10) Gecko/20050716 Thunderbird/1.0.6 Mnenhy/0.7.2.0 X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <20051203194557.GA8903@puritan.petwork> X-Enigmail-Version: 0.92.0.0 X-Virus-Scanned: by mailscan-system at math.uni-paderborn.de 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24082 Archived-At: Nikolai Weibull wrote: > this than I have is welcome to finish it. The \highlight command shoul= d > be defined something like this (pseudo-tex-code): >=20 > \pdef\highlight[#1]{#2}% > {\bgroup > \setupcolorforgroup[#1]% > \type{#2}% > \egroup} >=20 > #1 is a group name, such as Statement, Operator, or Comment. #2 may > contain multiple lines, and I don=92t know how well this will work on t= he > TeX side. It may also contain special characters like {, #, &, and so > on. Suggestions? The most simple one I expect to work would be \def\highlight[#1]{% \bgroup \setuphighlightcolors[{#1}]% never forget those {}, % % since [] aren't balanced! \processinlineverbatim\egroup}% \egroup is an argument to % % \processinlineverbatim here (I did have some mildly elaborate low-level code here, but upon searching for the ConTeXt way of switching of everything, I came upon \processinlineverbatim, which probably does everything you want. If it does not, please come back and I'll send you something more low-level that should.) regards, Christopher