I'm working on a collaborative project and I like to organize all the supporting files for my tex documents (rather than just having everything in one flat folder). This involves referencing figures/files/etc. by a (relative) path. The difference in slash convention between linux/windows means that collaboration between users on different systems becomes annoying.

Is there any easy way of dealing with path references between systems?


1 Answer 1


The Latex "path" command always uses the forward slash / convention, at least for Windows and Linux. You can therefor use relative paths if you have the same "relative" directory structure (from your main document and deeper)


Remember that all the paths are relative to you main document (even for figures inside included files in a different directory)

Another option is the import package. It gives you the option to input files relative to an \include or \input. e.g.


Included graphics (or \input) inside report.tex is now relative to the include file position

\includegraphics{fig.png}%-> now from chapters/chap-intro/fig.png
\input{expl}%--------------> input chapters/chap-intro/expl.tex

One thing to keep in mind is that path names are case sensitive in Linux but not in windows and the line endings (CR/LF, etc) is also different for the two. It is therefor advisable to use one of the many software management/version control packges such as CVS, SVN or Git to syncronize the files between the systems.

You must log in to answer this question.

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