From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/16593 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Entities names instead of characters in header texts Date: Wed, 06 Oct 2004 13:53:10 +0200 Sender: ntg-context-bounces@ntg.nl Message-ID: <4163DCA6.7050203@wxs.nl> References: <20041005133913.GA7944@mnw.art.pl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097063771 13466 80.91.229.6 (6 Oct 2004 11:56:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Oct 2004 11:56:11 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 06 13:55:51 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 1CFAOd-0000y5-00 for ; Wed, 06 Oct 2004 13:55:51 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E3C7E12777; Wed, 6 Oct 2004 13:55:50 +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 03517-05; Wed, 6 Oct 2004 13:55:50 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B67D01277A; Wed, 6 Oct 2004 13:53:13 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 110EC1277A for ; Wed, 6 Oct 2004 13:53:12 +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 03317-08 for ; Wed, 6 Oct 2004 13:53:11 +0200 (CEST) Original-Received: from mailrelay01.solcon.nl (unknown [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 654FD12777 for ; Wed, 6 Oct 2004 13:53:11 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i96Br8oR028669 for ; Wed, 6 Oct 2004 13:53:08 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id D856930D87; Wed, 6 Oct 2004 13:53:10 +0200 (CEST) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id E312E2EB3B for ; Wed, 6 Oct 2004 11:53:09 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <20041005133913.GA7944@mnw.art.pl> X-Virus-Scanned: ClamAV 0.80rc3/509/Wed Sep 29 11:09:42 2004 clamav-milter version 0.80c on mailrelay01 X-Virus-Status: Clean 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:16593 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:16593 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) % In 2005 we will abandon support for font encodings that don't have % the ascii characters { } $ etc in their normal slot, i.e. latin modern % instead of computer modern. Then we can also clean up some of the ugly % xml internals that are a result from the need to deal with funny % encodings. % a solution: % % \defineXMLargument[ctx:c]{\getXMLcharacter} % \defineXMLargument[ctx:e]{\getXMLentity } % \defineXMLargument[ctx:u]{\unicodechar } % % \bgroup \catcode`\<=\active \catcode`\&=\active % % \gdef\dontexpandutf % {\def\getXMLcharacter##1{##1}% % \def\getXMLentity ##1{##1}% % \def\unicodechar ##1{##1}} % % \egroup % % more generic: \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}}} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------