When compiling latex documents the compiler emits a lot of "object" files. This clutters the directories I'm working on and it difficults the use of VCS like SVN. When I work with C++ code I have separate directories for the code and the objects, I can run make on the source directory but the .o files go to the build directory.
Is there a proper way to perform this separate compilation with Latex documents? Can it be done by using Makefiles or by passing options to the latex compiler?
Thanks
You can use:
pdflatex --output-directory=tmp file.tex
and all the files will be stored in the folder tmp
(pdf included).
Because this is not an optimal solution, I made my own tool, pydflatex, that compiles the LaTeX source by stashing away the auxilliary files (using the trick above), and brings the pdf back to the current directory, so after compiling you only have file.tex
and file.pdf
in your directory. This plays very well with version control.
I can't help much with LaTeX (having last user it seriously 20 years ago;-), but for Subversion, you should read up on the svn:ignore property -- it makes it easy to ignore files with extensions you do not want to version (object files, bytecode files as Python can often put in the same directory as the sources, backup files some text editors use, &c).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With