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 (mapping to special fonts) and xetex situations (mapping to unicode)
Actually, I thought it was a good solution. Let me explain my current project.
I am typesetting a Festschrift including subjects on Indo-European (Sanskrit, Hittite, Old Greek, etc.), Slavic, Sino-Tibetan, and Japanese made up from 65 xml-files with decimal character entities. All the glyphs needed for these articles (save some silly ones like e with hungarian umlaut, m with subdot) are included in a font (Palatino Linostar) which was developed to accompany an etymological database (http://starling.rinet.ru/main.html) project devoted to proving or disproving the nostratic theory (all languages in the world originate from one source). The font was developed over the years and is no longer fully unicode-compliant.
So my solution was to map the cmap hexadecimal values via the decimal entities to the \uchar command in a separate configuration file.
For example:
\defineXMLentity[257]{\uchar{1}{1}} % amacron % LATIN SMALL LETTER A 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 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, etc.) to say a standard tex accent?
Is there a command to pick up certain utf-glyphs that aren't picked- up by context? See the ƃ ǖ 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 zipfiles containing the encodingfiles and the linostarfont to you off- 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 (Web2C 7.5.5).
did you try: \defineunicodefont [MySwitch] [MyOwnFont] % [command=\insertunicodeglyph] \definefontsynonym [MyOwnFontRegular] [Sans] \definefontsynonym [MyOwnFontItalic] [SansItalic] \MySwitch \uchar... \it ... The uchar command is a wrapper around a handler; currently only chinese and japanese handlers are defined, and you need a defaultcase. The \defineunicodefont installs a more advanced handler named \insertunicodeglyph which picks up the characters from the font ranges as you do. So, replace Sans and SansItalic by your alternatives UnicodeRegular and UnicodeItalic (btw this mechanism is rather complex because it needs to handle (1) fake unicode, i.e. you can define remappers, (2) unicode, (3) utf as input encoding, (4) special handlers, (5) ..... ) Even i get lost in the code -) Hans