# \mathrm and \Omega in XeLaTeX

When I write $\mathrm{\Omega}$ and compile it with LaTeX, I get capital omega symbol normally. But when I do the same with XeLaTeX, I get empty symbol. I don't use any special packages or fonts.

Could someone explain me why is this? And how could I achieve the same behavior in XeLaTeX as in LaTeX?

Example of LaTeX file:

\documentclass[10pt]{article}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}

\title{Article}
\author{Name}
\date{}
\begin{document}
$\text{nothing:} \Omega + \text{rm} \mathrm{\Omega} + \text{normal} \mathnormal{\Omega}$
\end{document}


Example of XeLaTeX file:

\documentclass[10pt]{article}
\usepackage{xunicode}
\usepackage{fontspec}

\title{Article}
\author{Name}
\date{}
\begin{document}
$\text{nothing:} \Omega + \text{rm} \mathrm{\Omega} + \text{normal} \mathnormal{\Omega}$
\end{document}

-
the Omega is always upright so \mathrm makes no sense. However, make a complete example, that shows your seen behaviour. I have no problem with xelatex –  Herbert Oct 22 '11 at 10:15
What math font do you load in the xelatex variant of your code? –  Mico Oct 22 '11 at 10:47
Does XeLaTeX produce any warnings when you compile your document? If so, add those warnings (contained in the .log file) to your question by editing it. –  Werner Oct 22 '11 at 15:39
It maybe a good idea, if you could test your example before posting it. amsmath is missing and as I already wrote, load mathspec instead of fontspec –  Herbert Oct 23 '11 at 19:02

Use \Omega for upright Ω, and use \varOmega with amsmath package for italic Ω.

\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\begin{document}

$\Omega \varOmega$

\end{document}


Some more explanations:

With fontspec, \mathrm uses text roman fonts by default. However, there is no Ω in Latin Modern Roman font, thus the symbol is missing.

Sometimes, you may want to use no-math option of fontspec to prevent changing the math fonts, if you use some math font packages. However, you should just use correct way to typeset \Omega and \varOmega instead.

-
loading mathspec instead of fontspec makes \mathrm{\Omega} work –  Herbert Oct 23 '11 at 6:45
Finally, I used the no-math option when loading fontspec package. Should I expect any "side-effects"? –  Werkov Oct 23 '11 at 18:58
@Werkov: You should not use \mathrm{\Omega}. Then no-math option is useless. –  Leo Liu Oct 24 '11 at 1:18