# visualize code indentation

How can I visualize code indentation? What I want is to draw a vertical line along the indentation. Since an example is easier to show then to explain you can see one in this paper (on page 2)

-

Use the "algorithm2e" package a short example is shown below:

\documentclass{article}
\usepackage{algorithm2e}
\begin{document}
\SetAlgoLined
\begin{procedure}
\Switch{the value of T}{
\uCase{a value}{
do this\;
do that\;
}
\lCase{another value}{one line}\;
\Case{last value}{
do this\;
break\;
}
\Other{
for the other values\;
do that\;
}
}
\end{procedure}
\end{document}

-
@Yiannis: Did you read the question? It clearly says "What I want is to draw a vertical line along the indentation." –  Hendrik Vogt Jan 14 '11 at 12:52
@Hendrik I read the part ..."you can see one in this paper (on page 2)", that clearly shows code that was typeset with alogorithm2e. How did you understand it? –  Yiannis Lazarides Jan 14 '11 at 14:25
@Yiannis: On page 2, I see that there are vertical lines along the indentation. And the OP asks how to reproduce that. –  Hendrik Vogt Jan 14 '11 at 14:47
@Hendrik The only thing missing from Yiannis's answer is the line \SetAlgoVlined (or \SetAlgoLined depending on the style you want.) –  Alan Munn Jan 14 '11 at 16:07
@Alan: Well, then that's the essential thing missing. From how I read the question, this was the only thing the OP wanted to know. But: Thanks for the info; maybe you want to post a separate answer, or Yiannis edits his answer. –  Hendrik Vogt Jan 14 '11 at 16:13