I am new at algorithm2e and I'm really struggling with the most simple things.
I would like to write an algorithm (pseudocode) with a few functions that call each other. For now, I have this minimal (not)working example:
\begin{algorithm}
\caption{Some algorithm}
\label{alg:some-algorithm}
\DontPrintSemicolon
\SetKwFunction{FMain}{Main}
\SetKwFunction{FTest}{Test}
\FMain{$f$, $a$, $b$, $\varepsilon$}{
a\;
b\;
\KwRet\;
}
\FTest{$f$, $a$, $b$}{
a\;
b\;
\KwRet\;
}
\end{algorithm}
As you can see, the first line of code a is on the same line as the function definition. Also, nothing is indented and the whole thing looks rather ugly.
What am I doing wrong?


\FMain{$f$, $a$, $b$, $\varepsilon$}{and thea\;?Mainprocedure/function along with two other procedures/functions.