\usepackage{tikz} 导致“额外}”和“缺失}”错误

\usepackage{tikz} 导致“额外}”和“缺失}”错误

我到处寻找答案。我尝试thesis.tex在 texstudio 中编译我的文件(使用 miktex)。一切正常,没有出现任何错误,直到我尝试添加,\usepackage{tikz}然后出现以下错误,并不断出现。它说这些错误在 .toc .lot 和 .lof 文件中,但我找不到其中的任何错误。

我还应该指出,在我妻子的电脑上,同样的代码在同样的设置下也能正常工作。她根本没有遇到这些错误。我们都在使用 Windows 10。

%% LyX 2.1.4 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass{../library/UNCC-thesis}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\usepackage{array}
\usepackage{float}
\usepackage{graphicx}
\usepackage{nomencl}


\usepackage{tikz}   %when i comment this out i do not get errors

\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature

\makeatletter

\providecommand{\tabularnewline}{\\}

\@ifundefined{showcaptionsetup}{}{%
 \PassOptionsToPackage{caption=false}{subfig}}
\usepackage{subfig}
\makeatother

\begin{document}
\pagenumbering{roman}
\fbmatterchapterformat

\doctype{thesis}

%
\title{My lyx thesis}
\author{Test User}
\degree{Master of Science}
\major{Electrical Engineering}
\publicationyear{2015}

\advisor{Dr. Person A}

\committeeMember{Dr. Person B}
\committeeMember{Dr. Person C}


% Generate the preliminary title page and copyright page.
\maketitlepage
\makecopyright
\begin{abstract}
\end{abstract}
\begin{dedication}
\end{dedication}
\begin{acknowledgements}

\end{acknowledgements}
\tableofcontents{}

\listoftables


\listoffigures


\newpage
\renewcommand{\nomname}{LIST OF ABBREVIATIONS}

\addcontentsline{toc}{chapter}{\nomname}\settowidth{\nomlabelwidth}{ECE}
\printnomenclature{}

\nomenclature{ECE}{An acronym for Electrical and Computer Engineering.}

\newpage
\setcounter{page}{1}
\pagenumbering{arabic}
% 2 inch top spacing for new chapters
\bodychapterformat
\begin{preface}

\end{preface}

\chapter{INTRODUCTION}


\chapter{CONCLUSIONS}


\fbmatterchapterformat

\bibliographystyle{ieeetr}
\bibliography{references_db}


\newpage{}\uncctocformat{chapter}{0pt}{350pt}{\appendixname~\thecontentslabel:~}
\renewcommand{\chaptertitlename}{APPENDIX}

\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}

\appendix


\end{document}

我尝试删除整个代码并重新开始,并删除 .toc .lof 和 .lot 文件。我尝试卸载 texstudio(通过控制面板和 texstudio 的卸载选项)和 miktex 并重新安装,我尝试重新配置 texstudio。我完全不知所措,已经为此困扰了好几天。

Extra }, or forgotten \endgroup. \contentsline {chapter}{LIST OF TABLES}{vii}

Missing } inserted. \contentsline {chapter}{LIST OF TABLES}{vii}

Extra }, or forgotten \endgroup. \contentsline {chapter}{LIST OF FIGURES}{viii}

Missing } inserted. \contentsline {chapter}{LIST OF FIGURES}{viii}

Extra }, or forgotten \endgroup. ...ntsline {chapter}{LIST OF ABBREVIATIONS}{1}

Missing } inserted. ...ntsline {chapter}{LIST OF ABBREVIATIONS}{1}

Extra }, or forgotten \endgroup. ...e {chapter}{\numberline {1}INTRODUCTION}{2}

Missing } inserted. ...e {chapter}{\numberline {1}INTRODUCTION}{2}

Extra }, or forgotten \endgroup. ...ion}{\numberline {1.1}Problem Statement}{3}

Missing } inserted. ...ion}{\numberline {1.1}Problem Statement}{3}

Extra }, or forgotten \endgroup. ...ne {chapter}{\numberline {2}CONCLUSIONS}{5}

相关内容