I am using the package algorithm2e and notice that it has a great feature where vertical lines can be connected within "blocks" of code (see Vertical loop/block lines in algorithmicx with 'noend' option for examples). I am trying to add similar vertical lines connecting code that are not necessarily in blocks of if/else/while etc. but just to keep track of indents.
Below is a reproducible example:
\documentclass{article}
\usepackage[vlined]{algorithm2e}
\begin{document}
\DontPrintSemicolon
\begin{algorithm}[H]
\SetAlgoLined
\KwData{Example keyword}
\KwResult{Example result}
/* \textit{Create first function}\;
function 1 = function(input, output)\{\;
\Indp/* \textit{Create inner function}\;
function 2 = function(input, output)\{\;
\Indp/* \textit{Perform main task}\;
mainTask(function1, function2)\;
\Indm\})\;
\Indm\}\;
\caption{Psuedocode for interactive scatterplot matrix}
\end{algorithm}
\end{document}
I am trying to add vertical lines at the indents. An example of my goal end product (where I superimposed lines in green) looks as below:
Any suggestions on how to achieve these type of lines in this minimal working example would be greatly appreciated!



\Indp/\Indm? – siracusa Jun 01 '19 at 17:54