我对乳胶文档中的引用存在问题。
我正在使用 Visual Studio Code 和 james-yu.latex-workshop (8.13.2)。
我有这个非常简单的乳胶文档和参考书目文件:
主文件:
\documentclass[12pt,letterpaper]{article}
\usepackage{natbib}
\begin{document}
\cite{marshall1890principles} test.
\bibliography{bibliography}
\end{document}
书目.bib:
@book{marshall1890principles,
title={Principles of Economics},
author={Marshall, A.},
number={v. 1},
lccn={05021714},
series={Principles of Economics},
url={https://books.google.co.uk/books?id=bykoAAAAYAAJ},
year={1890},
publisher={Macmillan and Company}
}
现在引用显示为?
,这是我收到的错误:
编译日志如下:
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 29 September 2020, version: 4.70b.
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'MainText.tex'
'c:/Users/User/Desktop/Refereces MWE/MainText.aux'
'c:/Users/User/Desktop/Refereces MWE/MainText.tex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex --max-print-line=10000 -synctex=1 -interaction=nonstopmode -file-line-error -recorder -output-directory="c:/Users/User/Desktop/Refereces MWE" "c:\Users\User\Desktop\Refereces MWE\MainText.tex"'
------------
Set environment variable BIBINPUTS='c:/Users/User/Desktop/Refereces MWE;'
Set environment variable TEXINPUTS='c:/Users/User/Desktop/Refereces MWE;'
Latexmk: applying rule 'pdflatex'...
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 20.10)
entering extended mode
("c:/Users/User/Desktop/Refereces MWE/MainText.tex"
LaTeX2e <2020-10-01> patch level 1
L3 programming layer <2020-10-05> xparse <2020-03-03> (C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/base\article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/base\size12.clo)) (C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/natbib\natbib.sty) (C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-pdftex.def) ("c:/Users\User\Desktop\Refereces MWE\MainText.aux")
Package natbib Warning: Citation `marshall1890principles' on page 1 undefined on input line 9.
("c:/Users\User\Desktop\Refereces MWE\MainText.bbl")
Package natbib Warning: There were undefined citations.
[1{C:/Users/User/AppData/Local/MiKTeX/pdftex/config/pdftex.map}] ("c:/Users\User\Desktop\Refereces MWE\MainText.aux") )<C:/Users/User/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmbx12.pfb><C:/Users/User/AppData/Local/Programs/MiKTeX/fonts/type1/public/amsfonts/cm/cmr12.pfb>
Output written on "c:/Users\User\Desktop\Refereces MWE\MainText.pdf" (1 page, 17199 bytes).
SyncTeX written on c:/Users\User\Desktop\Refereces MWE\MainText.synctex.gz.
Transcript written on "c:/Users\User\Desktop\Refereces MWE\MainText.log".
Latexmk: Found input bbl file 'MainText.bbl'
Latexmk: Log file says output to 'MainText.pdf'
Latexmk: List of undefined refs and citations:
Citation `marshall1890principles' on page 1 undefined on input line 9
Latexmk: Found bibliography file(s) [bibliography.bib]
Latexmk: Summary of warnings from last run of *latex:
Latex failed to resolve 1 citation(s)
Latexmk: Examining 'c:/Users/User/Desktop/Refereces MWE/MainText.log'
=== TeX engine is 'pdfTeX'
Latexmk: All targets (c:/Users/User/Desktop/Refereces MWE/MainText.pdf) are up-to-date