Menu

#17 Support for output-directory

Unstable (example)
open
nobody
None
5
2014-01-20
2014-01-20
whitedwarf
No

The built-in latexmain file automatisation is nice, but I was looking for an additional possibility to provide a directory where all latex-generated files will be put in (i.e., pdflatex's -output-directory flag). I couldn't find something like that in the code so I added it (compare attached patch file).

To use this feature, two things must be modified:
1) Set new global variable in vimrc: let g:Tex_OutputDirectoryName='obj'
2) Add output-directory mechanism to all CompileRules, e.g. change default pdf rule

let g:let g:Tex_CompileRule_pdf='pdflatex -interaction=nonstopmode -file-line-error-style $*'

to

let g:let g:Tex_CompileRule_pdf='pdflatex -output-directory '.g:Tex_OutputDirectoryName.' -interaction=nonstopmode -file-line-error-style $; cp '.g:Tex_OutputDirectoryName.'/.pdf .'

This will set the outputdirectory to 'obj', treat .aux, .log, .bib and .idx files correctly and copy the output (*.pdf) into the main dir.

1 Attachments

Discussion


Log in to post a comment.