latex - 打印参考书目:空参考书目
问题描述
这几天我一直在寻找一个有效的解决方案,但它从来没有奏效。
最小的可重现示例如下:
\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。
有人有解决方案吗?
解决方案
两个问题:
您的
}
围兜条目末尾的 丢失了\citep{}
默认情况下,biblatex 不提供。您可以使用biblatex 的instead or the
natbib=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}
推荐阅读
- swiftui - ZoomableScrollView 不再适用于 SwiftUI
- python - 旋转时PIL切断图像?
- xcode - Xcode 13:构建挂起并显示“iPhone 正忙:让 Apple Watch 为开发做好准备”
- python - 如何在多类分类问题中显示具有预测的某个类的图像?
- windows - 如何使用 cmd 删除 Windows 目录?
- javascript - 帖子不按顺序排列。想在顶部显示最新的帖子
- c# - 在 Excel Web 插件开发 Visual Studio 中使用项目应用程序设置
- python - 如何将 csv 文件读取到 numpy 数组,包括第 0 个索引中的列名
- swift - 这种 Swift 语法的长格式
- javascript - MaterialUI 值道具在值状态更改后不更新组件的动态渲染