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

pgf layers do not get cleared #2412

Open
xworld21 opened this issue Sep 5, 2024 · 0 comments
Open

pgf layers do not get cleared #2412

xworld21 opened this issue Sep 5, 2024 · 0 comments

Comments

@xworld21
Copy link
Contributor

xworld21 commented Sep 5, 2024

A baffling scope bug, seemingly related to some issues reported on ar5iv. I spotted this in the atoms-and-orbitals test: the content of pgf layers (created via pgfonlayer) does not clear when closing a group.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
    \pgfdeclarelayer{background}
    \pgfsetlayers{background,main}
    \draw[red] (-1,0) -- (1,0);
    \begin{pgfonlayer}{background}
    \filldraw (0,0) circle (4pt);
    \end{pgfonlayer}
\end{tikzpicture}
\begin{tikzpicture}
    \pgfdeclarelayer{background}
    \pgfsetlayers{background,main}
    \draw[red] (-1,0) -- (1,0);
\end{tikzpicture}
\end{document}

renders as
image
You can see that the black circle is still in the background layer even if it's a new image.

@dginev dginev added this to the LaTeXML-0.8.9 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants