Closed maxnick closed 3 years ago
Thanks for the report, this is indeed a bug. After importing the preamble from the main file, the import command resets the \graphicspath
to the value it had before the import, so the new value gets lost. I will think about how to fix it.
@gsalzer, any updates on the progress?
You can hotfix this issue by yourself to work on by setting \graphicspath{{Images/}{../../Images/}} also in the subfile after importing the main-config:
\documentclass[../../main.tex]{subfiles}
\graphicspath{{Images/}{../../Images/}}
\begin{document}
\includegraphics{picture}
<content>
\end{document}
Having exactly this issues with the mactex 2020 release. It seems, this bug is still open? Is it a "wontfix" or still pending?
Still pending. I will fix the issues within the next month, together with the adaption for the new LaTeX version
Great and thanks for this awesome package!
@maxnick @ashirwad @christo-auer
The issue is resolved in the new version 2.0 of the package, which is available from github and, shortly, from CTAN.
See also issue3-graphicspath
in the tests
directory.
Please let me know if you encounter any further problem; in this case, open a new issue with sample code.
Dear gsalzer, the problem still seems to exists if using subfiles: I have the following structure of my document:
preamble.tex main.tex ---Chapter1/main.tex ---Chapter2/main.tex
Now I like to \graphicspath{{somefolder}} with absolute pathname. It does not work (as it did before updating from 2019 to 2020) unless I include in every subfile like Chapter1/main.tex...Chaptern/main.tex before the \begin{document}-statement the line: \graphicspath{{somefolder}}
\documentclass[../../main.tex]{subfiles} \graphicspath{{somefolder}}
\begin{document} \end{document}
Would be nice to have one global \graphicspath{{somefolder}} in the preamble that is valid for any other subfile.
Best Regards, Jo
Today I upgraded the subfiles package to the latest 1.6 version and immediately ran into a problem with compilation of my project, which makes extensive use of the subfiles package. It can't properly resolve
\graphicspath
anymore so latex can't find image files during the separate subfile compilation. The structure of the project is as follows:The main.tex file has the following structure:
The subfiles:
The idea is to use just the same file name without a path inside
\includegraphics
macro in both the whole project and a separate subfiel compilations. Previously, I used to use version 1.2, and all worked smoothly, with just a small addition to the beginning of each subfile:But now it doesn't work neither with this addition nor without. So how to fix this problem and use the same file name of the picture inside the
\includegraphics
macro in compilation of the subfile and the entire project and automatically handle the difference of the path to the image folder?