我想使用\bibentry
命令列出我在博士论文中的个人文章。但是,我使用bibunits
环境将参考书目分成几部分,这阻碍了\bibentry
工作。
有任何想法吗?
\usepackage{bibunits}
\usepackage{bibentry}
\nobibliography*
\begin{document}
\begin{bibunit}[customstyle]
\include{intro/intro} % in this files I placed \bibentry
\include{chapter1/chapter1}
\include{chapter2/chapter2}
\include{chapter4/chapter3}
\putbib[biblio/biblio]
\end{bibunit}
\begin{bibunit}
\include{articel1/article1}
\putbib[biblio/biblio]
\end{bibunit}
\end{document}
答案1
我认为,对于bibentry
作品,引用必须以某种方式写入全局书目中,这不是在环境中默认完成的事情,bibunit
因为它使用自己的.bbl
文件。文献文献:
只有一个 .bbl 文件,因此只有一个参考文献列表。由于 \nobibliography* 没有自己的数据库文件列表,因此无法从单独的数据库中获取 \bibentry 引文。
我发现了两种似乎可以实现这一目标的方法:
globalcitecopy
使用包的选项bibunits
。这将在全局参考书目中为每个 cite 命令创建一个条目bibunit
;\nocite
在 之前和 之外用命令调用引文bibunit
。
无论哪种情况,您都需要\nobibliography
在第一个之前和之外调用bibunit
。 下面是一个 MWE,说明了我上面所说的内容:
\documentclass[]{article}
\usepackage[globalcitecopy]{bibunits}
\usepackage{bibentry}
\usepackage{natbib}
\bibliographystyle{plainnat}
\begin{document}
\nobibliography{MyLibrary}
% Use \nobibliography* if a global \bibliography environment
% is present to avoid the "multiply" warning.
\nocite{*} % Or call each citation separately
\begin{bibunit}[plainnat]
\section{First Bibunit environment with bibentry}
This is some \emph{bibentry}:
\begin{itemize}
\item \bibentry{stallman_steady_1965}
\item \bibentry{taniguchi_evaluation_1993}
\end{itemize}
\putbib[MyLibrary]
\end{bibunit}
\begin{bibunit}[plainnat]
\section{Second Bibunit environment with bibentry}
This is some \emph{bibentry}:
\begin{itemize}
\item \bibentry{stallman_steady_1965}
\item \bibentry{anderson_heat_2005}
\end{itemize}
\putbib[MyLibrary]
\end{bibunit}
\end{document}
以下是该文件的内容MyLibrary.bib
:
@article{anderson_heat_2005,
title = {Heat as a {Ground} {Water} {Tracer}},
volume = {43},
doi = {10.1111/j.1745-6584.2005.00052.x},
number = {6},
journal = {Ground Water},
author = {Anderson, Mary P.},
year = {2005},
pages = {951--968}
}
@article{stallman_steady_1965,
title = {Steady one-dimensional fluid flow in a semi-infinite porous medium with sinusoidal surface temperature.},
volume = {70},
doi = {10.1029/JZ070i012p02821},
number = {12},
journal = {Journal of Geophysical Research},
author = {Stallman, R W},
year = {1965},
pages = {2821--2827}
}
@article{taniguchi_evaluation_1993,
title = {Evaluation of vertical groundwater fluxes and thermal properties of aquifers based on transient temperature-depth profiles.},
volume = {29},
doi = {10.1029/93WR00541},
journal = {Water Resources Research},
author = {Taniguchi, M},
year = {1993},
note = {D031},
pages = {2021--2026}
}
结果如下: