# why does dvisvgm fail on this tikz figure?

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.

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

## Related Questions

### Biblatex biblography prints all caps letters when using UTF8 special characters

1  Asked on July 27, 2021

### How do I reduce the space between the caption of the image and normal text?

1  Asked on July 27, 2021

### Undesired spaces in newenvironment break commands

1  Asked on July 27, 2021

### Rounding to the nearest negative integer

1  Asked on July 27, 2021

### TexStudio forward- and inverse search with build in and Sumtra PDF

2  Asked on July 27, 2021

### How can I get scaled x ticks=false to work with xbar stacked in pgfplots?

1  Asked on July 27, 2021

### How to align an image to the top of page/paper using tikz?

1  Asked on July 26, 2021

### Typsetting Furigana in LaTeX (AUTOMATICALLY)

0  Asked on July 26, 2021 by imaizumi

### mathcal incompatible with unicode-math

1  Asked on July 26, 2021 by misaya

### How to switch from biblatex+biber to natbib+bibtex?

2  Asked on July 26, 2021

1  Asked on July 26, 2021 by user2010s

### Move chapter title to the top left of page

1  Asked on July 26, 2021 by seddon016

### Align all marks/points to the right in exam class

1  Asked on July 26, 2021

### beamer shading columns and highlight extra

1  Asked on July 26, 2021

### Adressing a node in a foreach tikz chain

1  Asked on July 26, 2021

### How do I change labels of the enumerate environment?

2  Asked on July 26, 2021 by benedito

### How to make a math presentation for 4 year old children with Beamer?

1  Asked on July 26, 2021 by hache-dos-o

### biblatex: If comma-separated organizational unit names as publisher are braced individually, most disappear — why?

2  Asked on July 26, 2021 by user570286

### How I can make space 10 pt between chapter and text?

1  Asked on July 26, 2021 by ph2021

### How to include a PDF that appears as its own section in the table of contents

0  Asked on July 26, 2021 by marses