I'm trying to generate a gif from a tikz picture, using tikz's external
library. Ultimately, my plan is to
- Convert a picture to gif
- write a node style that converts the nodes' coordinates to pixel offsets in a map file
- use them together on a web page.
If somebody has done this before, I'm glad to get a pointer.
However, I have adapted the example from the tikz documentation which uses convert
in a system call. The only difference to the original example is that I don't add code to include external
and that I changed the desired output format to gif
:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzset{
gif export/.style={
external/system call/.add=
{}
{; convert -density 300 -transparent white "\image.pdf" "\image.gif" },
%
/pgf/images/external info,
}
}
\tikzexternalize
\tikzset{gif export}
\begin{document}
\begin{tikzpicture}
\draw (0,0) node[draw,minimum width=1in] {TestNode};
\end{tikzpicture}
\end{document}
- The resulting main.pdf is empty,
- the externalization library creates an empty main-figure0.pdf and main-figure0.dpth
- an additional file called
}
is created, but I don't know what I can do with it.
I have the impression that the closing }
after "\image.gif"
is causing problems. When I change that line to end with
"\image.gif"},
(no space between gif
and }
), the resulting converted file is called main-figure0.gif}
and also empty.
but I have no idea how I can fix this.