Take the 2-minute tour ×

How I can generate separator lines for captions as follows in algorithm2e?

Algorithm 1: Generate Separator Line

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Use the ruled package option:



\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
\While{not at end of this document}{
read current\;
go to next section\;
current section becomes this one\;
go back to the beginning of current section\;
\caption{How to write algorithms}


enter image description here

share|improve this answer
your explanation is way succincter and clearer than algorithm2e's documentation! Thanks –  pegausbupt Jun 19 '12 at 14:30
add comment

Your Answer


