Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Consider the following minimal example (which has to use amsmath):

\documentclass{article}
\usepackage{amsmath}
\usepackage{eulervm}
\begin{document}
\begin{align*}
  \rm{text}  = 
  x_\sigma
\end{align*}
\end{document}

which yields the following:

enter image description here.

Note the symbol which appears instead of the expected \sigma and the font used for x. By removing the eulervm package the result is as expected, namely:

enter image description here.

Now, even more counterintuitive, if you comment out the first line in the align, namely \rm{text} = leaving the eulervm package in place I get:

enter image description here.

Obviously, as shown in the last example, eulervm can typeset a \sigma symbol as a subscript, but not when there's some text in front...?

Can someone explain what is happening here?

share|improve this question
    
You are using improperly the obsolete command \rm: use \mathrm{text} instead. And never use \rm. –  egreg Jul 11 '12 at 9:09
    
@egreg: It is a code I got from a collaborator... Can you put it as an answer so I can accept it. –  Dror Jul 11 '12 at 9:12
add comment

1 Answer 1

up vote 6 down vote accepted

Commands such as \rm or \bf have been obsolete since the release of LaTeX2e, almost twenty years ago.

They are declarations, so they should be placed inside braces:

{\rm text}

The \rm{text} form declares \rm for the whole formula, which explains why the x and the \sigma are typeset wrongly.

Nevertheless, as I said, this is not recommended at all. Better use \text:

\documentclass{article}
\usepackage{amsmath}
\usepackage{eulervm}
\begin{document}
\begin{align*}
  \text{text} = 
  x_\sigma
\end{align*}
\end{document}

Instead of \text you can use \textrm or \mathrm (it depends on what you're really wanting to do).

Don't use align* as a substitute of equation* (or \[...\]), but this is another matter.

share|improve this answer
    
Thanks for the reminder regarding align*. In the original code it was needed, and I wasn't sure whether or not it is part of the problem. –  Dror Jul 11 '12 at 9:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.