掃描使用 \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%防止biber被摘要中的「%」字元噎住?

相關內容