源文件
main.tex
\documentclass{article}
\begin{document}
Here is a citation \cite{example}.
\bibliographystyle{plain}
\bibliography{references}
\end{document}
references.bib
@article{example,
author = {Author Name},
title = {Title of the Paper},
journal = {Journal Name},
volume = {XX},
number = {YY},
pages = {ZZ--ZZ},
year = {Year},
}
1. pdflatex
命令:
$ pdflatex main.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-02-20>
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file main.aux.
LaTeX Warning: Citation `example' on page 1 undefined on input line 4.
No file main.bbl.
[1{/usr/local/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./main.aux)
LaTeX Warning: There were undefined references.
)</usr/local/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
></usr/local/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on main.pdf (1 page, 23198 bytes).
Transcript written on main.log.
输出:
main.aux
\relax
\citation{example}
\bibstyle{plain}
\bibdata{references}
\gdef \@abspage@last{1}
main.pdf