I need in \subsection string with underscore, like ABC_XYZ.
\subsection{Text ABC_XYZ}
When I try to compile with pdflatex:
Missing $ inserted ...ine {1.2}Text ABC_XYZ}{4}{subsection.1.1.2}
Extra }, or forgotten $ ...ine {1.2}Text ABC_XYZ}{4}{subsection.1.1.2}
I cannot write ABC\_XYZ. It is important for me to find this string ABC_XYZ automaticly. And I need this string in table of contents.
Option
\verb+ABC\_XYZ+
dont work.
Can you help me?

\_as in\subsection{ABC\_XYZ}orABC\textunderscore XYZ– Apr 01 '14 at 06:31\_, I needABC_XYZin source text. – Ama Apr 01 '14 at 06:40xyzas the subscript ofABCin real pdf? – Apr 01 '14 at 06:52ABC_XYZin the source file? Please elaborate. – Apr 01 '14 at 07:01ABC_XYZautomaticly. And I need this string in table of contents. – Ama Apr 01 '14 at 07:02underscorepackage, perhaps? – Joseph Wright Apr 01 '14 at 07:49\verb+ABC_XYZ+. In\subsectionI cannot use\verb. – Ama Apr 01 '14 at 08:39\verbinside a\section. http://tex.stackexchange.com/questions/83893/verbatim-inside-a-command might help. By the way, you always can\texttt{ABC\_XYZ}. – Manuel Apr 01 '14 at 09:48_having to be typeset in typewriter/monospaced font -- which is what the variousverbatimenvironments almost invariably do. – Mico Apr 01 '14 at 13:59\verb+ABC_XYZ+. In\subsectionI cannot use\verb”, which, at least to me, seems to ask for a monospaced/typewriter font. – Manuel Apr 01 '14 at 14:41