i.upmath.me icon indicating copy to clipboard operation
i.upmath.me copied to clipboard

TikZ patterns not working

Open iceghost opened this issue 3 years ago • 5 comments

Adding patterns broke a TikZ code. Here is a simple example:

$$\usetikzlibrary{patterns}
\begin{tikzpicture}
\filldraw[pattern=dots] (0, 0) rectangle (1, 1);
\draw (-1, -1) -- (2, 0);
\end{tikzpicture}$$

All I got is a blank svg. It didn't even render the line below the pattern.

iceghost avatar Feb 16 '21 15:02 iceghost

I think the problem is somewhere in my LaTeX setup or in dvisvgm. Unfortunately, I could not find it in a few hours. I'll try to update the LaTeX later.

parpalak avatar Feb 23 '21 14:02 parpalak

I've looked deeper into the problem. It turns out that the problem is in the dvisvgm utility. I have the TeX Live distribution installed. It contains dvisvgm version 2.9.1, although there is now a more recent version 2.11. The binaries in the distribution are updated once a year. The next update will be at the end of March and let's see if it fixes the problem.

Theoretically, it is possible to compile a fresh version of dvisvgm. Once I tried to do that, but I did not succeed in solving problems with dependency versions, libraries, sources and other things.

parpalak avatar Feb 24 '21 16:02 parpalak

Is there any update on this issue? I am experiencing the same.

sajozsattila avatar Jun 09 '21 10:06 sajozsattila

Sorry, I have no time to test the new LaTeX version. I think it will take some time.

parpalak avatar Jun 15 '21 21:06 parpalak

I've tested the fresh version dvisvgm in TeX Live 2021. Looks like the bug is still in place. I've created the issue on dvisvgm: https://github.com/mgieseki/dvisvgm/issues/158

parpalak avatar Aug 09 '21 19:08 parpalak

After updating to TeX Live 2023 the issue is gone: image

parpalak avatar Dec 10 '23 21:12 parpalak