解决 MacTeX 找不到参考文献的问题

问题场景

首先使用下面语句添加参考文献:

\addbibresource{bib/thesis.bib}

发现下列语句无效:

%% 参考资料
\printbibliography[heading=bibintoc, title={参考文献}]

无法显示参考文献,并且文章内引用后,编译出现警告 undefined。

解决方案

使用 biber 命令,为文件添加参考文献。例如我的文章是 thesis.tex,则执行命令:

$ biber thesis
INFO - This is Biber 2.1
INFO - Logfile is 'thesis.blg'
INFO - Reading 'thesis.bcf'
INFO - Found 1 citekeys in bib section 0
INFO - Processing section 0
INFO - Looking for bibtex format file 'bib/thesis.bib' for section 0
INFO - Decoding LaTeX character macros into UTF-8
INFO - Found BibTeX data source 'bib/thesis.bib'
WARN - Overwriting field 'year' with year value from field 'date' for entry 'Meta_CN'
INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'
INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'
INFO - Sorting list 'none' of type 'entry' with scheme 'none' and locale 'en-US'
INFO - No sort tailoring available for locale 'en-US'
INFO - Writing 'thesis.bbl' with encoding 'UTF-8'
INFO - Output to thesis.bbl
INFO - WARNINGS: 1

然后就可以正常使用参考文献了。

你可能感兴趣的:(解决 MacTeX 找不到参考文献的问题)