![当我使用 \cite 命令时没有出现引用,也无法格式化参考书目?](https://linux22.com/image/445690/%E5%BD%93%E6%88%91%E4%BD%BF%E7%94%A8%20%5Ccite%20%E5%91%BD%E4%BB%A4%E6%97%B6%E6%B2%A1%E6%9C%89%E5%87%BA%E7%8E%B0%E5%BC%95%E7%94%A8%EF%BC%8C%E4%B9%9F%E6%97%A0%E6%B3%95%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%EF%BC%9F.png)
答案1
\documentclass{amsart}
\begin{document}
This part was taken from the following paper: \cite{article-minimal}
\bibliographystyle{ams}
\bibliography{xampl}
\end{document}
(使用 texlive 中的示例 bib 文件)生成
这是预期的输出。请注意,您显示了不同的格式,前面有一个空格,:
并且 ?? 而不是 [?],但您没有提供不可重现的示例。
如果在运行 pdflatex 之后再运行 bibtex 来生成参考书目,那么您会得到:
$ bibtex bb812
This is BibTeX, Version 0.99d (TeX Live 2021)
The top-level auxiliary file: bb812.aux
I couldn't open style file ams.bst
---line 3 of file bb812.aux
: \bibstyle{ams
: }
I'm skipping whatever remains of this command
I found no style file---while reading file bb812.aux
(There were 2 error messages)
并且没有生成参考书目,因为\bibliographystyle
参考文献的样式未知。更改为以下 plain
样式:
\documentclass{amsart}
\begin{document}
This part was taken from the following paper: \cite{article-minimal}
\bibliographystyle{plain}
\bibliography{xampl}
\end{document}
再次运行 pdflatex,然后运行 bibtex,终端显示:
$ bibtex bb812
This is BibTeX, Version 0.99d (TeX Live 2021)
The top-level auxiliary file: bb812.aux
The style file: plain.bst
Database file #1: xampl.bib
并再次运行 pdflatex两次解决交叉引用产生