I am writing a document in text mode and I wish to refer to a variable in some separate software file. But when I try to typeset the document Latex seems to think that the name of the variable is in math mode.
If I write
\documentclass[11pt]{amsart}
\begin{document}
The name of the proposed variable is log_acceptance.
\end{document}
I get the following message on the console:
./mre.tex:5: Missing $ inserted.
<inserted text>
$
l.5 The name of the proposed variable is log_acceptance.
If I change my text to
\documentclass[11pt]{amsart}
\begin{document}
The name of the proposed variable is log.
\end{document}
then that is typeset correctly as text.
How can I tell Latex to stop thinking that log_acceptance is math?
{\_}.) I totally don't understand why people use that instead of just\_. What's the difference!? – user202729 May 02 '22 at 14:51x_1. – Sigur May 02 '22 at 15:47The name of the proposed variable is log_acceptance. \bye. No problem. – wipet May 02 '22 at 18:00