Skip to content

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

Description

@yspjack

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions