# LaTeX won't compile because of use of _ in text [duplicate]

LaTeX won't let me use _ in my text, it keeps trying to compile it as math and therefore won't compile my pdf.

Anyone knows how I can make it not do that?

I'm using it in the following:

\textit{item_name}
\textit{current_item.name}
\textit{_qty}
\textit{id='small_qty'}

• Use 'small\_qty' instead – GHL May 8 '14 at 21:31
• @GHL I tried that and it still wont let me compile. – Kenneth J May 8 '14 at 21:33
• Seems like i forgot one! Thank you. It worked now! – Kenneth J May 8 '14 at 21:36
• That's great! Glad it worked – GHL May 8 '14 at 21:39

## 1 Answer

_


is a special character in Latex, you need to use

\_


instead

• Worked perfectly! – Kenneth J May 8 '14 at 21:39