[XeTeX] escaping \ and $

Jonathan Kew jonathan_kew at sil.org
Sun Jun 18 18:53:15 CEST 2006


On 18 Jun 2006, at 5:42 pm, Pablo Rodríguez wrote:

> For some strange reason, I get errors in the following file:
>
> \documentclass[12pt]{article}
> \usepackage{fontspec}
> \setromanfont[Mapping=tex-text]{Gentium}
> \begin{document}
> Price 25\$\ or 25€. Romeo \&\ Juliet. Backslash (\\{})
> \end{document}
>
> '&' is escaped right, but '\' and '$' aren't.
>
> Am I missing something or is it a bug in the Linux version?

You're missing the xunicode package, which should fix \$ for you.  
(Though I must admit I don't really understand why \$ misbehaves in  
the way it does, in the absence of xunicode; something about LaTeX  
font encodings, I guess.)

Is \\ supposed to generate a backslash? I thought it was used for  
other things such as forced line breaks.

JK




More information about the XeTeX mailing list