Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a document composed of several subfiles and so have used the -aux-directory command to put all of the temporary files in a subfolder, 'auxdir', to keep my working folder clear (and me sane).

I now, however, can't use the multiple compile feature of Vim LaTeX-Suite, presumably because the algorithm it follows (here) will only run BibTeX if it finds a \bibdata line in the aux file, which it can't seem to do if the aux file isn't in the same directory.

The result is that the bibliography isn't compiled at all unless I turn off the -aux-directory option, or unless I manually run BibTeX on the aux file. I'm hoping there's a simpler way someone could point out to me!

share|improve this question
1  
Welcome to TeX.sx! You don't have to sign with your name since it automatically appears in the lower right corner of your post. –  lockstep Nov 1 '11 at 12:01
    
You should probably switch to a different compilation mechanism, as vim-latex is not well suited for compiling multiple files. –  canaaerus Aug 27 '12 at 13:18
    
@simick: I want to suggest the alternative compilation tool arara. –  Marco Daniel Mar 9 '13 at 7:45
    
@MarcoDaniel Perhaps you might answer, saying that vim-latex is not the best tool here? –  Joseph Wright Jul 7 '13 at 6:47

1 Answer 1

There are several tools which can can help you.

arara

The cool tool arara provides several rules to specify all compilation steps from inside the document.

For example you want to compile with pdflatex+bibtex+pdflatex you need the following lines in the preamble of the main document:

% arara: pdflatex
% arara: bibtex
% arara: pdflatex

After this specifications you can compile your document with

arara myfile.tex

Options to the rules can be given too.

% arara: pdflatex: { options: { -aux-directory=auxdir }  }
% arara: bibtex: { files: [auxdir/filename1, auxdir/filename2] }

TrY

Another but equal method is the tool TrY. It works only for Unix systems and instead of rules you can type complete small scripts.

The adapted example from above with TrY is:

%$ pdflatex myfile.tex
%$ bibtex myfile.aux
%$ pdflatex myfile.tex

and the compilation step is:

try myfile.tex
share|improve this answer
    
Hm... AFAIU the intend of the OP is to use the -aux-directory=auxdir option, which puts all output files but the PDF into auxdir. (This option is, unfortunately, only available for MikTex, but pretty similar to -output-directory, which is available on all platforms.) Maybe you can extend your example for that case? I guess, the major issue is how the various tools find their intermediate files (now in another directory) and how vim-latex parses the log file and finds the resulting PDF to open the viewer. –  Daniel Jul 7 '13 at 12:20
    
@Daniel: Than TrY is a bad choise ;-). Thanks. But arara should work. –  Marco Daniel Jul 7 '13 at 12:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.