首页 > 解决方案 > 打印参考书目:空参考书目

问题描述

这几天我一直在寻找一个有效的解决方案,但它从来没有奏效。

最小的可重现示例如下:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[authordate,autocite=inline,backend=biber,sorting=nyt,]{biblatex-chicago}
\addbibresource{Test.bib}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\DeclareUnicodeCharacter{202F}{\,}
\begin{document}

Test citing \citep{sanborn_learning_2014}

\printbibliography
\end{document} 

测试围兜:

@article{sanborn_learning_2014,
    title = {Learning Democracy: Education and the Fall of Authoritarian Regimes},
    volume = {44},
    issn = {0007-1234, 1469-2112},
    url = {https://www.cambridge.org/core/product/identifier/S0007123413000082/type/journal_article},
    doi = {10.1017/S0007123413000082},
    shorttitle = {Learning Democracy},
    abstract = {Studies on what causes a state to democratize have focused on economic, social, and international factors. Many of them argue that higher levels of education should promote democracy. However, few articulate clearly how education affects democratization, and fewer still attempt to test the supposed link across time and space. This article fills that gap by considering how different levels of education influence democratization, and the conditions under which education is most likely to promote democracy. Analyses of eighty-five authoritarian spells from 1970 to 2008 find that higher levels of mass, primary, and tertiary education are robustly associated with democratization. Secondary analyses indicate that education is most effective in promoting democratization when both males and females are educated. An illustration from Tunisia follows.},
    pages = {773--797},
    number = {4},
    journaltitle = {British Journal of Political Science},
    shortjournal = {Brit. J. Polit. Sci.},
    author = {Sanborn, Howard and Thyne, Clayton L.},
    urldate = {2021-09-18},
    date = {2014-10},
    langid = {english},

测试.blg:

[0] Config.pm:304> INFO - This is Biber 2.14 (beta)
[0] Config.pm:307> INFO - Logfile is 'Test.blg'
[38] biber:322> INFO - === dim. sept. 19, 2021, 14:47:26
[48] Biber.pm:415> INFO - Reading 'Test.bcf'
[128] Biber.pm:943> INFO - Found 0 citekeys in bib section 0
[131] Utils.pm:293> WARN - The file 'Test.bcf' does not contain any citations!
[136] bbl.pm:652> INFO - Writing 'Test.bbl' with encoding 'UTF-8'
[136] bbl.pm:755> INFO - Output to Test.bbl
[136] Biber.pm:128> INFO - WARNINGS: 1

未在文中引用时的警告信息是LaTeX Warning: Empty bibliography on input line 16.

文中引用时的错误和警告信息为: 第 14 ! Undefined control sequence. ! Missing $ inserted. ! Extra }, or forgotten $. 行: 第 15 ! Missing $ inserted. 行: 第 16 行: LaTeX Warning: Empty bibliography on input line 16.

我在 Ubuntu 20.04 上运行 Linux、Texlive2019(安装了那个,而不是更新的)和 texmaker。

有人有解决方案吗?

标签: latexbibliographylatex-environmentbiblatex

解决方案


两个问题:

  • 您的}围兜条目末尾的 丢失了

  • \citep{}默认情况下,biblatex 不提供。您可以使用biblatex 的 \parencite{} instead or thenatbib=true` 选项


\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[authordate,autocite=inline,backend=biber,sorting=nyt,natbib=true]{biblatex-chicago}


\begin{filecontents*}[overwrite]{\jobname.bib}
@article{sanborn_learning_2014,
    title = {Learning Democracy: Education and the Fall of Authoritarian Regimes},
    volume = {44},
    issn = {0007-1234, 1469-2112},
    url = {https://www.cambridge.org/core/product/identifier/S0007123413000082/type/journal_article},
    doi = {10.1017/S0007123413000082},
    shorttitle = {Learning Democracy},
    abstract = {Studies on what causes a state to democratize have focused on economic, social, and international factors. Many of them argue that higher levels of education should promote democracy. However, few articulate clearly how education affects democratization, and fewer still attempt to test the supposed link across time and space. This article fills that gap by considering how different levels of education influence democratization, and the conditions under which education is most likely to promote democracy. Analyses of eighty-five authoritarian spells from 1970 to 2008 find that higher levels of mass, primary, and tertiary education are robustly associated with democratization. Secondary analyses indicate that education is most effective in promoting democratization when both males and females are educated. An illustration from Tunisia follows.},
    pages = {773--797},
    number = {4},
    journaltitle = {British Journal of Political Science},
    shortjournal = {Brit. J. Polit. Sci.},
    author = {Sanborn, Howard and Thyne, Clayton L.},
    urldate = {2021-09-18},
    date = {2014-10},
    langid = {english},
}
\end{filecontents*}

\addbibresource{\jobname.bib}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\DeclareUnicodeCharacter{202F}{\,}


\begin{document}

Test citing \citep{sanborn_learning_2014}

\printbibliography
\end{document} 

在此处输入图像描述


推荐阅读