The real reason for not allowing \theta
in normal text has to do with how TeX deals with fonts.
A TeX font has only 256 slots, while the mathematical symbols are many more. The command \theta
is, essentially, a four digit hexadecimal number:
0x0112
which carries a good deal of information: the leftmost digit is 0 and tells TeX that it's an ordinary symbol; the next digit tells TeX what font it should draw the character from and the final two tell where in the font the symbol lives (place 0x12
=18). Up to sixteen fonts can be used for math symbols and they are not necessarily tied to the text fonts (actually font number 0 should be a text font, but it's an exception).
TeX might have been designed so that a single command denoting a math symbol did the choice automatically, but the effects would be adverse in most cases.
One should also remember that math has its own spacing rules that TeX applies automatically. Letting people write math symbols in normal text would soon lead to poor typesetting.
If you use the amsmath
package, you should be able to write something like
\[A = B \text{ or } A_1 = B_1\]
You'll have to manually add space around the or
. You can do it as I did or you can do it as:
\[A = B \quad \text{or} \quad A_1 = B_1\]
EDIT 1
Here's a complete MWE:
\documentclass{article}
\usepackage{amsmath}
\pagestyle{empty}
\begin{document}
\[A = B \text{ or } A_1 = B_1\]
\[A = B \quad \text{or} \quad A_1 = B_1\]
\end{document}
EDIT 2
A comparison of \mbox{...}
vs \text{...}
\[ A_{\mbox{Hi}} \text{ vs } A_{\text{Hi}}\]
If you want to know more about the differences between these, you should probably post another question.
Or see Difference between various methods for producing text in math mode
Best Answer
\( ... \)
is LaTeX syntax.$ ... $
is TeX syntax.plainTeX only allows
$
. In LaTeX you can use both, but\( ... \)
will give less obscure error messages when there is a mistake inside it.Both are shortcuts to start inline math environments.