[Tex/LaTex] Suppress warning from natbib/multibib with silence

multibibnatbibwarnings

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

\WarningFilter*{natbib}{Citation}

and this will suppress all warnings beginning with "Citation"; in particular, it will suppress the

Citation `#1' multiply defined 

from natbib. This, however, might not be what you want since natbib has other warning messages beginning with the string "Citation"; in this case, you could use

\WarningFilter{natbib}{Citation `Entry' multiply defined}

instead; notice the un-starred version, so you are targeting the warning message as it appears in the .log file.

Your example:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{Entry, Title="Title"}
\end{filecontents}

\usepackage{natbib}
\usepackage{multibib}

\newcites{Other}{Other}

\usepackage{silence}
\WarningFilter*{natbib}{Citation}

\begin{document}
    \let\myjobname\jobname

    \cite{Entry}
    \citeOther{Entry}

    \bibliographystyle{plainnat}
    \bibliographystyleOther{plainnat}

    \bibliography{\myjobname}
    \bibliographyOther{\myjobname}
\end{document}