Graphics, Figures & Tables ⇒ Separate directory for tables, similar to \graphicspath?
-
- Posts: 29
- Joined: Thu Feb 19, 2009 3:23 pm
Separate directory for tables, similar to \graphicspath?
I'm trying to work out whether I can create a subdirectory for all of my tables and use it in a similar way to \graphicspath, that is, by defining it in the preamble and not having to deal with it again. I have a lot of tables for my thesis and the directory is really cluttered, so it would be nice from an aesthetic point of view if not strictly necessary.
NEW: TikZ book now 40% off at Amazon.com for a short time.

Separate directory for tables, similar to \graphicspath?
A simple solution would be to define a new command:
Then you can say
to include the contents of the file "./tables/abc.tex".
Another hint: It is generally better to set the TEXINPUTS environment variable instead of using \graphicspath.
Code: Select all
\newcommand*\InputTable[1]{\input{./tables/#1.tex}}
Code: Select all
\InputTable{abc}
Another hint: It is generally better to set the TEXINPUTS environment variable instead of using \graphicspath.
-
- Posts: 29
- Joined: Thu Feb 19, 2009 3:23 pm
Re: Separate directory for tables, similar to \graphicspath?
Hey, that works really well. Thanks a lot. 
