TeX - LaTeX Asked by ea42_gh on September 24, 2020
documentclass[tikz]{standalone}
begin{document}
begin{tikzpicture}[scale=1.3]
draw[help lines] grid (5, 5);
draw[fill=magenta!10] (1, 1) rectangle (2, 2);
draw[fill=magenta!10] (2, 1) rectangle (3, 2);
draw[fill=magenta!10] (3, 1) rectangle (4, 2);
draw[fill=magenta!10] (3, 2) rectangle (4, 3);
draw[fill=magenta!10] (2, 3) rectangle (3, 4);
end{tikzpicture}
end{document}
I ran
latexmk -xelatex -etex sample.tex
dvisvgm --font-format=woff2 --exact sample.xdv sample.svg
and got an empty output.
Using pdf2svg instead succeeds.
Why does my dvisvg command fail?
By default, TikZ creates PDF specials when used together with xelatex -no-pdf
. dvisvgm doesn't support these specials and therefore the generated SVG contains no graphics.
In order to create proper specials, either process the .tex
file with latex
instead of xelatex
, or add document class option dvisvgm
:
documentclass[tikz,dvisvgm]{standalone}
Correct answer by Martin on September 24, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP