0

I am able to display a image from a .eps file correctly using the below code.

\begin{figure}[t!]
\centering
\includegraphics[keepaspectratio, width=.6\textwidth, trim={0 7cm 0 6cm},clip]{ware.eps}
\caption{Ware}\label{figures:ware}
\end{figure}

Now I trying to include the pdf_tex file which I exported from Inkscape but the image is not being displayed. Both the pdf and pdf_tex files are in the same directory. I am using the below code for this. I get the error "Error: File `ware.pdf_tex' not found. [\input{ware.pdf_tex}]"

\begin{figure}[t!]
\centering
\input{ware.pdf_tex}
\caption{Ware}\label{figures:ware}
\end{figure}

Could someone please help me with this issue. I am new to latex.

18
  • Do you get any error messages? Oct 16, 2016 at 21:55
  • Maybe the size is unsuitable. Try to define `\def\svgwidth{.9\textwidth}' or similar. Oct 16, 2016 at 21:57
  • @samcarter: Sorry, I just added the error. Its "Error: File `ware.pdf_tex' not found. [\input{ware.pdf_tex}]"
    – aries
    Oct 16, 2016 at 22:10
  • 1
    Use of dot in file name is not good idea. The file extension pdf_tex is unknown (at least to me).
    – Zarko
    Oct 16, 2016 at 22:20
  • 1
    You say the .pdf_tex file is in the same directory as the .pdf. Is it in the same directory as your main .tex file? What is in the .pdf_tex file exactly? I'm not familiar with the process.
    – cfr
    Oct 16, 2016 at 22:48

2 Answers 2

1

The problem was with the file path not being specified properly. With "\includegraphics" I had the path specified as "\graphicspath{ {figures/} }" . However, for "\input" I had to explicitly specify the path.

\input{figures/ware.pdf_tex}
0

Have a look at this. Your problem may be that your figure files aren't in the same directory as your main file, that you're missing the svgwidth line (so latex doesn't know at what size to display the image) or that you're mixing eps and pdf. Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .