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 use TeXLive 2012 and compile with run

latexmk -pvc -pdf -quiet test.tex

later I clean the directory with

latexmk -C

But test.bbl remains. How can I help latexmk to find bbl files?

test.bbl (first lines)

% $ biblatex auxiliary file $
% $ biblatex bbl format version 2.1 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated by
% biber as required.
%
share|improve this question
3  
You need the .bbl file for typesetting the document! –  egreg Nov 19 '12 at 14:27
    
...I thought latexmk creates it. I never wrote a .bbl file manually. –  Jonas Stein Nov 19 '12 at 15:30
    
If your document is in final form and you don't need to compile it any more, then you can safely delete the .bbl file. –  egreg Nov 19 '12 at 16:52
    
as long I do not delete it manually with rm latexmk ignores changes I made with jabref. –  Jonas Stein Nov 19 '12 at 17:35

2 Answers 2

up vote 13 down vote accepted

By default, latexmk treats .bbl files as non-regeneratable. This is because the .bib from which they are made is not always available. See the documentation for a fuller explanation, especially the explanation of the $bibtex_use variable. To get latexmk -C to delete .bbl files, put the following in an initialization file:

$bibtex_use = 2;
share|improve this answer
2  
Oh my, you were faster than me by 10 seconds. :) In other news, I know that this is probably not the best place to say this, but your awesome work with latexmk inspired me to write arara. I really admire all the effort you've put into the tool. Thanks a million. –  Paulo Cereda Nov 19 '12 at 18:26
2  
Is $bibtex_use = 2; equivalent to -bibtex? –  Jonas Stein Nov 19 '12 at 18:34
2  
Yes. The option -bibtex simply sets $bibtex_use to 2. –  John Collins Nov 19 '12 at 22:29

Another option to the presumably canonical answer John gave is specifying $clean_ext in a latexmkrc file, which contains your personalized global options. This file can be in one of the places I outlined in my answer to Latexmk: makeglossaries, Biber and pdfLaTeX / Where to put latexmkrc?. Also see the latexmk manual.

My complete list of extensions looks like this:

$clean_ext = 'synctex.gz synctex.gz(busy) run.xml tex.bak bbl bcf fdb_latexmk run tdo %R-blx.bib'

(As a result of -- I think -- SyncTeX, latexmk, Texmaker, biblatex, Biber, todonotes)

share|improve this answer

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.