2

I use \input for a subsection, in which I would like to include a pdf_tex file MK.pdf_tex via \input. The pdf_tex files are in a folder /fig. If I use \input{./fig/MK.pdf_tex} it returns the error "MK.pdf not found".

If I try to use the graphicspath as shown in the code below, I get the error "MK.pdf_tex" not found.

\usepackage{graphicx}
\graphicspath{{C:/Thesis/fig/}{./fig/}}
\begin{document}
\input{subsection}
\end{document}

And in my subsection:

\begin{figure}[!ht]
\centering
\def\svgwidth{8cm}
\input{MK.pdf_tex}  
\end{figure}

Thus, I assume that in the first case, only the pdf_tex gets the path information from input. In the second case I guess, that the graphicspath does not work.

If I put the MK files in the same folder as my subsection.tex, it works.

Thank you very much in advance, Doedork

2

The \graphicspath{} command defines the directories only for \includegraphics{}, therefore in the \input command you have to use the relative position, like \input{./fig/MK.pdf_tex}. If I remember correctly, there is the \inputx package that allows doing the same for \input; maybe you want to give it a try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.