# Print $inside \tt How do I print a $ inside \tt?

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

\tt{\$}  throws an error. ! Argument of \OT1\^ has an extra } Update Sorry, the issue was not with $, but with ^ in the next line.

Used \textasciitilde and everything worked fine.

-
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

\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.

\documentclass{article}
%not necessary but better
\usepackage[T1]{fontenc}
\begin{document}
\ttfamily \$\tt \$ %obsolete command
\verb+$+ \texttt{\$}
\end{document}

-
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.

-
thanks for the update... I am a little rusty... – ATOzTOA Feb 5 '13 at 8:23