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

BeginBox sticking out of its indent level #22

Open
tomtomjhj opened this issue Dec 18, 2024 · 1 comment
Open

BeginBox sticking out of its indent level #22

tomtomjhj opened this issue Dec 18, 2024 · 1 comment

Comments

@tomtomjhj
Copy link

tomtomjhj commented Dec 18, 2024

Hi, thanks for nice package. I noticed that after e5ea726, if the highlight box created by \BeginBox contains an indented block (e.g., \If), it escapes its indent level (reset to 0) and covers the indent guide.

Here is a minimal reproducer (tested on ubuntu 22.04):

\documentclass{article}
\usepackage{algpseudocodex}

\begin{document}

\begin{algorithmic}[1]
  \While{asdf}
    \State asdf
    \BeginBox[fill=yellow]
    \If{asdf}
      \State asdf
    \EndIf
    \EndBox
    \State ...
  \EndWhile
\end{algorithmic}

\end{document}

Before e5ea726 (expected behavior):
image

After e5ea726 (current, broken behavior):
image

@chrmatt
Copy link
Owner

chrmatt commented Dec 19, 2024

Thanks for the detailed report! As a workaround until it gets fixed, I suggest to end the box inside the if block:

\BeginBox[fill=yellow]
\If{asdf}
  \State asdf
  \EndBox
\EndIf

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

2 participants