JabRef 中引用的文章/书籍是否会将所有参考文献添加到 LaTeX 中的参考书目中,即使您没有在论文中引用它们?因为我有一个 JabRef 文件,我想将参考书目添加到每章末尾,但它将所有参考文献添加到每章。
答案1
看来您想要按章节分类的参考书目。
这可以通过bibunits
和natbib
。只需将\putbib
章节参考书目放在您想要的位置,然后将以下内容添加到序言中。
\let\stdthebibliography\thebibliography
\renewcommand{\thebibliography}{%
\let\section\subsection
\stdthebibliography}
\bibliographyunit[\section]
\bibliography*{\jobname}
\bibliographystyle*{plainnat}
这确保您可以\putbib
在\section
s 中使用;\bibliography*{\jobname}
指定.bib
源文件,同时\bibliographystyle*{plainnat}
指定参考书目样式(.bst
文件)
\documentclass[american]{article}
\usepackage{babel}
\usepackage{natbib}
\usepackage{bibunits}
\let\stdthebibliography\thebibliography
\renewcommand{\thebibliography}{%
\let\section\subsection
\stdthebibliography}
\bibliographyunit[\section]
\bibliography*{\jobname}
\bibliographystyle*{plainnat}
\begin{filecontents}{\jobname.bib}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
pages = {1-5},
year = {2010},
}
@book{testbookt,
author = {Arnold Uthor},
title = {Long Book},
date = {1990},
}
@book{testbook,
author = {Walter Ordsmith},
editor = {Eddie Ditor},
title = {The Work},
subtitle = {Subtitle},
year = {1983},
}
@online{testonline,
author = {Bernie Logger},
title = {A Very Opinionated Blog Post},
url = {http://example.com},
year = {2013},
}
\end{filecontents}
\begin{document}
\section{First section}
some text \citep{testart} more text more citations
\putbib
\section{Second section}
some text \citep{testonline} more text more citations
\putbib
\end{document}
您还可以使用biblatex
,biblatex
具有natbib
兼容模式(参见第 3.7.9 节第 88 页)文档有关多个书目的更多信息,请参阅biblatex
文档. 把这写在你的序言里
\usepackage[style=authoryear,backend=biber,natbib,refsection=section]{biblatex}
\addbibresource{\jobname.bib}
但不加载 natbib
或其他引用包。refsection=section
每个\section
都有其自己的参考书目,因此您可以\printbibliography[heading=subbibliography]
将该特定章节的参考书目放在您想要的位置。
\documentclass[american]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber,natbib,refsection=section]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@article{testart,
author = {Arnold Uthor and William Riter},
title = {A Very Interesting Article},
journal = {Journal of Articles},
volume = {7},
number = {3},
pages = {1-5},
year = {2010},
}
@book{testbookt,
author = {Arnold Uthor},
title = {Long Book},
date = {1990},
}
@book{testbook,
author = {Walter Ordsmith},
editor = {Eddie Ditor},
title = {The Work},
subtitle = {Subtitle},
year = {1983},
}
@online{testonline,
author = {Bernie Logger},
title = {A Very Opinionated Blog Post},
url = {http://example.com},
year = {2013},
}
\end{filecontents}
\begin{document}
\section{First section}
some text \citep{testart} more text more citations
\printbibliography[heading=subbibliography]
\section{Second section}
some text \citep{testonline} more text more citations
\printbibliography[heading=subbibliography]
\end{document}