[XeTeX] a bug of xltxtra.sty

Ulrike Fischer news2 at nililand.de
Sat Oct 11 15:26:30 CEST 2008


Am Sat, 11 Oct 2008 23:17:47 +1100 schrieb VAFA KHALIGHI:

> If you try the example blow:
> 
> %%%%%
> \documentclass{article}
> \usepackage{xltxtra}
> \begin{document}
> \. O
> \v O
> \end{document}
>  %%%%%%%%%
> 
> by looking at the log, you have got
> 
> %%%%%%%%%%%%%
> Missing character: There is no Ȯ in font
> [lmroman10-regular]:mapping=tex-text!
> Missing character: There is no Ǒ in font
> [lmroman10-regular]:mapping=tex-text!
> %%%%%%%%%%%%%%%%%%%%
> 
> But trying the above example without loading xltxtra, the proplem
> disappears.

With xltxtra (or with fontspec+ xunicode) you are using the open type
fonts of Latin Modern. Without the packages you are using the old cm
fonts in OT1 encoding. 

There is no simple solution to this problem: with xetex it is easy to 
use fonts and -- as it relies on unicode -- you no longer have to bother 
with all the encoding stuff but the price is that there aren't good 
fall-backs if glyphs are missing. 

You will probably have to define "fake" accent commands. In a similar 
case on the xetex list I suggested something like this:

"You can try to define other commands to get the accents also with fonts 
which don't have the actual chars e.g. (the code isn't perfect, it 
should only show you some possibilities):

\documentclass{minimal}
\usepackage{xltxtra}

\makeatletter
\DeclareTextAccentDefault{\bx}{OT1}
\DeclareTextCommand{\bx}{OT1}[1]
   {\hmode at bgroup\o at lign{\relax#1\crcr\hidewidth\ltx at sh@ft{-3ex}%
     \vbox to.2ex{\hbox{\char22}\vss}\hidewidth}\egroup}

\DeclareTextCommand{\bxx}{EU1}[1]
   {\hmode at bgroup\o at lign{\relax#1\crcr\hidewidth\ltx at sh@ft{-3ex}%
     \vbox to.2ex{\hbox{\char"005F}\vss}\hidewidth}\egroup}


\setmainfont{Palatino Linotype}
\begin{document}
n \textit{n}

\b{n} \textit{\b n}

\bx{n} \textit{\bx n}

\bxx{n} \textit{\bxx n}
\end{document}
"
-- 
Ulrike Fischer 



More information about the XeTeX mailing list