The Inkscape drawing package can export to a large variety of vector drawing formats, including LaTeX. If you save your drawing to a file foo.tex
, you can include the file in a LaTeX document as follows.
\documentclass{article} \usepackage{pstricks} \begin{document} Testing Inkscape \LaTeX\ output. \input{foo.tex} \end{document}
Of course you could always export the drawing to an image format and include that image the way you’d include any other image. But you also have the option of directly including the content Inkscape output in your LaTeX file rather than referencing it as an external file using the input
statement. This makes your LaTeX file self-contained and is something you could not do, for example, with a PNG file.
Two notes:
- You must use the
pstricks
package. - You must compile the file with
latex
and notpdflatex
. To create a PDF file, you must first compile to PostScript.
The next post is a sort of opposite of this one. It explains how to use LaTeX inside an Inkscape drawing.
There is now a new way for this so that font matches the one used in LaTeX.
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.48#New_LaTeX_export_for_PDF.2FEPS.2FPS