# Cannot overline a word inside a verbatim block

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

\begin{verbatim}
Hwy3 =1  Hwy3
Hooterville = 0  \overline{Hooterville}
\end{verbatim}


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 at 11:41

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

\documentclass{article}
\usepackage{listings}
\lstset{
escapeinside={(*@}{@*)},
}

\begin{document}

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

\end{document}