[XeTeX] Res: Special characters: how to handle cleanly

Flavio Costa flaviocosta at yahoo.com.br
Sun May 25 17:09:59 CEST 2008


Hi, if you choose fontspec package with a typeface that contains Å and μ, part of the text below will appear (remember to save the document in UTF-8).

However, you also want to typeset those characters in math mode, and from my recent experience math support is still not mature in XeTeX, maybe someone else can give you more specific guidance.

Flavio Costa

----- Mensagem original ----
De: Joseph Wright <joseph.wright at morningstar2.co.uk>
Para: xetex at tug.org
Enviadas: Sábado, 24 de Maio de 2008 15:58:09
Assunto: [XeTeX] Special characters: how to handle cleanly

Hello all,

I'm trying to work out how to handle a small set of special characters
cleanly.  Consider the following:

\documentclass{article}
% Need something clever here!
\begin{document}
  Some text $°Åμ$ °Åμ
\end{document}

If I compile with xelatex, only "Some text" shows up.  The same problem
with pdflatex plus inputenc (latin1) can be handled as the characters
end up active, and I can do:

\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{textcomp,amstext,upgreek}
\newcommand*{\handlesymbol}[1]{%
  \bgroup
    \uccode`\~#1%
    \uppercase{%
      \egroup
      \def~}}
\handlesymbol{176}{\text{\textdegree}}
\handlesymbol{181}{\ensuremath{\upmu}}
\handlesymbol{197}{\text{\AA}}
\begin{document}
  Some text $°Åµ$ °Åµ
\end{document}

I'm sure there is an xetex way to do the same thing, but I don't know
what it is!  I'd rather avoid using the symbols themselves in the
handler code (i.e. before \begin{document}) for various reasons.

Thanks for any clues,

Joseph Wright
_______________________________________________
XeTeX mailing list
postmaster at tug.org
http://tug.org/mailman/listinfo/xetex



      Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
http://br.mail.yahoo.com/


More information about the XeTeX mailing list