1. Jonas Nyrup

Instead of using eqnarray and array you should use the macros from amsmath, align and cases

• Ouch! My mistake. Thanks for letting me know, appreciate it! It’s fixed. Best, Tom.

2. João

Space left in-between exists because writing (e.g.) $var$ actually means “v times a times r”. Not knowing this is the source of many ill-looking papers out there, so this could be a great opportunity to show the difference between using $var$ and $\mathit{var}$ – thus showing how to properly typeset multiletter variables.

• Hi João,

Thank you for pointing this out. Will add it to the post.

Cheers, Tom.

• Interesting, thanks for the link. Tom.

3. Dror Atariah

Why not using mathrm? Is it producing the same effect of ‘v*a*r’?

• Hi!
Thanks for the comment. \mathrm and \textrm (or \text implemented by the amsmath package) are similar, but not the same. A good discussion about the topic can be found here.

Best, Tom.

4. Thanks I like it . Useful, and it works for Beamer

5. There is another nice discussion on \textnormal{} vs. \textrm{} (and also a little bit of \text{} in the comments} which I believe is very relevant to this post.
http://stefaanlippens.net/textnormal

• Thanks for the link! Tom.

6. I’m using the amsmath package, and I tried to use \text in mathmode within my document’s title, but it caused errors, seemingly at the \tableofcontents line. I solved it by using \rm instead, but do you have any idea why it would cause an error?

By the way, what is the difference between \rm and \textrm?

• Hi!

I don’t see a problem using \text in a title. Can you send a minimal working example to illustrate the error?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\tableofcontents
\section{$\text{My equation}\ a+b$}
\end{document}

Cheers, Tom

• Ah, I feel silly now. It wasn’t a error with \text, it was a bracket error (I hadn’t forgotten to close the bracket, the mistake wasn’t that stupid, but the bracket was in the wrong place). Sorry!

Thanks for the info on \rm. Good to know it’s deprecated, I’ll stop using it.

• No worries. Thanks for the feedback. Tom.