# Type underline in latex [duplicate]

I was intending to type something like

use_aesni = True in latex.

Therefore, I type $use_aesni = True$. However, it becomes this.

• \textrm{use\_aensi} and \mathrm{True} (apart from the _ don't use math italic for multi-letter words – David Carlisle Sep 12 '18 at 23:19

You have to escape the underscore. $use\_aesni = True$