[Tex/LaTex] pdf_tex file not found

errorsgraphicsinkscape

I'm trying to include an image (edited in Inkscape) in my document.
However, everytime I run the file , it says "File not found".

In Inkscape i have saved the document as .pdf and used the latex option as
given by: http://www.howtotex.com/tips-tricks/inkscape-images-with-latex-fonts/

I have tried:

  • export area as page
  • export area as drawing,

to find out if that may be the problem, but error still persist.

Both the .pdf as .pdf_tex file are in the same file as my .tex file.

Note: The example image (given in link above), also in the same file as my .tex file, works perfectly.

This is the code i'm using:

\documentclass[]{article}
\usepackage{graphicx}
\usepackage{color}
\usepackage{transparent}
\begin{document}
\begin{figure}[htb]
\centering
\def\svgwidth{200pt}
\input{drawing4.pdf_tex}
\caption{Double pendulum}
\end{figure}
\end{document}

This is the error message that keeps showing up:

enter image description here

I am using Texmaker and Inkscape 0.48

Any help will be much appreciated

Kind regards,

Andrew


EXTRA:

So I think i should add this to give a little more insight into the problem.

This is the image i want to include in my document. The graph I copied it from another document using sniptool and paste it in Inkscape. I want to give it a header and add the symbols underneath so it can have the same font as my tex document. You know, to have a nice and uniform document.

When I draw some random figures in Inkscape and include text such as MoS$_2$ and export it to pdf+LaTeX, it work perfect.

I think it has something to do with editing this image.

What I added was: the text in the top and bottom and the blue numbers

Question reformulation:
Can I edit a photo/image (adding text, arrows etc) in Inkscape and export it to pdf+latex and have it work perfectly?

Thank you in advance!
enter image description here

Best Answer

Update:

The "extra info" shows a percent sign in the label text: MoS$_2%--WS$_2$. The unprotected percent sign act as comment char, the rest of the line is ignored by TeX and leaves the \put that sets the label unfinished. A percent sign can be generated by \% in TeX, but I think it is just a typo and a $ sign is intended to close the math for the subscript: MoS$_2$--WS$_2$.

Older analysis:

Your drawing4.pdf_tex is broken, truncated inside the arguments of a \put command, the correct error message is:

! File ended while scanning use of \put.
<inserted text> 
                \par 
l.9 \input{drawing4.pdf_tex}

? 

A .pdf_tex file is basically:

\begingroup
  % some settings
  \begin{picture}(1,...)%
    \put(0,0){\includegraphics[width=\unitlength]{drawing4.pdf}}%
    \put(...,...){...}
    ...
  \end{picture}%
\endgroup

The following file

\begingroup
\begin{picture}(1,1)  
\put(0,

generates the same errors as drawing4.pdf_tex.

The inkscape export has failed, try again, possible reasons:

  • Inkscape export: Bug/error/abnormal abortion.
  • Disk full.
  • ...