我正在尝试编译 elsarticle tex 文档。虽然我没有收到错误,但 bibliographt 似乎不起作用。我得到的只是“elsarticle-harv”的文字。
这是我的 MWE:
\documentclass[preprint,12pt,authoryear]{elsarticle}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[brazilian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\begin{document}
\cite{BHL}
\begin{thebibliography}
%\bibliographystyle{plainnat}
\bibliographystyle{elsarticle-harv}
\bibliography{bib}
\end{thebibliography}
\end{document}
任何帮助都将受到赞赏。
编辑:这是 bib 文件:
@Article{BHL,
author={Bjørnland, Hilde C. and Leitemo, Kai},
title={Identifying the interdependence between US monetary policy and the stock market},
journal={Journal of Monetary Economics},
year=2009,
volume={56},
number={2},
pages={275-282},
month={March},
keywords={ VAR Monetary policy Asset prices Identification},
abstract={We estimate the interdependence between US monetary policy and the S\&P 500 using structural vector autoregressive (VAR) methodology. A solution is proposed to the simultaneity problem of identifying monetary and stock price shocks by using a combination of short-run and long-run restrictions that maintains the qualitative properties of a monetary policy shock found in the established literature [Christiano, L.J., Eichenbaum, M., Evans, C.L., 1999. Monetary policy shocks: what have we learned and to what end? In: Taylor, J.B., Woodford, M. (Eds.), Handbook of Macroeconomics, vol. 1A. Elsevier, New York, pp. 65-148]. We find great interdependence between the interest rate setting and real stock prices. Real stock prices immediately fall by seven to nine percent due to a monetary policy shock that raises the federal funds rate by 100 basis points. A stock price shock increasing real stock prices by one percent leads to an increase in the interest rate of close to 4 basis points.},
url={http://ideas.repec.org/a/eee/moneco/v56y2009i2p275-282.html}
}
谢谢。
答案1
您必须删除(或注释掉)语句\begin{bibliography}
和\end{bibliography}
。请添加指令\section*{References}
(或\section*{Bibliography}
紧接在\bibliography{bib}
指令之前)。
还请记住,所有\usepackage
陈述都必须出现在序言中。
由于您的一些 bib 条目具有较长的 URL 字符串,我建议您也加载该url
包。并且,不要忘记将字段中title
不应小写的单词括在花括号中。(对于手头的条目,“US”一词符合这种处理要求 - 它绝对不应该被排版为“us”...)
完整 MWE 的结果:
\documentclass[preprint,12pt,authoryear]{elsarticle}
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
@Article{BHL,
author={Bjørnland, Hilde C. and Leitemo, Kai},
title={Identifying the interdependence between {US} monetary policy and the stock market},
journal={Journal of Monetary Economics},
year=2009,
volume={56},
number={2},
pages={275-282},
keywords={ VAR Monetary policy Asset prices Identification},
url={http://ideas.repec.org/a/eee/moneco/v56y2009i2p275-282.html}
}
\end{filecontents}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage[brazilian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{url} %% new
\begin{document}
\cite{BHL}
%%%\begin{thebibliography}
%\bibliographystyle{plainnat}
\section*{References} %% new
\bibliographystyle{elsarticle-harv}
\bibliography{bib}
%%%\end{thebibliography}
\end{document}
答案2
我遇到了同样的问题。 只需一个简单的技巧就可以为我解决。Elsarticle
使用natbib
,因此,我删除了cite
文件中的包。 然后,一切都运行正常。 我希望这对某人有所帮助。