7

(Apologies if this is too far from topic, but I thought it might be of interest to some here)

I am writing a makefile to take a bunch of SVGs that I have drawn and turn them into TikZ pictures via SVG2TikZ, but not stand-alone .tex files as is the default - I will be \includeing these in another file. I have no issues with the makefile. The documentation for command line usage of SVG2TikZ however is sadly not quite up to scratch. The following code works to give a stand-alone file:

 python tikz_export.py Tux.svg -o tux.tex

(taken from TeXample.net, using the Tux image linked to at the blog post, and also my own SVGs using appropriate substitutions).

I could conceivably hack the code, but I'd rather not (the relevant bits are near the bottom). Can anyone see a way of calling from the command line and getting a TikZ picture?

5
  • Just to clarify: what you're asking is "is there a way to use tikz_export.py to get just a tikzpicture environment, without the full document preamble?"
    – Jake
    Dec 11, 2013 at 7:48
  • So basically, when including the converted document, you want to ignore everything up to and including the \begin{document} and after the \end{tikzpicture}. I think that the standalone class does something similar. Dec 11, 2013 at 8:29
  • Either of those would be good. A third alternative would be to get a standalone picture which can then be compiled then included as a PDF image. Dec 11, 2013 at 22:16
  • @Jake yes (filler) Dec 16, 2013 at 0:19
  • @AndrewStacey yes Dec 16, 2013 at 0:22

1 Answer 1

5

The svg2tikz --figonly option generates a tikzpicture environment which can be included in a TeX document.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .