[Tex/LaTex] Adding a blank line in algorithm2e

algorithm2eline-breaking

Is there any way to add a blank line in algorithm2e?

I have the following document:

\documentclass{article}
\usepackage[linesnumbered]{algorithm2e}% http://ctan.org/pkg/algorithm2e
\begin{document}
\begin{algorithm}
\SetAlgoLined
i = 1 + j\\
% I would like to add a \linebreak here
j = 1 + i\\
\end{algorithm}
\end{document}

This outputs:

enter image description here

I would like to have:

enter image description here

If I add \\ or \linebreak between i = 1 + j\\ and j = 1 + i\\ I get the following error message:

enter image description here

Best Answer

algorithm2e's line-ending macro is \;. From the algorithm2e documentation:

9.1 global code typesetting commands

\; marks the end of a line. Don’t forget it! By default, it prints a ‘;’. You can change this with \DontPrintSemicolon.

enter image description here

\documentclass{article}
\usepackage[linesnumbered]{algorithm2e}% http://ctan.org/pkg/algorithm2e
\DontPrintSemicolon 
\begin{document}
\begin{algorithm}
  $i = 1 + j$\;
  \;
  $j = 1 + i$
\end{algorithm}
\end{document}