[XeTeX] something wrong with xunicode.sty [WAS: do you see...]

Ulrike Fischer news2 at nililand.de
Mon Jun 16 14:01:59 CEST 2008


Am Mon, 16 Jun 2008 12:02:51 +0200 schrieb
francois.patte at math-info.univ-paris5.fr:


> | In the case at hand, it is actually irrelevant, since the
> | appropriate circumstances do not arise.
> |
> | These later declarations take precedence:
> |
> |   \DeclareUTFcomposite[\UTFencname]{x1E48}{\b}{N}
> |   \DeclareUTFcomposite[\UTFencname]{x1E49}{\b}{n}
> |
> | so that with the combination of accent \b  and letter  n
> | XeTeX is asked to use  \char"1E49 .
> 
> So, I don't know what to do: if I disable xunicode, I can get
> \char"1E49, \char"1E48, 

No, you don't get this chars as they are not in your font. You  get an n
(or N) with a rule (the default OT1-definition). 

What you see is a consequence of the easy use of the fonts: You no
longer have to make a lot of .fd, .vf and encoding definition etc but
this also means that a lot of the checks and fall-backs of LaTeX no
longer work.

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{fontspec}
\usepackage{xltxtra}
\usepackage{xunicode}

\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