Citations and bibliography
此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
English
Citing your sources
- Academic writing must say where facts came from. LaTeX makes this tidy.
- You keep a list of sources, each with a key, and cite the key in your text.
![ite{knuth84} prints [1] in the sentence and the full entry under References](/static/code/latex/citations.png)
English
The bibliography
- List your sources in a
thebibliographyenvironment, each as a\bibitem:
\begin{thebibliography}{9}
\bibitem{lamport} Leslie Lamport. \emph{LaTeX}. 1986.
\end{thebibliography}
- The
{9}just says "numbers are one digit wide".lamportis the key you choose.
English
Citing in the text
- Anywhere in the document, write
\cite{lamport}:
LaTeX is powerful~\cite{lamport}.
- With this manual
thebibliography, numbers follow the order of the\bibitementries, not the order in which you first cite them. A single first entry is[1]; inserting an entry before another changes the later entry’s number.
English
Common mistakes
- A key that does not match a
\bibitem.\cite{knut}with\bibitem{knuth}prints[?], and the log saysLaTeX Warning: Citation 'knut' on page 1 undefined. The PDF still builds, so look for[?]. - One compile only. Citations, like
\ref, need a second run to show their numbers. - Putting the bibliography in the preamble.
thebibliographyis part of the document: place it before\end{document}.
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Cite the book in the sentence with \cite{lamport}, and add a matching \bibitem{lamport} entry inside the bibliography. The same key links the two.
点击“运行”编译并预览 PDF。
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Add a second source. Give the second book a \bibitem{knuth} entry, then cite it in the sentence with \cite{knuth}. In this manual bibliography, numbers follow bibitem entry order: Knuth is [2] when Lamport is listed first.
点击“运行”编译并预览 PDF。
难度 2/5 · 今日首次完成可获 140 金币及少量额外奖励
Cite two sources at once by listing both keys in one command, separated by a comma: \cite{lamport,knuth}. LaTeX prints both numbers in one pair of brackets.
点击“运行”编译并预览 PDF。