最近几天我真的很紧张,因为我遇到了一个以前从未遇到过的参考文献问题。下面,我尝试生成参考书目,但要么出现错误"\providecommand\NAT@force@numbers{}\NAT@force@numbers"
,要么我的文档带有问号而不是参考书目名称/日期。
有什么想法可以发现导致我出现此问题的原因并解决它吗?
我不想使用natbib
数字,而是使用名称,我不明白为什么会出现这个问题。我读过类似的问题,但我无法在我的文件上发现任何缺失的日期,而之前这些文件都没有问题,这就是我感到困惑的原因。
PS 我向您展示了我使用的所有软件包,以防其他原因导致问题。
\RequirePackage{filecontents}
\documentclass[12pt,a4paper]{article}
\listfiles
\usepackage{amsthm}
\usepackage{titling}
\usepackage[utf8]{inputenc}
\usepackage{tcolorbox}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{mwe}
\usepackage{subfig}
\usepackage{float}
%\usepackage{cite}
\usepackage[authoryear,round]{natbib}
%\usepackage[numbers]{natbib}
\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{stfloats}
\usepackage{authblk}
\usepackage{afterpage}
\usepackage[T1]{fontenc}
%\usepackage[hidelinks]{hyperref}
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{array}
\usepackage{pdflscape}
\usepackage{array,ragged2e,booktabs}
\usepackage{tikz}
\usepackage{longtable}
\usepackage{capt-of}
\usepackage{tabularx}
\usepackage{textcomp}
\usepackage{makecell}
\usepackage[british]{babel}
\usepackage[euler]{textgreek}
\usepackage{makecell}
\usepackage{xcolor,colortbl}
%\usepackage{dirtytalk}
%\usepackage[none]{hyphenat}
%\hyphenation{sy-ner-gi-stic}
%\usetikzlibrary{shapes.geometric, arrows}
\pagestyle{fancy}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\fancyhf{}
\lhead{}
\makeatletter
\def\thanks#1{\protected@xdef\@thanks{\@thanks
\protect\footnotetext{#1}}}
\makeatother
\renewcommand\tabularxcolumn[1]{m{#1}}
\definecolor{LightCyan}{rgb}{0.88,1,1}
\definecolor{Burntsienna}{rgb}{0.91,0.45,0.32}
\date{}
\newcolumntype{C}{>{$\displaystyle}c<{$}}
\bibliographystyle{apalike}
\setlist[enumerate]{label*=\arabic*.}
\begin{document}
\title{\vspace{-3.0cm}\rule{\textwidth}{1pt}\\title here \\\vspace{1.0cm}\rule{\textwidth}{1pt}\\{\Large Probation Report}}
\author{author here\thanks{department here}}
\maketitle
\newpage
\tableofcontents
\newpage
\renewcommand{\thesection}{\arabic{section}}
\section{bla bla}
bla bla bla bla \citep{holling_resilience_1973,gunderson_ecological_2000} bla bla bla \citep{gunderson_ecological_2000}. bla bla bla bla bla bla \citep{achard_areas_2006, alkama_biophysical_2016, appenzeller_new_2015, bergeron_ecosystem_2017, berner_plant_2013,brown_once_2012, chapin_global_2004, forkel_trend_2013, forkel_codominant_2015, furyaev_effects_2001, lucht_terrestrial_2006, rydgren_disturbance_2004, jasinski_creation_2005, soja_climate-induced_2007, scheffer_thresholds_2012, williams_who_2011, young_climatic_2017, vygodskaya_ecosystems_2007, tanja_air_2003}.
\newpage
\section{References}
%\nocite{*}
\bibliography{fone,ftwo}
\newpage
\section{Supplementary material}
\end{document}
答案1
根据我的经验,此错误是由缺少年份的书目参考文献引起的。将 bib 文件加载到 JabRef 并按年份排序应该可以帮助您识别有问题的条目。