![Línea adicional con if y comentario en línea](https://rvso.com/image/472726/L%C3%ADnea%20adicional%20con%20if%20y%20comentario%20en%20l%C3%ADnea.png)
Estoy escribiendo un algoritmo con algoritmo2e.
Quiero hacer un if en línea con \lIf
un comentario en la misma línea con \Comment*
.
\documentclass{article}
\usepackage[vlined,boxed,linesnumbered]{algorithm2e}
\DontPrintSemicolon
\SetKwIF{If}{ElseIf}{Else}{if}{then}{else if}{else}{}
\SetKwComment{Comment}{}{}
\begin{document}
\begin{algorithm}[ht]
\lIf{true}{%
foo \Comment*{bar}
}
\caption{Test}
\end{algorithm}
\end{document}
Pero produce una línea adicional no deseada:
¿Cómo eliminarlo?