My example algorithm

I'm pretty satisfied with the output above, yet would prefer having the topmost and the bottom horizontal lines bolder. Any help?

1 Answer 1


The following length names seem to control the rule heights:

\setlength\algoheightrule{<height>}        % The upper and the lower rules
\setlength\algotitleheightrule{<height>} % The rule between a title and code

If you want to restore the default lengths, run the following


The example:

enter image description here


\setlength\algoheightrule{2pt}        % Upper and lower rules
\setlength\algotitleheightrule{1.2pt} % Rule below the title

    \Input{A bitmap $Im$ of size $w\times l$}
    \Output{A partition of the bitmap}
    \emph{special treatment of the first line}\;
    \For{$i\leftarrow 2$ \KwTo $l$}{
    \emph{special treatment of the first element of line $i$}\;
    \For{$j\leftarrow 2$ \KwTo $w$}{\label{forins}
    \Left$\leftarrow$ \FindCompress{$Im[i,j-1]$}\;
    \Up$\leftarrow$ \FindCompress{$Im[i-1,]$}\;
    \This$\leftarrow$ \FindCompress{$Im[i,j]$}\;
    \If(\tcp*[h]{O(\Left,\This)==1}){\Left compatible with \This}{\label{lt}
    \lIf{\Left $<$ \This}{\Union{\Left,\This}}
    \If(\tcp*[f]{O(\Up,\This)==1}){\Up compatible with \This}{\label{ut}
    \lIf{\Up $<$ \This}{\Union{\Up,\This}}
    \tcp{\This is put under \Up to keep tree as flat as possible}\label{cmt}
    \lElse{\Union{\This,\Up}}\tcp*[h]{\This linked to \Up}\label{lelse}
    \lForEach{element $e$ of the line $i$}{\FindCompress{p}}
    \caption{disjoint decomposition}\label{algo_disjdecomp}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .