After the answer by Paul and Werner above didn't work for me, I did the following, based on what they wrote:
In ~/.vimrc
, I added:
let g:Tex_BibtexFlavor = 'biber'
let g:Tex_DefaultTargetFormat="pdf"
" The following is relevant to make LaTeX rerun after biber if necessary:
" (include all formats for which re-running is to be enabled)
let g:Tex_MultipleCompileFormats='pdf,dvi'
In ~/.vim/ftplugin/latex-suite/compiler.vim
around line 567, I did the following code replacement:
" old code:
" if runCount == 0 && Tex_IsPresentInFile('\\bibdata', mainFileName_root.'.aux')
" let bibFileName = mainFileName_root.'.bbl'
" new code:
if runCount == 0 && Tex_IsPresentInFile('Please \(re\)run Biber on the file', mainFileName_root.'.log')
let bibFileName = mainFileName_root.'.bcf'
The change in the second line (.bbl
-> .bcf
) is relevant to make biber run on the correct file. The change in the first line has the effect that biber is only executed when LaTeX outputs the usual "Please (re)run Biber on the file ..." in the .log
-File. In the version suggested above by Louisa Grey, biber would run anytime the source file contains a citation; but very often this is not necessary.
Please let me know if this works for you.
Edit:
Sometimes it is convenient to run biber manually, not as part of the compilation process triggered by the \ll
short key. For this you can configure a new short key \lb
by simply adding the following line to ~/.vimrc
:
map <Leader>lb :<C-U>exec '!biber '.Tex_GetMainFileName(':p:t:r')<CR>
biblatex
correct withbackend=biber
? Did you delete old auxiliary files?file.aux
? biber also accepts it if you call it with just the base file namefile
with no extension so perhaps there is a way to configure it to do this?