From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/25348 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \uchar and italics question Date: Thu, 19 Jan 2006 00:26:53 +0100 Message-ID: <43CECEBD.7030404@wxs.nl> References: <0CF2F7B4-CF66-4F9C-97BA-C76E727CD56A@zonnet.nl> <6faad9f00601180410x23782c97h70a01b9734d08ce7@mail.gmail.com> <43CE4F18.9070205@wxs.nl> <5F9D5692-2B66-467D-B9D7-A56925B29158@zonnet.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1137626822 1451 80.91.229.2 (18 Jan 2006 23:27:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2006 23:27:02 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 19 00:27:00 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1EzMhf-0004kP-MO for gctc-ntg-context-518@m.gmane.org; Thu, 19 Jan 2006 00:26:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5CD2212862; Thu, 19 Jan 2006 00:26:59 +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 10969-06; Thu, 19 Jan 2006 00:26:57 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4836712818; Thu, 19 Jan 2006 00:26:57 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0C03412818 for ; Thu, 19 Jan 2006 00:26:56 +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 11089-01-3 for ; Thu, 19 Jan 2006 00:26:54 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id 9996D127BA for ; Thu, 19 Jan 2006 00:26:54 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 1396 for ; Wed, 18 Jan 2006 18:38:03 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <5F9D5692-2B66-467D-B9D7-A56925B29158@zonnet.nl> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 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:25348 Archived-At: sjoerd siebinga wrote: > Hi Hans and Mojca, > > > Thanks for the quick replies. > > On 18 Jan 2006, at 15:22, Hans Hagen wrote: > >> Mojca Miklavec wrote: >> >>> You don't need to put silly \uchar{}{} definitions in the text, I'm >>> >> indeed, uchar is not for this purpose and has special meaning in cjk=20 >> (mapping to special fonts) and xetex situations (mapping to unicode) >> > > > Actually, I thought it was a good solution. Let me explain my current =20 > project. > > I am typesetting a Festschrift including subjects on Indo-European =20 > (Sanskrit, Hittite, Old Greek, etc.), Slavic, Sino-Tibetan, and =20 > Japanese made up from 65 xml-files with decimal character entities. =20 > All the glyphs needed for these articles (save some silly ones like e =20 > with hungarian umlaut, m with subdot) are included in a font =20 > (Palatino Linostar) which was developed to accompany an etymological =20 > database (http://starling.rinet.ru/main.html) project devoted to =20 > proving or disproving the nostratic theory (all languages in the =20 > world originate from one source). The font was developed over the =20 > years and is no longer fully unicode-compliant. > > So my solution was to map the cmap hexadecimal values via the decimal =20 > entities to the \uchar command in a separate configuration file. > > For example: > > \defineXMLentity[257]{\uchar{1}{1}} % amacron % LATIN SMALL LETTER A =20 > WITH MACRON % 0x0101 > > > I need about 2546 of them for all the special glyphs. > > This solution works fine, except the fact that I am unable to typeset =20 > the glyphs in bold and italic. > > Maybe this solution is a bit cumbersome. I am open for better solutions= . > > On 18 Jan 2006, at 13:10, Mojca Miklavec wrote: > >> If the placement of the >> macron doesn't suit your font, you can redefine it and get rid of >> those \uchar-s. > > > What is the best way to redefine the accents (like macron, acute, =20 > etc.) to say a standard tex accent? > > Is there a command to pick up certain utf-glyphs that aren't picked-=20 > up by context? See the =C6=83 =C7=96 in my example file. > > On 18 Jan 2006, at 13:10, Mojca Miklavec wrote: > >> You can still use unicode or whatever input encoding >> (regime) you need (Latin4/6/7?). Send a complete minimal example to >> the list, including font definitions. > > > I have included a minimal testfile. I can send the pdf-output and =20 > zipfiles containing the encodingfiles and the linostarfont to you off-=20 > list since they are too big for the list. > > I am using texexec version 5.4.3 with pdftex 3.141592-1.30.3-2.2 =20 > (Web2C 7.5.5). did you try: \defineunicodefont [MySwitch] [MyOwnFont] % [command=3D\insertunicodeglyp= h] \definefontsynonym [MyOwnFontRegular] [Sans] \definefontsynonym [MyOwnFontItalic] [SansItalic] \MySwitch \uchar... \it ... The uchar command is a wrapper around a handler; currently only chinese=20 and japanese handlers are defined, and you need a defaultcase. The=20 \defineunicodefont installs a more advanced handler named=20 \insertunicodeglyph which picks up the characters from the font ranges=20 as you do. So, replace Sans and SansItalic by your alternatives=20 UnicodeRegular and UnicodeItalic (btw this mechanism is rather complex because it needs to handle (1)=20 fake unicode, i.e. you can define remappers, (2) unicode, (3) utf as=20 input encoding, (4) special handlers, (5) ..... ) Even i get lost in the=20 code -) Hans