I would like to suppress all warnings from bibtex, natbib, & associated packages. I want to do this because I intend to fix up these problems in a final pass, and in the meantime, I don't want citation warnings cluttering up my compilation output; I only want to see "real" errors and warnings (ie. ones I need to fix now). How can I do this?

Currently I am using: \usepackage{silence}\WarningFilter*{natbib}{}. However, this does not silence all warnings. For example, I still get warnings of the following forms:

<no file>: warning: no database entry for "foo"
<no file>: warning: no database entry for "bar"
somefile.bib:89: warning: empty address in baz
somefile.bib:73: warning: page numbers missing in both pages and numpages fields in quux

(There are many more of these; these are for illustration, and slightly altered to remove filenames.)

How can I suppress these warnings? Ideally, I want to do this without removing my citations (I still intend to cite things!) or manually altering my .bib files (if the alteration can be done/undone by a simple script or search-and-replace that's OK). I'm also not able to change to biblatex or some other system; the citation style and tooling is fixed by the venue I'm writing for.

  • 1
    The silence package only acts on higher level warnings from LaTeX; low level warnings are not dealt with, nor are those from BibTeX, which is outside the scope of the package. Are you using something like latexmk to process your file? – egreg Jul 7 '19 at 20:22
  • You wrote, I only want to see "real" errors and warnings (ie. ones I need to fix now). If your \cite commands and your bib file(s) are basically OK, i.e., if there are no non-existent or faulty bib entries, all you need to do is run LaTeX, BibTeX, and LaTeX twice more to get rid of all warning messages. Is this so burdensome? By the way, faulty and incomplete bibliographies and missing citations are serious no-nos for many editors and referees. Not fixing bibliography-related issues "until a final pass", as you put it, is an open invitation to shoddy work -- and subsequent rude surprises. – Mico Jul 8 '19 at 1:40
  • @egreg I am using latexrun (github.com/aclements/latexrun). – Michael Arntzenius Jul 8 '19 at 8:26
  • @Mico The "final" pass will be before I send it to be reviewed. My bib entries are almost all "faulty" (missing addresses, mostly; somewhat ridiculously, even the ACM's own website doesn't produce BibTeX that complies with its publication standards), and some are presently non-existent. I am not interested in being told what workflow to use; if it yields bad results, be it on my own head. I am interested in whether there is, or is not, a way to suppress these warnings. – Michael Arntzenius Jul 8 '19 at 8:35
  • @MichaelArntzenius - The issues you describe in no way preclude you from fixing warnings about missing entries as you go along. If some of the bib entries are lacking some fields, any resulting BibTeX-generated warning messages will not be caught by silence anyway. If some of the bib entries contain factually incorrect entries, such as incorrect author lists and/or titles, no warning messages will be issued anyway. – Mico Jul 8 '19 at 9:14

The warnings you mention are generated by BibTeX and silence can't cope with those, because it only acts when LaTeX is run.

Just don't run BibTeX if you don't want to see them. If you use a wrapper such as latexrun, then find a way to tell it you don't need BibTeX until you decide that it's time to fix the bib entries. However, since it seems that the main reason why latexrun exists is to run BibTeX when necessary, just leave it alone until you need it.


I think the great missunderstanding here is your sentence

I want to do this because I intend to fix up these problems in a final pass

Your way you want to go on is imho the badest way you can choose:

Each warning you supress can result in errors in the created pdf or can cause a lot of following warnings or (sometimes) errors.

Much better is to not use package silence and correct all warnings and errors comming up as soon as possible!

  • "correct all warnings and errors coming up as soon as possible" - BibTex generates a lot of dumb warnings for missing fields, like an "address" for @inproceedings, which e.g. Google Scholar just doesn't include. I don't really want to find some pointless addresses manually just to fix the Bibtex warnings. – Thomas Ahle Feb 6 at 11:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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