# How to insert line before if/while-clause using Algorithms2e?

When I insert more than one new line before the if-clause of an algorithm; or a new line between two if-clauses in an Algorithms-section, I get the following error: []

! LaTeX Error: There's no line here to end.


Here follows extracts from my code:

\usepackage{algorithm2e}
\begin{algorithm}[h]
(..)
\\
\If{ $currentFecUnit$ > $HIGHEST\_FEC\_UNIT\_NR\_DECODED\_GLOBAL$ OR
( $currentFecUnit$ == 0 AND $nrOfPacketsReceived$ == 1 ) }
{
}


How do I add one more line before the if-clause without gettin syntax-error?

-

You can use \BlankLine:

\documentclass{article}
\usepackage{algorithm2e}

\begin{document}

\begin{algorithm}[H]
\SetAlgoLined
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
\BlankLine
\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{document}


-