BHOSC/BUAAthesis

Conditions in algorithm are underlined automatically using algorithm2e package and TeXLive 2022

Opened this issue · 0 comments

Description

When I use algorithm2e to write pseudocode, the condition statements are underlined automatically because of ulem included in buaathesis.

How to reproduce

Here is an example. Texlive version is 2022.

\documentclass[master,openright,twoside,color,AutoFakeBold=true]{buaathesis}
\usepackage{algorithm2e}
\begin{document}
\begin{algorithm}[ht!]
    \SetAlgoLined
    \KwData{this text}
    \KwResult{how to write algorithm with \LaTeX2e }
    initialization\;
    \While{not at end of this document}{
        read current\;
        \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}

Expected output

Conditions in While and If statements without underline.

Actual output

Conditions in While and If statements are underlined automatically.

屏幕截图 2024-04-12 181935