Hi I tried to use the import
command from the import
package to not conflict with the relative paths in the imported file. However, this doesn't seem to work with \graphicspaths
.
Here the structure of my directories
folder/
a5version/
a5version.tex
source/
master.tex
chapters/
chapter1.tex
images/
buw.pdf
Then the a5version.tex looks like
\documentclass{article}
\usepackage{import}
\import{./../source/}{master.tex}
the master.tex looks like
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\graphicspath{{./images/}}
\begin{document}
\chapter{chapter 1}
\input{./chapters/chapter1.tex}
\end{document}
and chapter1.tex looks like
This is the first chapter. Here is a graphic:
\includegraphics{buw.pdf}
When I try to compile a5version.tex
I get the following error:
ERROR: Package pdftex.def Error: File `buw.pdf' not found: using draft setting.
Is there a way to fix this? I mean clearly I could just don't use \graphicspath
and use includegraphics{./images/buw.pdf}
, but this is a little bit inconvenient.
pdflatex ../a5version/a5version
then all filepaths are naturally relative to the master document. But if you want to use it I would assume addding\graphicspath{{images/}{../source/images/}}
probably works.