正文中的引用

正文中的引用

我尝试使用bibtexbibentry,但没有成功。有人知道我如何在正文中引用整个参考文献,最后是否重复参考文献列表吗?

以下是示例:

\begin{filecontents}{mybib.bib}
    @book{example,
        author = "John",
        title = "The book's title",
        year = "2013",
        publisher = "Cambridge",
    }

\end{filecontents}

\documentclass{article}

\usepackage[round]{natbib}  % bibliography package

\usepackage{bibentry}         %  full citation in the body of the text (turn off natbib if use it)

\nobibliography*                   % no bib at the end


\begin{document}

This would be the complete citation

\bibentry{example}

And this would be just the regular citation: \cite{example}


\bibliography{mybib.bib}

\bibliographystyle{apa}

\end{document}

答案1

您的 MWE 中有两个错误。

  1. \bibliography{mybib.bib}应该是\bibliography{mybib},否则 BibTeX 会查找文件mybib.bib.bib而不是mybib.bib
  2. \bibliographystyle{apa}应该是\bibliographystyle{apalike}。参考书目样式apa.bst与不兼容bibentry

因此,删除您的.aux.bbl文件,然后使用以下 MWE 重试:

\begin{filecontents}{mybib.bib}
    @book{example,
        author = "John",
        title = "The book's title",
        year = "2013",
        publisher = "Cambridge",
    }

\end{filecontents}

\documentclass{article}

\usepackage[round]{natbib}  % bibliography package

\usepackage{bibentry}         %  full citation in the body of the text (turn off natbib if use it)

\nobibliography*                   % no bib at the end


\begin{document}

This would be the complete citation

\bibentry{example}

And this would be just the regular citation: \cite{example}


\bibliography{mybib}

\bibliographystyle{apalike}

\end{document} 

输出:

在此处输入图片描述

相关内容