I fail to suppress the warning
Package natbib Warning: Citation `Entry' multiply defined.
using the silence
package when using natbib and multibib. This is my MWE:
% arara: pdflatex
% arara: bibtex
% arara: bibtex: {files: [Other]}
% arara: pdflatex
% arara: pdflatex
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Entry, Title="Title"}
\end{filecontents}
\usepackage{natbib}
\usepackage{multibib}
\newcites{Other}{Other}
\usepackage{silence}
% does not compile:
%\WarningFilter*{natbib}{Citation `#1
% works, but unwanted:
%\WarningFilter*{natbib}{Citation `}
% does not work:
\WarningFilter*{natbib}{Citation `\#1' multiply defined}
\begin{document}
\let\myjobname\jobname
\cite{Entry}
\citeOther{Entry}
\bibliographystyle{plainnat}
\bibliographystyleOther{plainnat}
\bibliography{\myjobname}
\bibliographyOther{\myjobname}
\end{document}
Note that you have to run bibtex
on Other.aux
manually if you do not use arara
.
Am I perhaps doing something wrong with the escaping of #1
?
Edit: I should have been a little more specific. I would like to use the starred version of the the WarningFilter
so I can suppress this message for different bibtex entries. I just need to know how to teach silence
to work with #1
.
Best Answer
You can say
and this will suppress all warnings beginning with "Citation"; in particular, it will suppress the
from
natbib
. This, however, might not be what you want sincenatbib
has other warning messages beginning with the string "Citation"; in this case, you could useinstead; notice the un-starred version, so you are targeting the warning message as it appears in the
.log
file.Your example: