[Tex/LaTex] verbatim subscript in mathmode

math-modeverbatim

I want to produce a formula in Math-Mode which is something like

\pi_{film_title}(\sigma_{release_year > 2006}(film))

where film_title, release_year, and film are in verbatim
so far I was using the alltt package, but the acclaimed \sb only produces subscripts in the usual math mode font.

Any tips for that?

Best Answer

You should be able to use \_ to get _ (the actual appearance depends on the font unless you have redefined \_ to use a rule, but either way the markup is:

\pi_{\mathtt{film\_title}}