pgf
pgf copied to clipboard
Documented `tikz` option `dvisvgm` is not supported
Brief outline of the bug
Current state:
- In sec. 10.2.4 "Producing SVG Output", the pgfmanual reads
If the option
dvisvgmis given to thetikzpackage, this driver gets selected (normally, the driver selected by graphics would be used). - But
tikz.stydeclares no options. - As a package option,
dvisvgmis only known topgfsys.sty. https://github.com/pgf-tikz/pgf/blob/6e5fd71581ab04351a89553a259b57988bc28140/tex/latex/pgf/systemlayer/pgfsys.sty#L12 - Hence currently to use
dvisvgmdriver (fortikzorpgfLaTeX package), one has to either defining\def\pgfsysdriver{pgfsys-dvisvgm.def}or using it as a class option. (LaTeX packages won't throw errors for unknown global/class options.)
Some history:
- Commit 10624dcc (*** empty log message ***, 2013-08-23) added package option
dvisvgmforpgf.styand the corresponding doc mentioned above. (Yes, the option was added topgf.sty, but documented fortikz.sty.) - Commit ab8bbb59 (fixed Vertex.lua anchoring problem, 2013-12-18) moved option
dvisvgmfrompgf.stytopgfsys.sty.
Proposal:
- Add
tikzpackage optiondvisvgm(how to treat the same option inpgfsys?) - Revise related doc since
graphicxpackage now supportsdvisvgmdriver (hence\PassOptionsToPackage{dvisvgm}{graphicx}is another possibility).
Minimal working example (MWE)
% !TeX program = latex
\documentclass{article}
\usepackage[dvisvgm]{tikz}
\begin{document}
\end{document}
- Add
tikzpackage optiondvisvgm(how to treat the same option inpgfsys?)
One possibility is to add dummy option dvisvgm to both tikz.sty and pgf.sty.
\DeclareOption{dvisvgm}{} % will be used later in pgfsys.sty
\ProcessOptions % tikz.sty needs this