Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indent line breaks when when using \Statex at the top of a new column #16

Open
jfriemel opened this issue Jul 13, 2023 · 0 comments
Open

Comments

@jfriemel
Copy link

The indent lines seem to break when using the multicol package and \Statex near the top of a new column. Here's an example:

\documentclass{article}
\usepackage{algpseudocodex}
\usepackage{multicol}

\begin{document}
    \begin{multicols}{3}
        \begin{algorithmic}[1]
            \If{\(a > 0\)}
                \Statex \hspace{\algorithmicindent}no
                \State yes
                \State yes
            \EndIf
            \If{\(b > 0\)}
                \Statex \hspace{\algorithmicindent}no
                \State yes
                \State yes
            \EndIf
            \If{\(c > 0\)}
                \Statex \hspace{\algorithmicindent}no
                \State yes
                \State yes
            \EndIf
        \end{algorithmic}
    \end{multicols}
\end{document}

And here's the corresponding output:
image

The \hspace{\algorithmicindent} is added because \Statex does not produce the correct indentation as noted by @LeCyberDucky in #7. Note that the indent lines only break in the second and third column. They do not break when \Statex is replaced by \State or when there are fewer than two lines below \Statex in a column.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant