views:

177

answers:

4

I want to use a variable name containing dash in TeX equation. However, dash gets interpreted as minus sign. Anyone any idea of how to escape the character?

+4  A: 

Using \textrm{-} does not work ?

David Cournapeau
It does. Thanks for help!
+1  A: 

Put the whole variable name inside \text.

Or better, make a macro for variable names which uses \text. Using a macro will help you get a uniform style that you can easily change later.

starblue
+1  A: 

Type \hbox{-} in TeX equation. It is faster to compile than \text{-}.

Alexey Malistov
A: 

Putting

\catcode`\-=11

as the first declaration in the scope of the equation will make - into a normal letter character.

Charles Stewart