LaTex 错误:缺少 \endcsname 插入。无法编译

LaTex 错误:缺少 \endcsname 插入。无法编译

在编辑论文某一章的引文时,我遇到了几十个如下的错误,并且无法再将文件编译为 pdf:

*Missing \endcsname inserted.
<to be read again> 
                   \unhbox 
l.420 ...dre_left_2007}{nyt/global//global/global}
                                                  
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.*

看来引用或 output.aux 文件有问题。我尝试清除缓存,但没有帮助。

有人知道这是怎么回事吗?我会很感激任何提示!这是我的 .tex 文件:

%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[
12pt, % The default document font size, options: 10pt, 11pt, 12pt
oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side
english,
%ngerman,
onehalfspacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)
%nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single
%liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents
%toctotoc, % Uncomment to add the main table of contents to the table of contents
%parskip, % Uncomment to add space between paragraphs
%nohyperref, % Uncomment to not load the hyperref package
\headsepline  % Uncomment to get a line under the header
%chapterinoneline, % Uncomment to place the chapter title next to the number on one line
consistentlayout, % Uncomment to change the layout of the declaration, abstract and acknowledgements pages to match the default layout
dottedtoc, headinclude, footinclude=true,
openany,
]{MastersDoctoralThesis} % The class file specifying the document structure
%\usepackage[explicit]{titlesec}
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{stackengine}
\usepackage{titlesec}
%\makeatletter
%\let\degree\relax
%\makeatother
\usepackage{array} %for tables
\usepackage{tabu}
\usepackage{gensymb}
\usepackage{mathpazo} % Use the Palatino font by default
\usepackage[export]{adjustbox}[2011/08/13]
\usepackage{calc}
%\usepackage{float}
\usepackage{floatrow}
\usepackage[official]{eurosym}
\usepackage[justification=justified, singlelinecheck=false]{caption}
\usepackage[strings]{underscore}
%\usepackage[autostyle]{csquotes}
%\usepackage{stackengine}
\usepackage{pdfpages}
%\usepackage[title,titletoc]{appendix}
\usepackage[toc,page]{appendix}
\usepackage{wrapfig}

%\usepackage[explicit]{titlesec}
\usepackage{caption}
\usepackage[labelfont=bf]{caption}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
%\usepackage[justification=centering]{caption}
\usepackage{microtype}
\usepackage[hyphens]{url}
%\usepackage{chngcntr}
\usepackage[official]{eurosym}
%\counterwithout{table}{chapter}

%\addto\extrasenglish{\def\subfigurename{Figure}}
%\DeclareCaptionLabelFormat{nonumber}{#1:}
%\captionsetup[subfigure]{labelformat=nonumber}

%\captionsetup{
 % textfont=12pt,
 %justification=centerfirst;%raggedright,
 % singlelinecheck=false
%}

\usepackage[backend=bibtex,style=authoryear,natbib=true,firstinits=true]{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)
\DeclareNameAlias{sortname}{last-first}

\addbibresource{References0111.bib} % The filename of the bibliography
\setlength\bibnamesep{1.5\itemsep}
%\setlength{\bibsep}{5pt}
\DefineBibliographyStrings{english}{%
  bibliography = {References},
}

\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography


%----------------------------------------------------------------------------------------
%   MARGIN SETTINGS
%----------------------------------------------------------------------------------------

\geometry{
    paper=a4paper, % Change to letterpaper for US letter
    inner=2.5cm, % Inner margin
    %outer=3.8cm, % Outer margin
    outer=3cm, % Outer margin
    bindingoffset=.5cm, % Binding offset
    top=1.5cm, % Top margin
    bottom=1.5cm, % Bottom margin
    %showframe, % Uncomment to show how the type block is set on the page
}

%----------------------------------------------------------------------------------------
%   THESIS INFORMATION
%----------------------------------------------------------------------------------------

\newcommand{\myname}{xxx}
\newcommand{\mytitle}{xxx}
\newcommand{\firstsupervisor}{xxx}
\newcommand{\cosupervisor}{xxx}
\newcommand{\matrikelnummer}{xxx}
\newcommand{\thesis}{Thesis for Attaining the Academic Grade}
\newcommand{\Master}{xxx)}
\newcommand{\inwhat}{in}
\newcommand{\program}{xxx}
\newcommand{\uni}{xxx}
\newcommand{\submission}{}

\AtBeginDocument{
\hypersetup{pdftitle=\ttitle} % Set the PDF's title to your title
\hypersetup{pdfauthor=\authorname} % Set the PDF's author to your name
\hypersetup{pdfkeywords=\keywordnames} % Set the PDF's keywords to your keywords
}

\begin{document}

\frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages

\pagestyle{plain} % Default to the plain heading style until the thesis style is called for the body content
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Title Page                                                                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{titlepage}
\begin{large}
\hfill 
\begin{minipage}{5cm} 

\makebox[9.5em][r]{\includegraphics[width=15cm]{logos.png}}
% for me it worked converting all eps to pdf using epstopdf
%\makebox[4cm][c]{UniLogo.pdf}  
%\end{figure}
\end{minipage}
\begin{center}
    \mbox{}
      \vfill
      {\LARGE \mytitle}\\
      %{\huge huge font size}
      \vfill
      by \\
      \vfill
      {\Large \myname}\\
      \vfill
      \vfill
      {\normalsize \thesis}\\[0.2in]
      {\Large \Master} \\
      {\normalsize \inwhat} \\[0.1in]
      {\Large \program} \\
      \vfill
      {\normalsize \firstsupervisor}\\
      {\normalsize \cosupervisor}\\
      {\normalsize \submission}\\
      \vspace{.2in}
      \mbox{}
   \end{center}
   \end{large}
   \end{titlepage}
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Abstract                                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \newpage
  \pagenumbering{roman} \setcounter{page}{1}  % this is the first counted page
 \ohead*{}
\ihead*{}
\cfoot*{\pagemark}
\chapter*{Abstract\markboth{Abstract}{Abstract}}
 % not longer than 150 words for BSc theses and MSc theses!
 
%write here


  
  
%----------------------------------------------------------------------------------------
%   ACKNOWLEDGEMENTS
%----------------------------------------------------------------------------------------

%\newpage
%\chapter*{Acknowledgements\markboth{Acknowledgements}{Acknowledgements}}


%----------------------------------------------------------------------------------------
%   LIST OF CONTENTS/FIGURES/TABLES PAGES
%----------------------------------------------------------------------------------------
%\setcounter{tocdepth}{1}
\tableofcontents % Prints the main table of contents

\listoffigures % Prints the list of figures

\listoftables % Prints the list of tables

%----------------------------------------------------------------------------------------
%   ABBREVIATIONS
%----------------------------------------------------------------------------------------

\begin{abbreviations}{ll} % Include a list of abbreviations (a table of two columns)


\end{abbreviations}
\let\cleardoublepage\clearpage


%----------------------------------------------------------------------------------------
%   THESIS CONTENT - CHAPTERS
%----------------------------------------------------------------------------------------

\mainmatter % Begin numeric (1,2,3...) page numbering

\pagestyle{thesis} % Return the page headers back to the "thesis" style

\titleformat{\chapter}[display]
  {\normalfont\bfseries}{}{0pt}{\Huge}
\titlespacing*{\chapter}{0pt}{0in}{20pt}

\ohead*{}
\ihead*{}
\chead*{\leftmark}
\cfoot*{\pagemark}



% Include the chapters of the thesis as separate files from the Chapters folder
% Uncomment the lines as you write the chapters

\include{Chapters/Introduction}
\include{Chapters/Methods} 
\include{Chapters/Results}
\include{Chapters/Discussion} 

%----------------------------------------------------------------------------------------
%   THESIS CONTENT - APPENDICES
%----------------------------------------------------------------------------------------
\printbibliography[heading=bibintoc]


\appendix

%\appendixname{Appendix}
% Cue to tell LaTeX that the following "chapters" are Appendices
% Include the appendices of the thesis as separate files from the Appendices folder
% Uncomment the lines as you write the Appendices
\renewcommand\appendixname{}

\chapter{Appendix} 
%\addcontentsline{toc}{chapter}{Appendix}
%\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
 

%----------------------------------------------------------------------------------------
%   BIBLIOGRAPHY
%----------------------------------------------------------------------------------------

%\bibliographystyle{unsrt}
%\nocite{*}
%\printbibliography[heading=bibintoc]


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Affirmation Statement/Eidesstattliche Erklärung                                                       %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\thispagestyle{empty} % no footnotes, no heads, no page numbers
    \mbox{}
      \vfill
      {\Large Eidesstattliche Erklärung\\} 
      \vfill
      Hiermit erkläre ich, \myname, die vorliegende Arbeit \textit{\mytitle} selbständig verfasst zu haben und keine anderen Quellen oder Hilfsmittel als die angegebenen verwendet zu haben. 
       \vfill 
        \vfill
        $\overline{\textrm{\myname, \matrikelnummer}}$
      \vfill
      \vfill
      \vfill
      {\Large Affirmation Statement\\} 
      \vfill
      I, \myname, hereby affirm that I composed the work at hand, entitled \textit{\mytitle}, autonomously and that I did not use any other resources or auxiliary means than the ones stated. 
            \vfill 
        \vfill
        $\overline{\textrm{\myname, \matrikelnummer}}$

\end{document}  

相关内容