GeneralRelocate *.aux ect files

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ChosSimbaOne
Posts: 9
Joined: Sat Dec 13, 2008 10:33 pm

Relocate *.aux ect files

Post by ChosSimbaOne »

Hi.
I am wondering if it is possible to do so that all the files that are created in the compileing of a latex document, i.e. *.aux, *.bbl etc. is relocated into another folder when the document has been compiled, so that they dont cause so much trouble with updateing and commiting a svn?

Im using TexLive2008 and TexnicCenter as an editor.

Best regards

Mads

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Relocate *.aux ect files

Post by phi »

pdfTeX has an -output-directory command line option.
ChosSimbaOne
Posts: 9
Joined: Sat Dec 13, 2008 10:33 pm

Relocate *.aux ect files

Post by ChosSimbaOne »

phi wrote:pdfTeX has an -output-directory command line option.
okay, can you help me on how it work, or a link where i can read about it? I would like to continue to use Texniccenter to compile through, if possible.
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Relocate *.aux ect files

Post by phi »

TeXnicCenter has a configuration dialog where you can set the compiler command line. You only have to add the switch "-output-directory <DIRECTORY>" there. For BibTeX it's a bit more complicated because you have to run it in the output directory, but this can be solved with the BIBINPUTS environment variable.
ChosSimbaOne
Posts: 9
Joined: Sat Dec 13, 2008 10:33 pm

Re: Relocate *.aux ect files

Post by ChosSimbaOne »

What dir should i put in?

my project is stored like this;

\LaTeX\
-\scr\ <- all latex files and bibtex
-\pictures\ <- all pictures in the latex document.

what i would like to add to this is a \LaTeX\log\ <- all the latex generated files such as aux, bbl etc.

is there any fancy way to do this so i don't need to change it for every project?
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Relocate *.aux ect files

Post by phi »

sorry, I have only very little experience with TeXnicCenter, try asking in the TeXnicCenter forum
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Relocate *.aux ect files

Post by localghost »

Current versions of the compilers enable line parsing. You can specify the output directory in the very first line of your main file.

Code: Select all

%& -output-directory=../log
Note that the given directory has to be created before compiling. All auxiliary and intermediate files will be saved there.

In TXC you can add this switch (without "%&") to the command line arguments for the compiler as already pointed out by phi. Start TXC, press Alt+F7 and adapt your favorite profile (or maybe all).


Best regards
Thorsten¹
Post Reply