Closed rfdonnelly closed 1 year ago
A simplified example:
\ifnum\pdfoutput>0 % pdf output
\documentclass[tikz, margin=5pt]{standalone}
\else % dvi output
\documentclass[dvisvgm, tikz, margin=5pt]{standalone}
\fi
\begin{document}
\begin{tikzpicture}
\node[draw] {before {\color{gray}GRAY} after};
\end{tikzpicture}
\end{document}
pdflatex
output):
latex -> dvisvgm
output):
Rrelevant .dvi
content (dumped using dviasm
). I'm far from familiar with dvi operations hence not able to say if they are alright.
Just a workaround: Since this picture is simple (from ps-special's view, for example no shading no pattern), dvisvgm is able to process the .dvi output of latex
without setting tikz backend to dvisvgm
(default backend is dvips
I think).
Hence the original \documentclass[tikz,border=5mm]{standalone}
works.
Unfortunately, this workaround doesn't help automatic compiling required by https://github.com/yuzutech/kroki/pull/1440.
Thank you for minimizing the example!
Thanks for reporting the issue. It's a bug in dvisvgm's character handler that's easy to fix. I'll push the patch shortly.
Wow, this once again pushes me to try compiling dvisvgm on macOS, instead of waiting for the update from texlive once a year.
Thank you @mgieseki!
Hello. This is a follow on to #225 which was resolved by having me use the PGF/TikZ dvisvgm backend driver. Thank you for that. Using the dvisvgm backend driver fixed the "focused ion beam system" example but it breaks the periodic table example at https://tikz.net/periodic-table.
The labels for the gray elements get misplaced (red annotations mine):
I suspect this is an issue with the PGF/TikZ dvisvgm backend driver instead of dvisvgm itself but I thought I would start here first to confirm.
Screenshot Comparison
Click the images for the corresponding SVG/PDF source file:
Versions
I get the same results with both of the following configurations.
Alpine Linux 3.17
texlive Docker Image
Reproduce
Copy the example from https://tikz.net/periodic-table to
default.tex
.Copy
default.tex
todvisvgm.tex
and modify as follows:Then run: