4

I'm trying to compile a document in overleaf where I need to quote a reviewer comment. The comment has underscores in a word i.e. Number_of_Nodes.

For some reason I think the compiler sees the underscores and tries to be helpful by adding $ to enter inline math mode. Firstly, I don't want math mode, and secondly this conflicts with the quote environment.

How can I stop this "helpful" behaviour?

MWE:

\documentclass{article}
\begin{document}
\begin{quote}
\itshape 
(Number_of_Nodes_at_step(n)).
\end{quote}
\end{document}
imnothere
  • 14,215
Bamboo
  • 163

1 Answers1

6

Use \textunderscore instead, _ switches to math mode

Edit:

You could also escape _ character with \_

Like this (Number\_of\_Nodes\_at\_step(n))

Thanks Don Hosek and Zarko!