I am using the algorithm environment and I do not know how to make the lines for the loops under the corresponding word, not where I have them now.
Here is my code:
\documentclass{article}
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{ragged2e}
\SetKwInOut{Parameters}{Parameters}
\begin{document}
\begin{algorithm}[htb]
\DontPrintSemicolon
\justifying
\caption{The caption}
\KwData{Some data}
\Parameters{a,b}
\KwResult{Result}
\For{something or other}{
This is some random text \;
Some more text\;
}
More text here
\end{algorithm}
\end{document}
I am getting the following:
How can I fix the problem? I want the line to appear right under for.
Thanks, any suggestion will be appreciated.

