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
add comment

1 Answer

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
add comment

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.
http://tex.stackexchange.com/questions/33302/how-can-i-use-the-vim-latex-suite-multiple-compile-option-with-bibtex-and-the-a
tex.stackexchange.com
crawl=CC-MAIN-2014-10
70916
application/http; msgtype=response
sha1:JI7JZYWW4KRHAMPI22NSKI3OZVG5CD5X
<urn:uuid:a074d9f5-dec6-4773-8c81-c86bfde09def>
2014-03-15T04:19:33Z
198.252.206.140
sha1:6FZJPD56OQNPOVYZID2CDIS433ZUXEHT
<urn:uuid:104c253c-fdce-4404-8693-fd53e629cbfe>
http://tex.stackexchange.com/questions/33302/how-can-i-use-the-vim-latex-suite-multiple-compile-option-with-bibtex-and-the-a
response
<urn:uuid:dec942e8-5a85-42e4-85af-237599a79349>
robots: classic
hostname: ip-10-183-142-35.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-10
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for March 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf