Suppose that i have this code:
\usepackage[ruled,vlined]{algorithm2e}
\begin{dcocument}
\begin{algorithm}[H]
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms}
\end{algorithm}
\end{dcocument}
Result:
Where are end
words?
Best Answer
The
vlined
option suppresses the printing of “end”. Just remove the option, keeping justruled
: