![使用 Bibtex 引用](https://linux22.com/image/238269/%E4%BD%BF%E7%94%A8%20Bibtex%20%E5%BC%95%E7%94%A8.png)
用了 Google 1 个小时后,我放弃了。我想要的只是:我的引用采用这种风格:
(第一作者等,年份)
为什么这么复杂?
答案1
您必须考虑到您需要选择文档中引用的样式以及包含书目条目的部分的布局。
尝试这个示例文档(我们称之为test.tex
):
\documentclass{article}
\usepackage[round]{natbib}
\begin{document}
\citep{goossens93}
\nocite{*}
\bibliographystyle{abbrvnat}
\bibliography{biblio}
\end{document}
使用书目数据库biblio.bib
(保存在与 相同的目录中test.tex
):
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The Latex Companion A",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
url=" www.ctan.org"
}
@book{knuth79,
author = "Donald E. Knuth",
title = "Tex and Metafont, New Directions in Typesetting",
year = "1979",
publisher = "American Mathematical Society and Digital Press",
address = "Stanford"
}
@book{lamport94,
author = "Leslie Lamport",
title = "Latex: A Document Preparation System",
year = "1994",
edition = "Second",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@misc{patashnik88,
author = "Oren Patashnik",
title = "{B}ib{T}e{X}ing. Documentation for General {B}ib{T}e{X} users",
year = "1988",
howpublished = "Electronic document accompanying BibTeX
distribution"
}
@techreport{rahtz89,
author = "Sebastian Rahtz",
title = "A Survey of {T}ex and graphics",
year = "1989",
institution = "Department of Electronics and Computer Science",
address = "University of Southampton, UK",
number = "CSTR 89-7"
}
按以下方式编译:
(pdf)latex test
bibtex test
(pdf)latex test
(pdf)latex test
请参阅纳特比布包以获取更多信息。
另一个选择是使用比布拉特克斯包;在这种情况下,该文件test.tex
将具有以下方面(用作bibtex
back.end):
\documentclass{article}
\usepackage[style=authoryear,maxnames=1,backend=bibtex]{biblatex}
\addbibresource{biblio}
\begin{document}
\parencite{goossens93}
\nocite{*}
\printbibliography
\end{document}
编译过程与以前相同。较新版本biblatex
使用biber
作为默认后端,因此如果backend=bibtex
没有指定,编译顺序将变为
(pdf)latex test
biber test
(pdf)latex test
答案2
你应该尝试使用 biblatex。它允许你从许多不同的样式中进行选择。我认为对你来说,应该是 authoryear 和 parencite 命令,它将引文放在括号中。
答案3
这是一个对我有用的例子。如果你想要更多引用,只需添加更多\bibitem
\documentclass[14pt,a4paper]{extreport}
\begin{document}
This "spaghetti code of the 21st century" \cite{MT08} is reminiscent of software development in the 1970s
\begin{thebibliography}{99}
\bibitem{MT08} “Surveying the digital future,” UCLA Internet report,http://www.digitalcenter.org/pdf/InternetReportYearThree.pdf.
\end{thebibliography}
\end{document}