![警告 bibtex 中未定义的引用(从 Mendeley 导出)](https://linux22.com/image/286508/%E8%AD%A6%E5%91%8A%20bibtex%20%E4%B8%AD%E6%9C%AA%E5%AE%9A%E4%B9%89%E7%9A%84%E5%BC%95%E7%94%A8%EF%BC%88%E4%BB%8E%20Mendeley%20%E5%AF%BC%E5%87%BA%EF%BC%89.png)
我在编译代码时遇到了问题。Latex 告诉我这是下面显示的代码片段。bibtex 文件似乎具有正确的格式(我从 Mendeley 导出了它),但 LaTeX 向我发出警告并告诉我有一个未定义的引用(Bakshi2003)。有什么想法可以改变这种情况吗?(我按照一个似乎有效的例子进行操作)。
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage[british,UKenglish,USenglish,english,american]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{url}
\usepackage{amsmath}
\usepackage{amsfonts,graphicx,amsmath,amssymb,hyperref,color}
\usepackage[all]{xy}
\usepackage{setspace}
\usepackage{natbib}
\usepackage{blindtext}
%\usepackage{cite}
\onehalfspacing
%\input xy
%\xyoption{all}
\makeindex
\frenchspacing
\sloppy
\usepackage{times}
\usepackage{tikz}
%\usetikzlibrary{arrows,automata}
\usepackage{mathrsfs}
\numberwithin{equation}{section}
\title{Option Implied Distributions}
\author{Nis Mathias Schulte Matzen}
\begin{document}
%\maketitle
%\publishdate{\toda}
%\makeauthor
\begin{titlepage}
\begin{center}
\vspace*{1cm}
\Huge
\textbf{Option Implied Distributions}
\vspace{0.5cm}
\LARGE
A study of risk neutral return distributions
\vspace{1.5cm}
\textbf{Nis Mathias Schulte Matzen}
\vfill
A thesis presented for the degree of\\
Master in Economics (Cand.polit)
\vspace{0.8cm}
%\includegraphics[width=0.4\textwidth]{university}
\Large
Department of Economics\\
University of Copenhagen\\
Denmark\\
\date{}
\end{center}
\end{titlepage}
\begin{abstract}
Abstract here...
\end{abstract}
\newpage
\tableofcontents
\newpage
\subsection{Introduction}% a
Here is yada yada \cite{Bakshi2003} yada.
\bibliographystyle{plain}
\bibliography{Thesis.bib}
\end{document}
Thesis.bib 文件如下所示:
@article{Bakshi2003,
author = {Bakshi, G.}, doi = {10.1093/rfs/hhg002},
file = {:C$\backslash$:/Users/Mathias/Dropbox/Speciale/Delta-hedgedgains
and the negative market volatility risk premium.pdf:pdf}, issn = {14657368},
journal = {Review of Financial Studies}, month = apr, number = {2}, pages = {527--
566}, title = {{Delta-Hedged Gains and the Negative Market Volatility Risk
Premium}}, url = {rfs.oupjournals.org/cgi/doi/10.1093/rfs/hhg002}, volume = {16},
year = {2003} }
答案1
进行此替换后示例运行良好
\bibliography{Thesis.bib}
->
\bibliography{Thesis}
并使用 pdflatex、bibtex、pdflatex、pdflatex
顺便说一句:一个更简单的MWE:
\begin{filecontents*}{Thesis.bib}
@article{Bakshi2003,
author = {Bakshi, G.},
doi = {10.1093/rfs/hhg002},
file =
{:C$\backslash$:/Users/Mathias/Dropbox/Speciale/Delta-hedgedgains and
the negative market volatility risk premium.pdf:pdf},
issn = {14657368}, journal = {Review of Financial Studies}, month =
apr, number = {2},
pages = {527--566}, title = {{Delta-Hedged Gains and the Negative
Market Volatility Risk Premium}},
url = {rfs.oupjournals.org/cgi/doi/10.1093/rfs/hhg002}, volume = {16}, year = {2003} }
\end{filecontents*}
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{url}
\begin{document}
Here is yada yada \cite{Bakshi2003} yada.
\bibliographystyle{plain}
\bibliography{Thesis}
\end{document}