With LaTeX you can easily define your search paths for graphic files included in you document by

%\graphicspath{{./images/}{../graphics/}} % additional graphics paths

If you want to add some directory later on, e.g. you want to have an extra directory for each chapter (which is an included tex-file) and don’t want to define it in your main document, you need an addtographicspath command like

    \def\addtographicspath#1{\g@addto@macro\Ginput@path{#1}} % addtographicspath-command

This would be even more useful if you consider to have all subdirs automatically added as includepaths or something like this. Happy TeX-scripting and thank’s to Stefan on


Peter Pan. Kann fliegen mit Feenstaub.

Tagged with: , , ,
Posted in LaTeX, Technik
2 comments on “addtographicspath
  1. Adoa says:

    According to l2tabu you should not use the \graphicspath. You can use a TEXINPUTS path variable, for example in your makefile. That should be faster than the graphicspath.

    Anyway, more automation is always better 🙂

  2. laclaro says:

    Using an environment variable is not an option as I want my document only treated by pdflatex itself to be independent of operating systems. To be precise: I don’t want to start with windows batch scripting ever in my life 😀
    But thank you for providing this useful document!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Posts by topic…
…by month
Have a look at…

%d bloggers like this: