I have our project's folder set up as followed:
-Chapters --Subchapters -Figures -Includes main.tex
I want to use the subfiles package so that everyone can compile their own chapter, however, the subdirectories cause numerous file not found errors. Compiling a file from e.g. chapters requires the figures to point to ../Figures instead of Figures. This is annoying because then all the paths would have to be changed when compiling the main document. The same goes for the preamble, which is also included from Includes. This isn't such a big problem as I can just type the preamble in the main file instead, but all the path errors are annoying as it kind of nullifies the advantages of the subfiles package.
main.tex
\documentclass{} % \usepackage{subfiles} % \begin{document} \subfile{Chapters/abstract} \end{document}
abstract.tex
\documentclass[../main.tex]{subfiles} \begin{document} \includegraphics{example.pdf} \end{document}
Compiling from abstract.tex causes a file not found error, obviously. Ideally I'd be pointing to all the files with an explicit path, however I can't just use C:\... as I'm not the only one compiling, and everyone has their path different. Is there some sort of way to use a variable that always points to the main directory depending on the user's directory setup, so that everyone can compile from wherever without changing paths of figures etc?
My question is similar to http://tex.stackexchange.com/questions/ ... -sty-files but I couldn't figure out how to use the mentioned texinputs or texmf solutions.
I'm using the latest version of Miktex.
Thanks in advance.