I'm using algorithm2e for typesetting pseudocode. Generally I find it easy to use, however, I cannot seem to find the setting that underlines the conditions in my while and for loops and if-statements.
\begin{algorithm}[H]
\LinesNumbered
\SetAlgoNoLine
\DontPrintSemicolon
\KwData{New relation $m_i(r_{new})m_j$}
\KwResult{An updated network where consequences of the new relation is inferred.}
\BlankLine
Add $(i,j)$ to Q\;
\While{Q is not empty} {
(i, j) $\leftarrow$ Q.dequeue;
\For{k $\leftarrow$ 0 $\KwTo$ n} {
$m_k(r_{new})m_j$ $\leftarrow$ $m_k(r)m_j \cup (m_k(r)m_i \circ m_i(r_{new})m_j)$;
\If {$m_k(r_{new})m_j \subset m_k(r)m_j$} {
Q.enqueue($(k,j)$);
}
}
\For{k $\leftarrow$ 0 $\KwTo$ n} {
$m_i(r_{new})m_k$ $\leftarrow$ $m_i(r)m_k \cup (m_i(r_{new})m_j \circ m_j(r)m_k)$;
\If {$m_i(r_{new})m_k \subset m_i(r)m_k$} {
Q.enqueue($(i,k)$);
}
}
}
\caption{Allen's Path Consistency}
\end{algorithm}
Which produces this result:

Basically, I want to disable the underlining of the conditions. Any suggestions?
\documentclass{article}\usepackage{algorithm2e}\begin{document}...\end{document}, it does not show that lines. Therefore, I can't reproduce your error. – LaRiFaRi Oct 01 '14 at 14:33\documentclassand ending with\end{document}, as I cannot reproduce your error. In the meantime, maybe Algorithm2e - Permanent fix for no italics if-clause is worth looking at. – Hackbard_C Oct 01 '14 at 14:35ulempackage. Answered my question for later reference. – ssnielsen Oct 01 '14 at 14:51