如何解决“第 1 页上的引用‘1’未定义”

如何解决“第 1 页上的引用‘1’未定义”

我花了几个小时才在我的 latex 上找到引用。我使用 TexMaker,并尝试按 latex->bibtex -> latex -> latex -> PdfLatex 的顺序编译文档。但是,我只在结果 pdf 文件中看到 ?。你能帮助我吗?谢谢!

\documentclass{article} 
\usepackage{natbib} 

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{1,
 author = {Mustermann, A. and Mostermann, B. and Mistermann, C},
 year = {2011},
 title = {Using articles in {\LaTeX} documents},
 journal = {Journal}
}
\end{filecontents}


\begin{document} 
\cite{1}\qquad\citet{1}\qquad\citep{1}

\citeyear{1}\qquad\citeauthor{1}

\bibliographystyle{apalike}
\bibliography{\jobname}
\end{document}

答案1

您的 MWE 不起作用吗?我可以编译它。我猜编译器的设置有问题。我使用了以下设置,它起作用了:

pdflatex -synctex=1 -interaction=nonstopmode %.tex
bibtex %

pdflatex -> bibtex -> pdflatex -> pdflatex

(也使用 TexMaker)

相关内容