[XeTeX] fonts for units in math mode

Will Robertson will at guerilla.net.au
Mon Jan 30 01:19:04 CET 2006


On 29/01/2006, at 19:15 , Bruno Voisin wrote:

> BTW, Will, in case you're listening, there's a typo at the end of  
> the fontspec code (last line in the above quote: \mathsf instead of  
> \mathtt).

Ah, thanks for that one. Actually, I'm not sure if I should be pre- 
declaring so many maths fonts, given the limit of 16.

Anyway, to finish up this thread, fontspec will only set the mathrm  
fonts if \setromanfont is in the preamble. Just move |\setromanfont 
[Scale=1]{Lucida Bright}| AFTER |\begin{document}| and you'll get  
your desired output. No need to mess with lines and lines of  
redefinitions:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setromanfont{Palatino}
abc $\mathrm{xyz}$
\end{document}

This is mentioned implicitly in the documentation, but maybe I'll add  
a note to that effect.

Will



More information about the XeTeX mailing list