I think that for bibentry
to works, the reference must be written in one way or another within the global bibliography, which is not something that is done by default within a bibunit
environment since it uses its own .bbl
file. It is said in the documentation of bibentry:
There is only one .bbl file, and hence one list of
references. Since \nobibliography* does not have its own list of database files, one cannot take the \bibentry citations from separate databases.
I've found two ways that seems to make this work:
- use the option
globalcitecopy
of the package bibunits
. This will create an entry in the global bibliography for each cite command
within a bibunit
;
- call the citation with a
\nocite
command before and outside of bibunit
.
In either cases, you need to call \nobibliography
before and outside the first bibunit
. Here is a MWE that illustrates what I said above:
\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}
Here is the content of the MyLibrary.bib
file:
@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}
}
Here is the result:
