我在產生參考文獻時遇到問題。對於某些引文而不是作者姓名,文件會產生問號。我嘗試了在這個論壇中找到的建議,並且我已經知道“編譯-雙重編譯”過程,但沒有進展。
有人能幫我嗎?
這是我的程式碼的一部分
\documentclass[a4paper]{article}
\usepackage[hmargin=2.5cm,vmargin=1cm]{geometry}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage[pdftex]{graphicx}
\usepackage{xcolor}
\usepackage{setspace}
\setstretch{2}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{float}
\usepackage[round]{natbib}
\usepackage[hidelinks,colorlinks,urlcolor=blue, linkcolor=blue, citecolor=blue]{hyperref}
\begin{document}
\section{Introduction}
For a survey see \citet{Perotti2008} who...
A leading example is \citet{Papageorgiou2012} who
\newpage
\bibliographystyle{plainnat}
\bibliography{references}
\end{document}
參考書目文件包含以下條目
@TECHREPORT{ Perotti2008,
title = {In Search of the Transmission Mechanism of Fiscal Policy},
author = {Hill, Scott and Wootters, William K.}
booktitle = {NBER Macroeconomics Annual 2007",}
volume = {22},
publisher = {National Bureau of Economic Research}
year = {1997},
}
@ARTICLE{Papageorgiou2012,
author = {Papageorgiou Dimitris},
title = {Fiscal Policy Reforms in General Equilibrium: The case of Greece},
journal = {Journal of Macroecnomics},
year = {2012},
volume = {34},
pages = {504-522},
owner = {Minamar},
timestamp = {2012.08.03}
}
答案1
正如烏爾里克在她的評論中所說,你的bib
文件中有一些錯誤。
一點解釋:bib
文件的每個條目都必須像這樣建構:
@literature{key,
name = {value(s)},
name1 = {value(s)},
...
namen = {value(s)}
}
literature
可以是等,book
是引文鍵,代表欄位條目的名稱,例如等,並表示欄位條目的值、作者姓名、書名等。可以不寫。當您新增一行時,不寫逗號通常會導致錯誤。article
key
name
author
title
value(s)
因此,文件的更正部分bib
帶有一點漂亮的列印,應該看起來像您在更新的 MWE 中看到的那樣。
更新:
以下 MWE 在我的系統上運行,沒有任何錯誤或警告:
\RequirePackage{filecontents} % allows overwriting of file
\begin{filecontents*}{\jobname.bib}
@TECHREPORT{Perotti2008,
title = {In Search of the Transmission Mechanism of Fiscal Policy},
author = {Hill, Scott and Wootters, {William K.}},
booktitle = {NBER Macroeconomics Annual 2007},
volume = {22},
publisher = {National Bureau of Economic Research},
institution = {National Bureau of Economic Research??????},
year = {1997},
}
@ARTICLE{Papageorgiou2012,
author = {Papageorgiou, Dimitris},
title = {Fiscal Policy Reforms in General Equilibrium: The case of Greece},
journal = {Journal of Macroecnomics},
year = {2012},
volume = {34},
pages = {504--522},
owner = {Minamar},
timestamp = {2012.08.03},
}
@ARTICLE{Edenber1999,
author = {Edenberg, Wendy and Martin Eichenbaum and DM Fischer},
title = {Understanding the Effects of Shocks to Government Purchases},
journal = {Review of Economic Dynamics},
year = {1999},
pages = {166--206},
owner = {Minamar},
timestamp = {2012.03.03}
}
@UNPUBLISHED{Leeper2008,
author = {Leeper, E. M. and Walker, {T. B.} and S.-C S.Yang},
title = {Fiscal foresight: Analytics and econometrics},
month = {May},
year = {2008},
owner = {Minamar},
timestamp = {2012.08.05}
}
\end{filecontents*}
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[round]{natbib}
\usepackage{hyperref}
\begin{document}
\section{Introduction}
For a survey see \citet{Perotti2008} who~\dots
A leading example is \citet{Papageorgiou2012} who~\dots
%\nocite{*} % all entrys in bibliography to test the bib file
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}
使用此範例來測試您的bib
條目。只需複製一進入 MWE 並再次運行它(記住:三次)。
更新2:
我在 MWE 中新增了您的參考書目的兩個更正條目。文章條目Edenber1999
在作者領域存在許多問題。我試圖糾正它。請您自行檢查。該條目Leeper2008
顯示了另一個問題:寫作者“姓名,名字”或“名字”。不要混合它。最好包含作者的完整名字。看看作者楊(空白缺失:S. Yang
?)。不要使用\&
代替and
.