Generallatex output files in a different directory to input files?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
glenn.fulford
Posts: 3
Joined: Sat Jan 03, 2009 1:25 am

latex output files in a different directory to input files?

Post by glenn.fulford »

hi, I was wondering if anyone knows if it is possible to have latex put all its output files (e.g. .pdf, .ps, .aux, .log, .etc) in a different directory to it's input files (.tex, .eps, pdf, .sty, etc)? The reason I am interested in this is so that I could set up just to backup only the input files on a web storage system). Thanks, Glenn

Recommended reading 2024:

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

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

Berticus
Posts: 8
Joined: Wed Dec 31, 2008 11:37 pm

latex output files in a different directory to input files?

Post by Berticus »

Well if you're in linux, you can do something like this:

Code: Select all

$ mkdir output
$ cd output
$ latex ../mylatexfile.tex
Haven't used LaTeX on windows, so not sure how that's handled.
glenn.fulford
Posts: 3
Joined: Sat Jan 03, 2009 1:25 am

Re: latex output files in a different directory to input files?

Post by glenn.fulford »

Sorry, I should have said, I use both windows and mac,and in particular, I use lLaTeX though Texnicenter and TeXShop. And I need top also be able to read the *.aux, etc files when I latex the .tex file.

I problably din't expalain myelf well enough (sorry). What I want to do is to use a program called "dropbox" to back up my tex input files.
https://www.getdropbox.com/tour#1

It allows me work from several different computers, home, work, etc.
It works by synchronising files put into a certain folder, where the changes to the file are stored on a web site and then the files on each computer are updated automatically. So what I really would like is to keep the "input files" *.tex and *.pdf (and anything else) in one folder, and have the latex produced files *.pdf, *.aux, */log (some of which are ALSO input files) in a different folder tso these are not updated every time I latex the file.

After some searching in comp.text.tex I found the following:
pdflatex -output-directory=C:\pdfout -aux-directory=C:\temp foo.tex
althogh i haven't tested this yet, this looks like what I want (i think) except that I don't want to use command line, i want to have it all happen transparently withing the editors that i use. S o just need to see if I can coax both texniccenter and texshop to do this automatically.
Glenn
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

latex output files in a different directory to input files?

Post by localghost »

You can pass some instructions to the compiler during the compilation process in the very first line of your master file.

Code: Select all

%& -output-directory=C:/pdfout -aux-directory=C:/temp
Output and auxiliary directories are set to the given paths only for this document.


Best regards
Thorsten¹
Post Reply