[XeTeX] escaping \ and $

Herbert Schulz herbs at wideopenwest.com
Sun Jun 18 18:51:13 CEST 2006


On Jun 18, 2006, at 11:42 AM, 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?
>
> Thanks,
>
>
> Pablo
> _______________________________________________

Howdy,

I don't have any problem with escaping the $ with \$. The \\ is not  
an escape of the backslash but a special command in LaTeX2e to force  
a line break within the same paragraph. To get a backslash character  
you've got to use \textbackslash.

By the way, I'm on Mac OS X and don't have Gentium so I substituted  
Hoefler Text for the font.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)




More information about the XeTeX mailing list