I am trying to a overline a word inside a verbatim block but it does not work, for example:

Hwy3 =1  Hwy3   
Hooterville = 0  \overline{Hooterville}

I have also tried \bar{} but i get the same problem. Anyone has a solution please?

  • You can never do any (simple?) customization to words inside \verbatim. – user156344 Apr 9 '19 at 11:41

With the listings package, one can escape stuff in which latex commands should be recognised:



Hwy3 =1  Hwy3   
Hooterville = 0  (*@$\overline{Hooterville}$@*)


enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.