当我使用 TexStudio 编译文档时出现以下错误:
! Missing { inserted.
<to be read again>
^
l.68 \glsXpageXglsnumberformat{}{xxvii}}}
\glsgroupskip
A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
(If you're confused by all this, try typing `I}' now.)
我第一次尝试在 classicthesis 配置中使用“dottedtoc”时就发生了这种情况,但从那一刻起,无论我是否保留“dottedtoc”,都会出现错误。我知道我应该加载 MWE,但我不知道如何重现错误,因为我的文档现在很大,加载了许多包。
希望您能帮助我,也许能向我解释 TextStudio 提出的解决方案!
谢谢,乔瓦尼
编辑:我尝试破解文档。我注意到错误在于符号列表的定义或符号的定义(尽管这很奇怪,因为直到前天它才正常工作)。表格的示例来自此处1,但是如果您知道获取符号列表的更好方法(没有错误),请告诉我。我注意到在我的 PC 上这个脚本给我错误,但如果我将其复制并粘贴到新文件中(即使没有保存它),错误就不会出现。所以我尝试删除 .gls、. toc 和 . aux 文件,但错误仍然存在。我希望这足以解决问题!谢谢!
% A Classic Thesis Style
\RequirePackage{fix-cm} % fix some latex issues see: http://texdoc.net /texmf-dist/doc/latex/base/fixltx2e.pdf
\documentclass {scrreprt} % Classe: Report
\PassOptionsToPackage{parts,%drafting,%
listings,floatperchapter,%linedheaders,%
subfig,eulerchapternumbers,beramono,eulermath,%dottedtoc,
pdfspacing}
{classicthesis}
\usepackage{classicthesis}
\usepackage[utf8]{inputenc} % Encoding inputs
\usepackage[italian,english]{babel} % Select language (last most used)
\usepackage[T1]{fontenc} % T2A for cyrillics
\usepackage{newunicodechar} % For copy%paste from PDF or web (citations)
\newunicodechar{fi}{fi}
\newunicodechar{ff}{ff}
\newcounter{dummy} % necessary for correct hyperlinks (to index, bib, etc.)
\newlength{\abcd} % for ab..z string length calculation
\providecommand{\mLyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
\usepackage{csquotes} % Context Sensitive Quotation Facilities
\usepackage{mathtools}
% 4. Setup floats: tables, (sub)figures, and captions
\usepackage{tabularx} % better tables
\setlength{\extrarowheight}{3pt} % increase table row height
\newcommand{\tableheadline}[1]{\multicolumn{1}{c}{\spacedlowsmallcaps{#1}}}
\newcommand{\myfloatalign}{\centering} % to be used with each float for alignment
\usepackage{multirow} % single row for multiple columns in tables
\usepackage{caption} % Ita: didascalie
\captionsetup{font=small} % format=hang,
\usepackage{subfig}
\usepackage{cleveref} % many references to tables
% Glossary, list of symbols and nomenclature
\usepackage[nonumberlist,nopostdot,acronym,xindy]{glossaries}
\setlength{\glsdescwidth}{15cm}
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols} % create add. symbolslist
\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit} {\glsunit}{\Glsunit}{\GLSunit} % Inserts unit column
\makeglossaries
% SYMBOLS
\newglossaryentry{departures}{name=\ensuremath{D},
description={Set of departing flights (departures)},
unit={[-]},
type=symbolslist}
\newglossarystyle{symbunitlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
\begin{longtable}{lp{0.6\glsdescwidth}>{\centering\arraybackslash}p{2cm}}}%
{\end{longtable}}%
%
\renewcommand*{\glossaryheader}{% Change the table header
\bfseries Sign & \bfseries Description & \bfseries Unit \\
\hline
\endhead}
\renewcommand*{\glossentry}[2]{% Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \glsunit{##1} \tabularnewline
}
}
\begin{document}
\pagenumbering{roman}
\pagestyle{plain}
% List of symbols
\glsaddall
\cleardoublepage
\phantomsection
\refstepcounter{dummy}
\addcontentsline{toc}{chapter}{List of Symbols}
\printglossary[type=symbolslist,style=symbunitlong] % list of symbols
\end{document}