# Exporting an inkscape drawing to latex

I need help please, I'm new to using latex and inkscape. I saved my image from inkscape as a pdf_latex file, in the same directory as my latex document. Then in my latex document I added the following code:

\begin{figure}[htb]
\centering
\def\svgwidth{columnwidth}
\input{imagename.pdf_tex}
\end{figure}


I also included graphicx.

When I run pdflatex it says process excited with errors. I clicked on it to see the errors, but it says no latex errors detected. I'm not sure what I'm doing wrong.

• How does the resulting pdf look (after running pdflatex), is the output what you expect or not? Which editor/compiler/operating system do you use? Could you try to discover the actual error message, maybe there is some information in the log file? – Marijn Mar 19 '16 at 16:12
• can you try \def\svgwidth{\columnwidth} ? – samcarter_is_at_topanswers.xyz Mar 19 '16 at 16:32
• There's no pdf output, it says file not found. I'm using windows 8, texmaker. – user101097 Mar 19 '16 at 16:43
• Am I supposed to run something else before running pdflatex – user101097 Mar 19 '16 at 16:43
• Please post a full MWE (minimum (non)working example). Let's see a whole complete small document with some text as well as your figure, that compiles when you comment out the figure. – Ethan Bolker Mar 19 '16 at 17:02

You should look for .pdf_tex file. Inside it, it has some infos and point to pdf file generated.

\put(0,0){\includegraphics[width=\unitlength,page=1]{file.pdf}}%

Make sure that file is pointed right. If generated file has multiple pages, change all of them.

When in subfolders like

img/

You should consider adding it manually or using the

\graphicspath{{img/}}

I also prefer using:

\begin{figure}[h] \centering \resizebox{1\columnwidth}{!}{file.pdf_tex}} \end{figure}

• Somehow I'm still getting an error, think I'll just leave the file as a pdf and not a pdf_tex file. Thank you though – user101097 Mar 20 '16 at 18:32
• @user101097 I am not really surprised. I have no idea how this is supposed to work. Which isn't to say that it doesn't. But it certainly isn't at all clear from this. In any case, don't use h as the sole placement option for floats. If you don't want the image to move, don't make it float at all. – cfr Mar 31 '16 at 2:21