[texhax] file path for included images and graphics

Henrik Frisk frisk.h at gmail.com
Wed Jul 30 12:19:18 CEST 2008


Hi,

To keep directories clean and tidy I fairly consistently use a
structure for my LaTeX documents using the following scheme:

proj-dir/
    Makefile
    mypaper.tex
    img/
         myimage.ps
    include/
         chapter1.tex
         chapter2.tex
    out/
         mypaper.dvi
         ...

In this setup the mypaper.tex includes the texts in the include/
directory (using \input{include/chapter1.tex}) which uses the images
in the img/ directory. I use make to generate the output.

However, sometimes (quite often actually) I want to use, say
chapter1.tex from the example above in another context, which is fine,
I can just specify the path to the file to my \input {} command. The
problem is with the graphics which are looked up relative to the
master file (mypaper.tex in the example). IOW if I include
chapter1.tex in another context I have to edit the graphics search
paths or copy all the graphics, or copy both the .tex file and the
graphics.

Is there something I'm missing here? Is there a way to specifiy the
path to included documents, graphics or otherwise, relative to the
document with the include, rather than relative to the master file?

best

Henrik


More information about the texhax mailing list