我在运行参考书目时遇到了麻烦。我真的不知道发生了什么。对于我的 bib 文件,我没有使用典型的 biblatex 命令,而是使用 bibtex 命令。我认为这不应该是个问题。我不知道大多数错误消息是什么意思。我希望你能帮我解决这个问题。
当我运行代码时,它只会打印我的个人引用参考文献,而不是我想要的样式。它也不会打印参考书目。
这是我使用的代码:
\documentclass{article}
\usepackage[style=authoryear, natbib, backend=biber]{biblatex}
\addbibresource{bib.bib}
\usepackage{xurl} % handle line breaks in long URL strings gracefully
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional => to make links within document.
\begin{document}
This is a test sentence \citep{test} and the test goes on \cite{test}.
\printbibliography
\end{document}
这是我收到的错误消息:
Process started
INFO - This is Biber 2.14
INFO - Logfile is 'test.blg'
INFO - Reading 'test.bcf' INFO -
Found 1 citekeys in bib section 0
INFO - Processing section 0 INFO - Globbing data
source 'bib.bib'
INFO - Globbed data source 'bib.bib' to bib.bib
INFO - Looking for
bibtex format file 'bib.bib' for section 0
INFO - LaTeX decoding ...
INFO - Found BibTeX data source 'bib.bib'
ERROR - BibTeX subsystem:
/var/folders/n8/lq_mhv5s23z1nwc4gl_gtmw00000gn/T/biber_tmp_Ko2i/bib.bib_44837.utf8, line
13, syntax error: found "gyourko", expected "," INFO - ERRORS: 1
Process exited with error(s)
参考书目如下:
@article{glaeser_gyourko,
Author = {Glaeser, Edward and Gyourko, Joseph},
Title = {The Economic Implications of Housing Supply},
Journal = {Journal of Economic Perspectives},
Volume = {32},
Number = {1},
Year = {2018},
Month = {2},
Pages = {3-30},
DOI = {10.1257/jep.32.1.3},
URL = {https://www.aeaweb.org/articles?id=10.1257/jep.32.1.3}}
@article{test,
author = {test},
title = {test},
journaltitle = {test},
year = {1234},
OPTurldate = {date url}}
我在 MacOS 上使用 texmaker,并且使用以下命令来编译 biblatex:
谢谢你的时间!
答案1
感谢您的帮助。
似乎每次更改参考书目(.bib 文件)时,您都必须确保手动保存它。使用 Texmaker 时就是这种情况。这样您就可以避免此类错误。