General ⇒ latex output files in a different directory to input files?
-
- Posts: 3
- Joined: Sat Jan 03, 2009 1:25 am
latex output files in a different directory to input files?
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
NEW: TikZ book now 40% off at Amazon.com for a short time.
latex output files in a different directory to input files?
Well if you're in linux, you can do something like this:Haven't used LaTeX on windows, so not sure how that's handled.
Code: Select all
$ mkdir output
$ cd output
$ latex ../mylatexfile.tex
-
- Posts: 3
- Joined: Sat Jan 03, 2009 1:25 am
Re: latex output files in a different directory to input files?
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
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
latex output files in a different directory to input files?
You can pass some instructions to the compiler during the compilation process in the very first line of your master file.
Output and auxiliary directories are set to the given paths only for this document.
Best regards
Thorsten¹
Code: Select all
%& -output-directory=C:/pdfout -aux-directory=C:/temp
Best regards
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10