扫描 \field 的使用时文件结束

扫描 \field 的使用时文件结束

我遇到的问题是我的论文几乎无缘无故地无法再编译,特别是参考书目(没有它,论文可以顺利通过)。我使用classicthesis模板,它非常庞大。但是,如果我使用标准类创建一个最小示例,问题仍然存在article

\documentclass[]{article}
\usepackage{csquotes}
\PassOptionsToPackage{%
    backend=biber, % Instead of bibtex
    %backend=bibtex,
    %bibencoding=ascii,%
    language=auto,%,
    style=numeric-comp,%
    %style=authoryear-comp, % Author 1999, 201
    %bibstyle=ieeetr,dashed=false, % dashed: substitute rep. author with ---
    %sorting=nyt, % name, year, title
    maxbibnames=10, % default: 3, et al.
    backref=true,%
    natbib=true % natbib compatibility mode (\citep and \citet still work)
}{biblatex}

\usepackage[sorting=none]{biblatex}
%opening
\title{}
\author{}
\addbibresource{lib.bib}
\begin{document}

\maketitle

\begin{abstract}

\end{abstract}
\cite{Cleland2013}
\section{}

\end{document}

其中 bib 文件有一个条目:

@article{Cleland2013,
abstract = {Past, current and projected future population growth is outlined. Barring a calamitous pandemic, a further increase in the world's population from 7 to between 8.8 and 10 billion by mid-century is unavoidable. This increase is driven by high fertility in sub-Saharan Africa whose population is forecast to more than double in the next 40 years and by a modest rise of 23 % in Asia's huge population. Beyond mid-century, the range of plausible demographic destinations widens; much depends on fertility rates in the next few decades because they will determine the number of potential reproducers in the second half of the century. Vigorous promotion of family planning, particularly in Africa, is crucial to achievement of population stabilisation. Unchanged fertility implies a global population of 25 billion by the end of the century. In the next few decades the contribution of human population growth to global environmental change is moderate, because nearly all growth will occur in poor countries where consumption and emission of greenhouse gases is low. The implications for food production, and thereby water consumption, are greater. Much of the future need for food will be driven by increased numbers rather than changing diets. Loss of bio-diversity and natural habitats, degradation of fragile eco-systems due to over-exploitation and aquifer deletion are likely consequences. {\textcopyright} 2013 Springer Science+Business Media Dordrecht.},
author = {Cleland, John},
doi = {10.1007/s10640-013-9675-6},
issn = {0924-6460},
journal = {Environ. Resour. Econ.},
keywords = {Age structure,Contraception,Demographic transition,Fertility,Population growth,Population projections},
mendeley-groups = {thesis},
month = {aug},
number = {4},
pages = {543--554},
publisher = {Kluwer Academic Publishers},
title = {{World Population Growth; Past, Present and Future}},
url = {http://link.springer.com/10.1007/s10640-013-9675-6},
volume = {55},
year = {2013}
}

我无法弄清楚这个问题,从昨天开始就一直在尝试......错误信息有点模棱两可:

Zeile 23: File ended while scanning use of \field. \begin{document}
Zeile 27: Undefined control sequence. \begin{abstract}
Zeile 30: Missing number, treated as zero. \cite{Cleland2013}
Zeile 30: Missing number, treated as zero. \cite{Cleland2013}
Zeile 30: Missing number, treated as zero. \cite{Cleland2013}

答案1

.log当你试图引用问题中的条目时,文件中出现的完整错误消息比编辑器中的摘要稍微有用一点

(abstract-prob.bbl)
Runaway argument?
{Past, current and projected future population growth is outlined. Ba\ETC.
! File ended while scanning use of \field.
<inserted text> 
                \par 
l.33 \begin{document}

错误消息上方的一行提示了您需要在何处寻找罪魁祸首。引用的文字“概述了过去、当前和未来人口增长情况。”是abstract您输入的字段的开头。

仔细查看该字段(为便于阅读添加了换行符)

abstract = {Past, current and projected future population growth is outlined.
            Barring a calamitous pandemic, a further increase in the world's population
            from 7 to between 8.8 and 10 billion by mid-century is unavoidable.
            This increase is driven by high fertility in sub-Saharan Africa
            whose population is forecast to more than double in the next 40 years
            and by a modest rise of 23 % in Asia's huge population.
            Beyond mid-century, the range of plausible demographic destinations widens;
            much depends on fertility rates in the next few decades because
            they will determine the number of potential reproducers in
            the second half of the century.
            Vigorous promotion of family planning, particularly in Africa,
            is crucial to achievement of population stabilisation.
            Unchanged fertility implies a global population of 25 billion
            by the end of the century.
            In the next few decades the contribution of human population
            growth to global environmental change is moderate,
            because nearly all growth will occur in poor countries
            where consumption and emission of greenhouse gases is low.
            The implications for food production,
            and thereby water consumption, are greater.
            Much of the future need for food will be driven by increased
            numbers rather than changing diets.
            Loss of bio-diversity and natural habitats,
            degradation of fragile eco-systems due to over-exploitation
            and aquifer deletion are likely consequences.
            {\textcopyright} 2013 Springer Science+Business Media Dordrecht.},

表明它包含未转义的%符号。

该字段在文件中的最终内容.bbl如下(无换行符)

  \field{abstract}{Past, current and projected future population growth is outlined. Barring a calamitous pandemic, a further increase in the world's population from 7 to between 8.8 and 10 billion by mid-century is unavoidable. This increase is driven by high fertility in sub-Saharan Africa whose population is forecast to more than double in the next 40 years and by a modest rise of 23 % in Asia's huge population. Beyond mid-century, the range of plausible demographic destinations widens; much depends on fertility rates in the next few decades because they will determine the number of potential reproducers in the second half of the century. Vigorous promotion of family planning, particularly in Africa, is crucial to achievement of population stabilisation. Unchanged fertility implies a global population of 25 billion by the end of the century. In the next few decades the contribution of human population growth to global environmental change is moderate, because nearly all growth will occur in poor countries where consumption and emission of greenhouse gases is low. The implications for food production, and thereby water consumption, are greater. Much of the future need for food will be driven by increased numbers rather than changing diets. Loss of bio-diversity and natural habitats, degradation of fragile eco-systems due to over-exploitation and aquifer deletion are likely consequences. © 2013 Springer Science+Business Media Dordrecht.}

当 LaTeX从文件中%读取字段内容时遇到该符号时,我们会收到错误,因为该符号会将该行的其余部分变成注释,这意味着看不到字段末尾的右花括号。abstract.bbl%}

这导致

! File ended while scanning use of \field.

错误。

解决方法是将%抽象字段中的符号转义为\%

由于大多数书目样式都会忽略该abstract字段,因此最好将该字段从文件中.bib完全删除. (这可以通过 Biber 即时完成,请参阅使用 biblatex/biber 时 bib 输入字段中的百分号错误, 但它是很多最好从文件中直接彻底删除该字段.bib。)如果您需要摘要,理论上可以%动态地转义 s防止 biber 因摘要中的“%”字符而窒息?

相关内容