From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16594 Path: main.gmane.org!not-for-mail From: kopszak@mnw.art.pl (Piotr Kopszak) Newsgroups: gmane.comp.tex.context Subject: Re: Entities names instead of characters in header texts Date: Wed, 6 Oct 2004 14:59:43 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <20041006125943.GA14442@mnw.art.pl> References: <20041005133913.GA7944@mnw.art.pl> <4163DCA6.7050203@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097067353 23372 80.91.229.6 (6 Oct 2004 12:55:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Oct 2004 12:55:53 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 06 14:55:34 2004 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CFBKQ-0005J5-00 for ; Wed, 06 Oct 2004 14:55:34 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 162B11278A; Wed, 6 Oct 2004 14:55:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03718-05; Wed, 6 Oct 2004 14:55:29 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EB8301277A; Wed, 6 Oct 2004 14:55:28 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5877E1277A for ; Wed, 6 Oct 2004 14:55:28 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03870-01-2 for ; Wed, 6 Oct 2004 14:55:27 +0200 (CEST) Original-Received: from mnw5.mnw.art.pl (unknown [195.117.227.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4D16A12777 for ; Wed, 6 Oct 2004 14:55:27 +0200 (CEST) Original-Received: from axent.mnw.art.pl ([195.117.227.15]) by mnw5.mnw.art.pl (Kerio MailServer 5.7.8) for ntg-context@ntg.nl; Wed, 6 Oct 2004 15:04:28 +0200 Original-Received: by axent.mnw.art.pl (Postfix, from userid 1001) id 12C3F47EE21; Wed, 6 Oct 2004 14:59:43 +0200 (CEST) Original-To: mailing list for ConTeXt users Mail-Followup-To: mailing list for ConTeXt users Content-Disposition: inline In-Reply-To: <4163DCA6.7050203@wxs.nl> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Virus-Scanned: by 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: , Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:16594 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16594 On Wed, Oct 06, 2004 at 01:53:10PM +0200, Hans Hagen wrote: > Hi Piotr > > you can copy this code in cont-new; > > when i can be sure that polish/czech users have switched to latin > modern, we may be able to simplify some of teh nasty parts of the xml > handler (having to deal with { } $ etc not being in their normal slot > leads to much low level hacks and this is related) > > [...] > > \def\defineactivecharacter #1 #2% > {\scratchcounter\the\uccode\activehackcode > \uccode\activehackcode\expandafter\doifnumberelse > \expandafter{\string#1}\empty`#1% > \catcode\uccode\activehackcode\@@active > \uppercase{\def\next{~}}% > \uccode\activehackcode\scratchcounter > % unexpanded goes wrong in pdfdoc > \@EA\@EA\@EA\def\@EA\next\@EA{\@EA\dohandleactivecharacter\next{#2}}} > > \let\dohandleactivecharacter\secondoftwoarguments > > \def\donthandleactivecharacter#1#2{\noexpand#1} > > \def\XMLexpanded#1% > {\bgroup > \honorunexpanded > % \dontexpandencoding > % \dontexpandutf > \let\dohandleactivecharacter\donthandleactivecharacter > \xdef\@@globalexpanded{#1}% > \egroup > \@@globalexpanded} > > \def\setXMLexpandedmark#1#2% > {\XMLexpanded{\scratchtoks{\enableXML#2}}% > \expanded{\normalsetnormalmark{#1}{\the\scratchtoks}}} > [...] Great thanks! Both solutions work. And the tip is really useful. Much easier to test different variants. Piotr -- Piotr Kopszak, Ph.D. Polish Art Gallery, National Museum in Warsaw -----------------------------> http://kopszak.mnw.art.pl/