列出除一条之外的所有参考书目条目

列出除一条之外的所有参考书目条目

问题

有没有办法在使用时排除一些参考书目条目

\nocite{*}

列出所有条目?

平均能量损失

\documentclass{article}

\usepackage{cite}
\usepackage{filecontents}

\begin{filecontents}{bibliography.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
% And even more bibliography...
\end{filecontents}

\begin{document}
  Some text citing \textsc{Author}\cite{A01} but not \textsc{Buthor} and \textsc{Cuthor}. Though \textsc{Buthor} (and all other entries -- not shown in this example -- excludig \textsc{Cuthor}) should be in the references.
  Since there are even more entries in the real bibiography, \textbf{\textbackslash{}nocite\{B02\}} will not work. So the best thing to use might be \textbf{\textbackslash{}nocite\{*\}}, but unfortunately this also "cites" \textsc{Cuthor}.

% \nocite{*}
  \bibliographystyle{plain}
  \bibliography{bibliography}{}
\end{document}

答案1

biblatex可以使用包轻松完成此操作。虽然biblatex与 包不兼容cite,但对于引文和参考书目项目的显示方式而言,它的扩展性相当强,并且您几乎可以实现 所能做的任何事cite

对于这个特定问题,您可以定义一个类别,exclude并在打印参考书目时删除该类别中包含的条目。此示例仍使用bibtex作为后端,因此您仍需要latex> bibtex> latex>latex进行编译。(新的后端,,biber允许您做更多的事情,值得研究。)

\documentclass{article}

%\usepackage{cite} % Not compatible with biblatex
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
% And even more bibliography...
\end{filecontents}

\usepackage[backend=bibtex]{biblatex}
\addbibresource{\jobname.bib}
\DeclareBibliographyCategory{exclude}
\addtocategory{exclude}{C03}

\begin{document}
  Some text citing \textsc{Author}\cite{A01} but not \textsc{Buthor} and \textsc{Cuthor}. Though \textsc{Buthor} (and all other entries -- not shown in this example -- excludig \textsc{Cuthor}) should be in the references.
  Since there are even more entries in the real bibiography, \textbf{\textbackslash{}nocite\{B02\}} will not work. So the best thing to use might be \textbf{\textbackslash{}nocite\{*\}}, but unfortunately this also "cites" \textsc{Cuthor}.

\nocite{*}
% \bibliographystyle{plain} % Not with biblatex
\printbibliography[notcategory=exclude]
\end{document}

结果:

参考书目

答案2

选项 \nocite{*} 将在参考书目中包含 .bib 上的所有条目,甚至包括那些已被引用或您不想包含在参考中的条目。是的,即使没有使用 \nocite{*},也有选项可以从参考书目中排除那些不需要的参考文献,但据我了解您的问题,这会更加困难。您有以下选项:

  1. 在 .bib 上注释掉您不想在参考书目中看到的参考文献,然后使用 \nocite{*};
  2. 创建新命令或编辑引用样式以从参考书目中删除您不想要的参考文献;
  3. 对要包含在参考书目中但不包含在文本中的每个参考文献使用 \nocite{entry},或者在文本末尾使用一个 \nocite{entry1, entry2, ...}。

我认为你最好的选择是 1 或 3

请参阅下面更改后的 MWE:

\documentclass{article}

\usepackage{cite}
\usepackage{filecontents}

\begin{filecontents}{bibliography.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
@misc{D04,
  author = {Duthor, D.},
  year = {2004},
  title = {Dave},
}
@misc{T05,
  author = {Tuthor, T.},
  year = {2005},
  title = {Tango},
}
\end{filecontents}
\begin{document} 
  Some text citing \textsc{Author}\cite{A01} but not \textsc{Buthor}\nocite{B02} (with \verb|\nocite{B02}| it will not cite on text but include the reference on bibliography) and specially \textsc{Cuthor} (not on text, nor on bibliography). 

    If you find it unpractical to use \verb|\nocite{entry}| for each reference use one \verb|\nocite{entry1, entry2, ...}| at the end of the text. 

    \nocite{B02,D04,T05}

  \bibliographystyle{plain}
  \bibliography{bibliography}{}
\end{document}

对应的输出为: 在此处输入图片描述

相关内容