答案1
有一种可能性是xpatch
软件包用于修补内部命令\NAT@citexnum
,\NAT@citex
并\nocite
抑制它们针对未定义引用生成的警告。使用\NoWarnNat
抑制警告;注释掉命令以激活警告:
\documentclass{article}
\usepackage{natbib}
\usepackage{xpatch}
\makeatletter
\newcommand\NoWarnNat{
\xpatchcmd{\NAT@citexnum}{\PackageWarning}{\let\PackageWarning\@gobbletwo\PackageWarning}{}{}
\xpatchcmd{\NAT@citex}{\PackageWarning}{\let\PackageWarning\@gobbletwo\PackageWarning}{}{}
\xpatchcmd{\nocite}{\PackageWarning}{\let\PackageWarning\@gobbletwo\PackageWarning}{}{}
}
\makeatother
\NoWarnNat% comment-out this line to activate the warnings
\begin{document}
\nocite{bbbb}
\cite{aaaa}
\bibliographystyle{plainnat}
\bibliography{biblio}
\end{document}