LaTeX lstlisting underlined

Posted by Gernot on Stack Overflow See other posts from Stack Overflow or by Gernot
Published on 2010-05-02T17:44:23Z Indexed on 2010/05/02 17:47 UTC
Read the original article Hit count: 208

Filed under:
|

Hi,

Is there an easy way to have the complete code in a lstlisting environment underlined? My current solution looks like this, but I'm not really happy with it.

\begin{lstlisting}[mathescape]
   $\ul{if(gt(x1, 0)) then} $
   ...
\end{lstlisting}

Thx for any tips.

© Stack Overflow or respective owner

Related posts about latex

Related posts about lstlisting