I am trying to convert an SVG image (or a PDF image) to TikZ
code. I installed svg2tikz two ways, 1) as an Inkscape
extension and 2) as a Python pip extension.
The documentation is useless. I cannot find any documentation on how to actually use svg2tikz
either as an Inkscape
extension or via python.
Another answer suggested using the code
tikz_export.py example.svg -o example.tex
but when I try to use it for my problem I obtain
~/Downloads> python tikz_export.py DeformedContour.svg .o DeformedContour.tex File "tikz_export.py", line 8 ^ SyntaxError: invalid syntax
I don't care how to convert either the PDF or the SVG image to TikZ
, it just needs to be converted.
svg2tikz
so I don't think I can help with this specific question. But why don't you just include the PDF directly or use the SVG package? What do you need the TikZ code for? It's probably going to be a mess anyways.python
call uses Python 2 and the code expects Python 3 or vice versa? Other than that,svg2tikz
is not very actively maintained judging from the Github page, so you may have more luck using one of Inkscape's built-in export formats or even redoing the graphic in TikZ from scratch (which may take some time but you will learn a lot and the result may be nicer and more readable/adjustable than automatically exported code).