[Tex/LaTex] .pdf_tex and .pdf directory

graphics

To include a .pdf_tex file in the document, two files are required: the .pdf_tex file, and the .pdf file. While the .pdf_tex file can be placed in any folder, the .pdf file must be in the same .tex file directory.
Is there a way to make both files fit in the same subfolder?

Example:

\begin{figure}[h] 
\def\svgscale{0.3} 
\input{fig/ef1-4-1.pdf_tex} 
\caption{Immagine creata con Inkscape} 
\label{fig:your image label} 
\end{figure}

Best Answer

Possibility 1:

You can add \graphicspath{./fig/} to your document. This adds the subfolder to the places tex looks for images. For example if you add this command to your preamble, you can include all the images from this folder just by their name and you don't need to write their path each time.

Possibility 2:

Or you could edit ef1-4-1.pdf_tex. It should have one or more lines with

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

replace them by

\put(0,0){\includegraphics[width=\unitlength,page=1]{./fig/ef1-4-1.pdf}}%