我一直试图引用单个参考文献,但无法解决这个问题。我已将文件裁剪econometria.tex
到最小:
案例 1(芝加哥)
\documentclass[draft]{article}
\usepackage{geometry}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{courier}
\begin{document}
Cite: \cite{evans_dynamic_2010}
%\bibliographystyle{named}
\bibliographystyle{chicago}
\bibliography{./library}
\end{document}
我做了同样的事情library.bib
:
@article{evans_dynamic_2010,
title = {Dynamic news effects in high frequency Euro exchange rates},
volume = {20},
issn = {10424431},
url = {http://linkinghub.elsevier.com/retrieve/pii/S1042443110000053},
doi = {10.1016/j.intfin.2010.03.002},
pages = {238--258},
number = {3},
journaltitle = {Journal of International Financial Markets, Institutions and Money},
author = {Evans, Kevin P. and Speight, Alan E.H.},
urldate = {2018-03-06},
date = {2010-07},
langid = {english},
}
当我运行 PDFLatex 时,我收到三条错误消息。前两条错误消息是重复的,对应于第 11 行(Cite: \cite{evans_dynamic_2010}
)。
! Undefined control sequence.
\b@evans_dynamic_2010 ->\citeauthoryear
{Evans and Speight}{Evans and Speigh...
l.11 Cite: \cite{evans_dynamic_2010}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
\b@evans_dynamic_2010 ->\citeauthoryear
{Evans and Speight}{Evans and Speigh...
l.11 Cite: \cite{evans_dynamic_2010}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
(./econometria.bbl
! Undefined control sequence.
<argument> \protect \citeauthoryear
{Evans and Speight}{Evans and Speight}{}
l.4 Speight}{}]{evans_dynamic_2010}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
) [1{/usr/share/texlive/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}]
(./econometria.aux) )
案例 2(已命名)
如果我将参考书目样式改为这样:
\documentclass[draft]{article}
\usepackage{geometry}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{courier}
\begin{document}
Cite: \cite{evans_dynamic_2010}
\bibliographystyle{named}
%\bibliographystyle{chicago}
\bibliography{./library}
\end{document}
如果我运行正常循环 PDFLatex -> bibtex -> PDFLatex,我可以编译 tex 文件,但不会添加引用,即 pdf 文件显示文本
Cite: [?]
这个循环还显示一些消息。
当我运行 PDFLatex 时:
LaTeX Warning: Citation `evans_dynamic_2010' on page 1 undefined on input line
11.
(./econometria.bbl) [1
{/usr/share/texlive/texmf-dist/fonts/map/pdftex/updmap/pdftex.map}] (./economet
ria.aux)
LaTeX Warning: There were undefined references.
)
当我运行 bibtex 时:
Process started
This is BibTeX, Version 0.99d (TeX Live 2017) The top-level auxiliary file: econometria.aux I couldn't open style file named.bst ---line 3 of file econometria.aux : \bibstyle{named : } I'm skipping whatever remains of this command I found no style file---while reading file econometria.aux (There were 2 error messages)
Process exited with error(s)
一些额外的信息
tex
This is TeX, Version 3.14159265 (TeX Live 2017) (preloaded format=tex)
pdflatex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
bibtex --version
BibTeX 0.99d (TeX Live 2017)
kpathsea version 6.2.3
编辑1
我不断尝试不同的方法,但错误仍然存在。
案例 3 (ieeetr)
\documentclass[draft]{article}
\usepackage{geometry}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{courier}
\begin{document}
Cite: \cite{evans_dynamic_2010}
\newpage
\bibliographystyle{ieeetr}
\end{document}
当我运行 bibtex 时,出现以下错误:
Process started
This is BibTeX, Version 0.99d (TeX Live 2017) The top-level auxiliary file: econometria.aux The style file: ieeetr.bst I found no \bibdata command---while reading file econometria.aux Warning--I didn't find a database entry for "evans_dynamic_2010" (There was 1 error message)
Process exited with error(s)
案例 4(缩写)
\documentclass[draft]{article}
\usepackage{geometry}
\usepackage{cite}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{courier}
\begin{document}
Cite: \cite{evans_dynamic_2010}
\newpage
\bibliographystyle{abbrvnat}
\end{document}
同样的情况也发生在这里:
Process started
This is BibTeX, Version 0.99d (TeX Live 2017) The top-level auxiliary file: econometria.aux The style file: abbrvnat.bst I found no \bibdata command---while reading file econometria.aux Warning--I didn't find a database entry for "evans_dynamic_2010" (There was 1 error message)
Process exited with error(s)
答案1
我以为问题与 texlive 配置有关,但这个问题似乎与 Texmaker 有关;安装 Texstudio 后,我能够毫无问题地编译参考书目。我知道这并不能解决 Texmaker 的问题,但我使用 Texstudio 没问题。谢谢你的帮助。
答案2
我遇到了同样的问题。按 F11 似乎可以激活 bibtex,然后我的参考文献就会被识别。希望这能有所帮助。