Skip to content

BeginBox sticking out of its indent level #22

@tomtomjhj

Description

@tomtomjhj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions