Latex: vertical line in lstlistings

Posted by Helltone on Stack Overflow See other posts from Stack Overflow or by Helltone
Published on 2010-06-10T16:31:17Z Indexed on 2010/06/10 16:32 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

I want to have a vertical line for indentation in the lstlisting environment, similar to what one can get in algorithm2e. I tried doing something like the code below, but the the |'s are not contiguous and the result is ugly.

\lstset{
    ...
    showtabs=true,
    tabsize=3,
    tab=\hfill$|$\hfill,
    ...
}

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about latex