From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17857 Path: main.gmane.org!not-for-mail From: "Adam Lindsay" Newsgroups: gmane.comp.tex.context Subject: Re: m-letter backslash codes in xml database Date: Sat, 15 Jan 2005 13:21:41 +0000 Message-ID: <20050115132141.19896@news.comp.lancs.ac.uk> References: <41E87274.7050104@hccnet.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1105795417 6693 80.91.229.6 (15 Jan 2005 13:23:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 Jan 2005 13:23:37 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Jan 15 14:23:31 2005 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 1Cpntr-0005B4-00 for ; Sat, 15 Jan 2005 14:23:31 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E1C21127C1; Sat, 15 Jan 2005 14:23:30 +0100 (CET) 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 18399-06; Sat, 15 Jan 2005 14:23:30 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 66E3A127AE; Sat, 15 Jan 2005 14:21:47 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 43425127AE for ; Sat, 15 Jan 2005 14:21:46 +0100 (CET) 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 18419-03 for ; Sat, 15 Jan 2005 14:21:45 +0100 (CET) Original-Received: from mail.comp.lancs.ac.uk (unknown [148.88.3.45]) by ronja.ntg.nl (Postfix) with ESMTP id 6120512795 for ; Sat, 15 Jan 2005 14:21:45 +0100 (CET) Original-Received: from [192.168.31.101] (localhost [127.0.0.1]) by mail.comp.lancs.ac.uk (8.12.10/8.12.10) with ESMTP id j0FDLgAX027518; Sat, 15 Jan 2005 13:21:43 GMT Original-To: , "mailing list for ConTeXt users" In-Reply-To: <41E87274.7050104@hccnet.nl> X-Mailer: CTM PowerMail version 5.1 build 4340 English 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: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17857 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17857 Rob Ermers said this at Sat, 15 Jan 2005 02:31:32 +0100: >h h extern wrote: >> if you want to move things around in an encoding neutral way: >> >> \defineXMLsingular >> [c] >> [n=3Dunknowncharacter] >> {\executeifdefined {\XMLop{id}} \unknowncharacter} >> >> Um, I'm not sure, but I think Hans mixed two different attribute names: the code won't work as is. It should probably be: \defineXMLsingular [c] [n=3Dunknowncharacter] {\executeifdefined {\XMLop{n}} \unknowncharacter} >Thanks, Hans, for the example. I do agree, but I'm sorry I don't quite >understand how to apply this code. Could you be more specific=3F It should be in a .tex file that is loaded during processing. You can do this manually in your style file, or in (for example) a cont-loc.tex file that's in your path (e.g., the project directory or your tex/context/user ). >Do I still have to use the unicode number, or is this a method to use >\"e again in the database=3F This is so that you can substitute elements for entities in your database. This is an XML database, so it's a lot more useful if you don't restrict it to TeX-specific character entry. Entities (or elements) are a much better option, long-term. >Should I code each diacritic in this way, such as ouml (=F6) in my >example:

J. Schöttelndreher

)=3F

J. Schöttelndreher

or, if you \useXMLfilter[ent] :

J. Sch&#ouml;ttelndreher

or, with Hans's definition:

J. Schttelndreher

>My solution by the way does not work with, e.g., a Turkish scedil >(U0015F) in my database, while Tex excells in all kinds of diacritics. This is a slightly different issue. It's fairly easily fixed with a couple additions to the style file/cont-loc file: % You can use ş with: \defineXMLentity [Scedil] {\Scedilla} \defineXMLentity [scedil] {\scedilla} % You can use ş or other unicode (decimal) numbers with: \def\executeXMLdeccharacter#1\relax % {\utfunifontglyph{#1}} (I was unable to come up with a satisfactory way of handling the hex version thereof. I also haven't really tested the above function overload--I'm sure someone can improve on this.) -- =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-