0

I am writing my bachelor thesis with MiKTeX/TeXstudio and I am using \input with seperately defined graphic paths for inserting my .pdf_tex graphics. Everything worked fine until I changed my PC. Now not a single PDF is found. I doublechecked the new paths. Could there be some issue with some predefined path while installation or something like that?

There is no message like ".pdf_tex isn't found", so there is no issue with that call.

Error message:

Package pdftex.def Error: File `"""filename".pdf' not found: using draft setting. ...idth=\unitlength]{filename.pdf}}

Preamble:

\def \FigPath {"C:/Users/.../"}
\graphicspath{\FigPath}

Document:

\begin{figure}
    \centering
    \graphicspath{{\FigPath "folder1/folder2/"}}
    \ffigbox[\boxbreiteL]{\def\svgwidth{\figurebreiteL}\input{figfoleder/folder1/folder2/filename.pdf_tex}}{\caption[shortcaption]{caption}}}
    \graphicspath{\FigPath}
\end{figure}

To be clear: Everything worked fine before.

Edit: I figured out, that the two packages "graphicx" and "color" are unterlined in red and commented with "package not found". Did the install packages on the fly function fail in these cases?

6
  • When posting a question please make sure to always include a complete MWE
    – Raven
    Commented Oct 11, 2019 at 6:52
  • That being said:If LaTeX tells you that it didn't find some pakages, that's likely to be the source of whatever error comes afterwards. I think MikTeX should have a way of seeing which packages are currently installed. Maybe you should have a look there...
    – Raven
    Commented Oct 11, 2019 at 6:53
  • Did that. It seems that the same graphic related packages are installed as on the old PC (4 packages containing "graphicx"). As I said before, the code runs without error.
    – oemu
    Commented Oct 11, 2019 at 7:02
  • Ah wait - is the error message from the editor your writing your document in or is it from the LaTeX compiler?
    – Raven
    Commented Oct 11, 2019 at 7:42
  • I don't know. I checked the settings of texstudio and the seem identical. Also compiled the file from the command line but got the same error
    – oemu
    Commented Oct 11, 2019 at 7:51

1 Answer 1

0

Cause of the error lied in the code instead of some package complication.

Following changes fixed the problem:

  • use of relative path instead of absolute
  • two brackets within graphicspath
  • no quotation marks

Preamble:

\def \FigPath {figfolder/}
\graphicspath{{\FigPath}}

Document:

\begin{figure}
    \centering
    \graphicspath{{\FigPath folder1/folder2/}}
    \ffigbox[\boxbreiteL]{\def\svgwidth{\figurebreiteL}\input{figfolder/folder1/folder2/filename.pdf_tex}}{\caption[shortcaption]{caption}}}
    \graphicspath{{\FigPath}}
\end{figure}

You must log in to answer this question.

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