On 7/17/06, Hans Hagen wrote:
Mojca Miklavec wrote:
Hello,
I have to print plenty of utf-8-encoded entries from a database. I will probably output entries as \contestant{name}{country}{code}, for example \contestant{Đức Đặng}{VNM}{1}
I have defined \def\contestant#1#2#3{...#1...}
But what's the easiest way to change the encoding to t5 if the country code is VNM and to some other encoding if country code is RUS, SER (or one of other countries using Cyrillic)? I'll probably use
you can try to define multiple typefaces, say mainfont-ec, mainfont-qx, mainfont-t5 and then switch to them using languagespecifics related definitions
The Vietnamese left, I can sleep well again ;) I swear that they will pay for each single letter that caused us headaches this year: they'll have to organize the same event by themselves next year. (But then again: next year both pdfTeX and XeTeX will hopefully work in a much less painful way.) But I still can't understand why the following code costed me at least an hour to trace and find a workaround for it: \definetypeface [iwona-t5] [ss] [sans] [iwona] [default] [encoding=t5] \definetypeface [iwona] [ss] [sans] [iwona] [default] [encoding=ec] \setupbodyfont [iwona,12pt,ss] \starttext abc \switchtobodyfont[20pt]\switchtobodyfont[iwona-t5] abc \stoptext Here's the output: ... (c:\Programi\context\texmf-local/tex/context/base/type-buy.tex) (c:\Programi\context\texmf-local/tex/context/base/pdfr-ec.tex) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (./file.tuo) (c:\Programi\context\texmf-local/tex/context/base/sort-def.tex) (c:\Programi\context\texmf-local/tex/context/base/sort-lan.tex) (./file.tuo) (./file.tuo) systems : begin file file at line 28 ! pdfTeX error (font): invalid font identifier. \@@expanded ->\pdffontattr \font {/ToUnicode 1 0 R} <argument> ...fontresource \endcsname \space 0 R}} \letgvalue {\s!ucmap \font... \firstofoneargument #1->#1 \doincludepdffontresource ...cludepdffontresource \fi \includepdffontresource ...includepdffontresource \fi \fi \fi \setfontcharacteristics ...ifier }\the \everyfont \synchronizepatterns ... l.31 ...obodyfont[20pt]\switchtobodyfont[iwona-t5] abc No pages of output. Transcript written on file.log. TeXExec | runtime: 2.183 The funny part is that it compiles fine on contextgarden (and most probably compiled OK on my computer as well some time ago: the error just appeared at once). Mojca