[XeTeX] A simple polyglossia question: preserving formatting in foreign language insertions

Vafa Khalighi vafa at users.berlios.de
Thu Oct 1 18:51:10 CEST 2009


>
> Is it possible to enter short insertions of the foreign text while
> preserving formatting?
>
> For example, if I need
>
> {\em Italic English text ... \textlatin{Italic in Latin language} ... more
> italic English text}
>
> will not work as expected, so I must use additional formatting inslide
> \text<lang>{...} each time I insert a foreign text. (Of course, using
> \begin{latin}...\end{latin} in this example will produce the same non-italic
> text.)
>
>
>

That is not possible currently with polyglossia.  polyglossia  saves the
original fonts as

\let\normalfontlatin\normalfont
\let\rmfamilylatin\rmfamily
etc

\def\latin at script@font{%
 \let\rmfamily\latinrmfamily
etc
\latinnormalfont}

and every time you use a different script, it actually resets the
\normalfont, for example if you use latin, you could expect this

\def\latin at font{\latinnormalfont}

and similarly for english. and because it resets normalfont everytime you
change your language of polyglossia, therefore even if you say {\em english
text \textlatin{latin text} more}

"ennglish text" and "more" will be emphasized but "latin text" is not.
-- 
Vafa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20091002/0d3642a4/attachment.html>


More information about the XeTeX mailing list