[XeTeX] fonts for units in math mode
Faisal Moledina
faisal.moledina at gmail.com
Sun Jan 29 03:57:22 CET 2006
Hey all,
I would like the units in math mode to be displayed in non-italic
font, but preferably using the same font that the math uses. I'm
using Lucida Bright or Palatino for my roman font outside of the math
environments, and I haven't specified any math font (I like the
default one). However, I cannot enter units properly. I searched
around and finally stumbled on the SIunits package. While that works
well outside of the math environments, it converts the units to the
Lucida Bright font inside the math environments. It turns out that
the fonts look quite different so this makes my units really stand
out. It's not any different from putting a \text or \textrm tag
inside my math environment. Even using the "textstyle" option with
the SIunits package doesn't make it follow the math font. Here is an
example of my issue. I tried a couple different ways with a couple
variables, just to see the difference. What is the proper way of
doing this?
%%-- preamble
%mhchem package
\usepackage[version=3]{mhchem}
%SI units package :D
\usepackage[thinspace,thinqspace,textstyle]{SIunits}
%XeTeX fontspec
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
%\setromanfont[Scale=1]{Palatino}
\setromanfont[Scale=1]{Lucida Bright}
%%-- later in the document
To calculate the current that is attributed to \ce{Zn}, $I_{\ce{Zn}}
$, equation~\eqref{eqn:ce} is used with the following constants:
\begin{align*}
n &= 2 \\
F &= 96485.31 \mathrm{\coulomb\per\mole} \\
F &= 96485.31 \coulomb\per\mole \\
M_{\ce{Zn}} &= \unit{65.37}{\gram\per\mole} \\
&= 65.37 g/mol
\end{align*}
It produces:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eqn.png
Type: image/png
Size: 27126 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20060128/d8de1a5c/eqn-0001.png
-------------- next part --------------
Thanks to anyone who can help.
Faisal
More information about the XeTeX
mailing list