I'm using the algorithm2e package for pseudocode. I got some very long lines that needed to be wrapped. Is there a way to indent the following (breaked) lines and/or put a mark at the first line to signalize that there happened a linebreak (similar to solution for listings package)
I found a similar question for the listings package, that was answered before, but I'm looking explicitly for an algorithm2e solution.
Best Answer
The following minimal example defines
\nosemic
: remove printing of the end-of-line (EOL) character (typically;
);\dosemic
: reinstate printing of the EOL character;\pushline
: indents line by1em
(the typical indent); provided byalgorithm2e
as\Indp
;\popline
: remove indent of\pushline
(undent?); provided byalgorithm2e
as\Indm
Since I am unfamiliar with your
algorithm2e
setup, I'm not sure how you would like to combine the four commands. As such, I've kept them separate for maximum (yet manual) usage.