Inkscape and LaTeX

I’m a great fan of the open-source vector-drawing software Inkscape. Although I don’t have that many figures in my papers (or notes), I’ve found it quite accessible and easy to use to produce high-quality results. And just yesterday, as I wanted to add a picture to my notes on expander graphs, I learnt of a very nice new feature: from version 0.48 onward, one can select a special option when saving a drawing as PDF that creates an auxiliary LaTeX file, which can then be incorporated in the source file (using the standard \input command) and which contains (and processes) all the text found in the drawing. This makes it very easy to add arbitrary LaTeX (math) formulas with Inkscape.

For example, the SVG file

produces a PDF file

and a LaTeX file, and when the latter is inserted, the document reveals the beautiful picture

Published by

Kowalski

I am a professor of mathematics at ETH Zürich since 2008.

7 thoughts on “Inkscape and LaTeX”

  1. I tried this out and found the Save As ‘latex with pstricks macros’. Is that what you were using? Any idea how to get that to work with pdflatex?

  2. No, in Inkscape 0.48, when doing “Save a copy…” and selecting the PDF format for export, there is an option
    “PDF+LaTeX: Omit text in PDF, and create LaTeX file”
    and this is what I used.

  3. Well, color works for me, as far as I’ve used it at least (see the page numbered 59 of this PDF, which is produced by pdflatex and incorporates one of these Inkscape-produced pictures).

  4. Dear Kowalski,

    May you please give a detailed explanation about how on INKSCAPE the auxiliary LaTeX file (file.pdf_tex) can be incorporated to produce the merged figure+LaTex formula final result. What is the resulting file’s extension? (SVG, PDF, other?). Can the resulting file be reedited on Inkscape for further work?
    I apologize for my ignorance. Thank you very much for your help.
    Best regards,
    Pedro

Comments are closed.