我尝试使用bibtex
和bibentry
,但没有成功。有人知道我如何在正文中引用整个参考文献,最后是否重复参考文献列表吗?
以下是示例:
\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 中有两个错误。
\bibliography{mybib.bib}
应该是\bibliography{mybib}
,否则 BibTeX 会查找文件mybib.bib.bib
而不是mybib.bib
。\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}
输出: