# Using  in text

I am currently writing out an introduction to LaTeX file for some coworkers. How would I insert $ $ as regular text and not starting math mode?

FYI: The reason why I'm asking this is because I plan on surrounding them with \texttt.

-
I need it to be inline, so verbatim will not work. – Clarinetist Jul 25 '14 at 16:40
So read about \verb. – Sigur Jul 25 '14 at 16:40
Thank you @Sigur. That was extremely simple... – Clarinetist Jul 25 '14 at 16:45

Since you mention "inline", I will point out that \verb will not break across lines. However, if that is needed, then this approach, using \detokenize could work if you don't have unbalanced braces, and if you don't need to print % or # signs in the string.

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\texttt{\detokenize{$This is a test this is a test this is a test This is a test this is a test this is a test$}}
\end{document}


fontenc is not needed in this example, but would be if you wanted to print out the result in anything other than \texttt.

-

Figured it out thanks to the comment by Sigur.

\verb#$# \verb#$#

or alternatively, thanks to Sigur as well,

\verb++.

I read this question previously, which seemed to suggest to me that I always needed to use texttt, but it looks like I was wrong.

-
You don't need to use it twice: verb++ also works. – Sigur Jul 25 '14 at 16:47
Use \verb when the content has some special chars (for example, braces, dollar signs, etc... – Sigur Jul 25 '14 at 16:49