TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I print a $ inside \tt?

I tried escaping with a backslash, but didn't work.


throws an error.

! Argument of \OT1\^ has an extra }


Sorry, the issue was not with $, but with ^ in the next line.

Used \textasciitilde and everything worked fine.

share|improve this question
Welcome to TeX.SE. I assume that your userid is a Star Trek reference. :-) – Peter Grill Feb 5 '13 at 8:20
@PeterGrill I never knew there was atoztoa in Star Trek... please enlighten me – ATOzTOA Feb 5 '13 at 8:24
It thought that your userid was as reference to "Mr Atoz" from All Our Yesterdays – Peter Grill Feb 6 '13 at 2:26
@PeterGrill nah... I am not a fan... – ATOzTOA Feb 6 '13 at 4:11
up vote 6 down vote accepted

\tt is a switch, not a commmand with argument. Also it is obsolete. Nevertheless it works fine, and your problem is somewhere else. Make a complete example instead of sending code snippets.

%not necessary but better
\ttfamily \$
\tt \$ %obsolete command
share|improve this answer
Thanks a lot... – ATOzTOA Feb 5 '13 at 8:22

First of all, I would advise you to use \texttt instead of \tt. See Does it matter if I use \textit or \it, \bfseries or \bf, etc. \texttt is the LaTeX equivalent of the Plain TeX \tt. If in Plain TeX, you write {\tt \$} and it should work. You have to enclose \tt in braces {} to make the typewriter type effect local to the text inside braces. In LaTeX, you write \texttt{\$} instead.

share|improve this answer
thanks for the update... I am a little rusty... – ATOzTOA Feb 5 '13 at 8:23

Your Answer


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.