Skip to content

TikZ causes \lsstyle to have a global effect #49

@sorsted

Description

@sorsted

Description

In LuaTeX, if you use TikZ when \lsstyle is in effect, then \lsstyle will for some reason also affect things outside of the current group. It doesn’t happen with pdfTeX.

This was first reported here.

Minimal example demonstrating the issue

\documentclass{article}

\usepackage{microtype,tikz}

\AddToHook{shipout/foreground}{
    \put(-.1cm, -5cm){%
        \Huge P%
    }
}

\begin{document}


{\lsstyle Hello World
\tikz\draw (0,0) -- (1,0);%
}

Test


\end{document}

Compiling with LuaTeX, we get:

enter image description here

Now let’s comment out the TikZ part. This shouldn’t change the output of anything outside the group:

{\lsstyle Hello World
%\tikz\draw (0,0) -- (1,0);%
}

enter image description here

As you see, there is a small, but visible difference regarding the position of the P in the margin. If you compare them closely, you will also see that the “Test” has shifted ever so slightly to the right.

Compiling with pdfTeX, there is no difference in output. It also doesn’t happen without \lsstyle.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions