Exporting from Inkscape to LaTeX - via TikZ

Edit: @XiaodongQi comments below that

The same options are no longer available in the newer version of Inkscape. But there are similar options when saving the PDF.

You can save your inkscape figures as pdfs and put them in your document with \includegraphics. If you have text in your figures you can select the PDF+LaTeX option from the inkscape save-as pdf menu. That will create a pdf_tex file instead. You \input that file and TeX does the typesetting.

In inkscape:

enter image description here

Saving from inkscape after selecting save-as pdf. Inkscape writes file topview.pdf_tex:

enter image description here

In the document:

\begin{figure}[h]
\centering{
\resizebox{75mm}{!}{\input{images/topview.pdf_tex}}
\caption{Top view.}
\label{fig:topView}
}
\end{figure}

Output:

enter image description here

This is clearly a picture that could be drawn with tikz, but I chose not to, for reasons you spelled out in your response to @HarishKumar - the longer tikz learning curve and a preference for wysiwyg for occasional use. If you did need precise placement (lines really meeting at corners) you might be able to do that with the snap-to features of inkscape. I haven't tried those yet.


After exporting (described by Ethan Bolker) use the following snippet to embed the image generated by Inscape:

\begin{figure}
\def\svgwidth{\linewidth}
\input{img/filename.pdf_tex}
\caption{}
\end{figure}

Using \def\svgwidth{desired width} instead of \resizebox will preserve the font size. This is the recommended way described in the head of the generated file:

%% Creator: Inkscape 0.91_64bit, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file '_masks.pdf' (pdf, eps, ps)
%%
%% To include the image in your LaTeX document, write
%%   \input{<filename>.pdf_tex}
%%  instead of
%%   \includegraphics{<filename>.pdf}
%% To scale the image, write
%%   \def\svgwidth{<desired width>}
%%   \input{<filename>.pdf_tex}
%%  instead of
%%   \includegraphics[width=<desired width>]{<filename>.pdf}
%%
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%%   \usepackage{import}
%% in the preamble, and then including the image with
%%   \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%%   \graphicspath{{<path to file>/}}
%% 
%% For more information, please see info/svg-inkscape on CTAN:
%%   http://tug.ctan.org/tex-archive/info/svg-inkscape
%%