I'm trying to understand how Inkscape works with LaTeX? What are the steps to export any figure drawn with this program in LaTeX language? Is the code TikZ or something else? Could someone suggest me how to proceed? Thank you.
-
1Two possible ways: either save as pdf with separate text or export to tikz. For the later, see https://tex.stackexchange.com/a/409231/36296 – samcarter_is_at_topanswers.xyz Jun 12 '18 at 21:50
-
1For the first option, have a look at https://tex.stackexchange.com/a/415825/36296 – samcarter_is_at_topanswers.xyz Jun 12 '18 at 21:51
-
Can I see your step with the screenshots of the software please? For me is better of a link. – Jun 12 '18 at 21:52
2 Answers
Ok so here we go.
I decided to make this visual tutorial because some people are just more cartesian... Also because the extension has changed in the last years.
But don't be lazy, be sure to check this answer and this too, and if you run into problems with text check this.
First thing is to download the svg2tikz (here), this should be pretty straightforward, just click on the green button and save (or open) the .zip file.
Open your windows explorer and go to C:\Program Files\Inkscape\share\extensions
it is inside this folder that the extension files will be drop, leave it open.
Open the zip file and navigate to svg2tikz-master\svg2tikz\extensions\ it should look like this:
Select the first 3 files and drag'n'drop them to the folder you left open before. This should be C:\Program Files\Inkscape\share\extensions, and look like this:
Once you done that, open Inkscape. Make your drawing and select Save As...
You may also use the Extension menu and go for Export, but you won't get to choose where the file is saved.
At the end of the list you will see Tikz Code .tex like this:
In my example the image code is:
\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
\path[draw=black,line join=miter,line cap=butt,line width=0.056pt]
(12.2944,5.9435) -- (23.2524,102.6950) .. controls (35.7691,59.6863) and
(34.2478,-2.8197) .. (107.7096,38.8176);
\end{tikzpicture}
- 2,047
download svg2tikz from https://github.com/kjellmf/svg2tikz
Extract the files
tikz_export.py, tikz_export_effect.inx, and tikz_export_output.inxfromsvg2tikz-master/svg2tikz/extensionsand put them in the share/extension directory inside the Inkscape installation directory, and it is in/usr/share/inkscape/extensionsfor ubuntuDraw desired picture in Inkscape
Export from the menu: Extension -> Export -> Export to TikZ path
- 111
-
the extentions directory for Inkscape also can be
~/.config/inkscape/extensions– Gavin Gao Jul 12 '19 at 05:37



