I'm working on a larger thesis assignment, and I've been fiddling around with my various tex files in different folders, trying to make it look nice and orderly.
Atm. my structure is similar to this:
main.tex
img/image.png
tex/chapter01.tex
Where all other .tex files are including in the main file using \include{tex.chapter01.tex}. It works pretty well, I usually work on a single chapter file at the time which I compile by itself, and later on I compile the whole main file to see everything together.
However, I have one little issue. When working on a single chapter file I include images using \includegraphics{../img/image.png}. This obviously won't translate when compiling the whole main file since the correct command there would be \includegraphics{img/image.png}.
So I'm looking at the option of having a separate main folder as well making the structure like this:
main/main.tex
img/image.png
tex/chapter01.tex
Thus I can use the ../ command everywhere. Similar to what is described in the second answer here: Using subfiles package with .sty files (PS. I do not use the subfiles package)
However, this doesn't seem to work with the \include command. Ex: \include{../tex/chapter01} seems to give an error. Is this a common issue?
Hope you understand my problem. Thank you for any input.
EDIT: I seem to have found an answer here: Restructure classic thesis project with subfolders using Kile Apparently, \include doesn't really work when navigating upwards in folders. So I ended up by just putting the main.tex file together with my other .tex files as Christina suggested.
*.tex
files in the same directory wheremain.tex
is stored. By the way, I am not very fond of outsourcing chapters at all, but this is my personal opinion\includeonly
then the paths should not need to change. If you are not doing that you should say what you are doing?main/main.tex
structure) with thestandalone
package and works great. Please update the question with why this did not work for you or what error message you encountered.