15

I can't get the \bibentry command to produce a full citation in the body of the text. The reference in the bibliography at the end works perfectly, but in the body of the text there is no output whatsoever. Here is a minimal example that illustrates the problem.

\documentclass{article}
\usepackage{natbib, bibentry}
\bibliographystyle{agsm}
\begin{document}
   This is supposed to cite in full. Instead I get nothing! \bibentry{Bloggs1950}
\bibliography{fict}
\end{document}

The contents of the fict.bib are

@article{Bloggs1950,
    author = "{Bloggs}, {Joseph K.}",
    journal = "International Journal of Dubious Assertions",
    pages = "337-629",
    title = "{Misusing Scientific Terminology for Fun and Profit}",
    volume = "202",
    year = "1950"
}

How can I fix this problem? Thanks.

7
  • Welcome to TeX.SX! Did you run biber or bibtex?
    – user31729
    Commented Aug 7, 2014 at 7:33
  • I'm using bibtex (F11 in texmaker). Should I be using biber instead?
    – TheBigH
    Commented Aug 7, 2014 at 7:34
  • 1
    Did you get a solution in the meanwhile for this problem? The 'agsm' style does not seem to be a problem. I have searched for hours. I don't get a solution for this. KR
    – user70229
    Commented Jan 10, 2015 at 13:14
  • 2
    @DivanBurger- no, I never found out how to fix this problem.
    – TheBigH
    Commented Jan 12, 2015 at 7:13
  • 1
    Same problem with the agufull04 style :(
    – durbachit
    Commented Jan 25, 2018 at 9:15

2 Answers 2

17

See comments on switching to biblatex and biber - if you want to keep using bibtex, read on.

You're missing a \nobibliography* command - see the documentation and here for details.

But even with the \nobibliography* command there is no output of \bibentry - this seems to be a problem with the agsm style since switching to plain style does fix the problem:

\documentclass{article}
\usepackage{natbib, bibentry}
%\bibliographystyle{agsm}
\bibliographystyle{plain}
\begin{filecontents}{\jobname.bib}
    @article{Bloggs1950,
        author = "{Bloggs}, {Joseph K.}",
        journal = "International Journal of Dubious Assertions",
        pages = "337-629",
        title = "{Misusing Scientific Terminology for Fun and Profit}",
        volume = "202",
        year = "1950"
    }
\end{filecontents}
\begin{document}
    \nobibliography*
    Citation: \cite{Bloggs1950}.
    This is supposed to cite in full. Instead I get nothing! \bibentry{Bloggs1950}
    \bibliography{\jobname}
\end{document}

fixed result

The problem is indeed with the format of the .bbl file created with the agsm style - compare the created .bbl:

\begin{thebibliography}{1}

\bibitem{Bloggs1950}
{Joseph K.} {Bloggs}.
\newblock {Misusing Scientific Terminology for Fun and Profit}.
\newblock {\em International Journal of Dubious Assertions}, 202:337--629,
  1950.

\end{thebibliography}

with the format mentioned in the documentation under '4. Caveats':

\bibitem[<label>]{<key>}
Text of the reference entry.
\bibitem

they obviously don't fit.

2
  • Thank you was sturggling all around and it was the issue with 'agsm' style
    – Sudantha
    Commented Sep 19, 2021 at 17:42
  • 2
    I am still getting empty output. I have tried including \nobibliography* \bibliographystyle{plain} I have tried including just \bibliography{bib}, \nobibliography*{bib} and \nobibliography{bib}`. Nothing produces any output.
    – Kvothe
    Commented Mar 17, 2023 at 17:35
1

This is how it works (for me):

\documentclass{article}
\usepackage{bibentry}
\usepackage{natbib}
\nobibliography* % here!
\bibliographystyle{plain}
\begin{document}
\bibentry{foo}
\bibliography{main}
\end{document}

Apparently, the position of \nobibliography* matters. Remove it or place after \begin{document} and you get an empty output.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .