![nameref 分段:参数必须按连续顺序编号](https://linux22.com/image/421858/nameref%20%E5%88%86%E6%AE%B5%EF%BC%9A%E5%8F%82%E6%95%B0%E5%BF%85%E9%A1%BB%E6%8C%89%E8%BF%9E%E7%BB%AD%E9%A1%BA%E5%BA%8F%E7%BC%96%E5%8F%B7.png)
在对 TeXLive 2020 进行最新更新之后,使用文档类的书长文档memoir
现在无法使用 pdflatex 或 xelatex 进行编译,尽管我没有对源代码进行任何更改。
哪些软件包损坏了东西?如何修复?
我很难知道从哪里开始诊断问题!以下是日志的摘录:
(/usr/local/texlive/2020/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2019/09/16 v2.46 Cross-referencing by name of section
(/usr/local/texlive/2020/texmf-dist/tex/latex/refcount/refcount.sty
Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO)
)
(/usr/local/texlive/2020/texmf-dist/tex/generic/gettitlestring/gettitlestring.s
ty
Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO)
)
\c@section@level=\count655
)
Redoing nameref's sectioning
./topology.tex:99: Parameters must be numbered consecutively.
<to be read again>
##
l.99 \begin{document}
I've inserted the digit you should have used after the #.
Type `1' to delete what you did use.
日志文件显示同一错误重复出现多次nameref
。
在处理输入到序言中的许多文件时发生了错误。序言确实不是明确地加载该包,因此我推测这是由另一个交叉引用相关的包nameref
加载的。hyperref
这些序言文件包括以下用于交叉引用的文件,该文件很可能是有问题的文件:
% LINKS.STY - Indexing, cross-referencing, & hyperlinks
\NeedsTeXFormat{LaTeX2e}[2020/02/02]
\ProvidesPackage{preamble/links}[2020-09-29
Indexing, cross-referencing, & hyperlinks]
% LOADS packages
% biblatex.sty, nomencl.sty,
% xurl.sty,
% doclicense.sty, hyperxmp.sty,
% hyperref.sty,
% xassoccnt.sty, zref.sty
% aliascnt.sty,
% cleveref.sty,
% crossreftools.sty
%
% SWITCHES USED: colorsecs, washthms
%% BIBLIOGRAPHY
\RequirePackage[
backend=bibtex,
%backend=biber,
bibstyle=mybooknumeric,
citestyle=numeric,
dashed=true,
defernumbers=true,
urldate=iso,date=iso,seconds=true]%
{biblatex}
%
\addbibresource{topologyref.bib}
\addbibresource{topologyread.bib}
%
\setcounter{biburllcpenalty}{7000}% was 9999
\setcounter{biburlucpenalty}{8000}
%% NOTATION INDEX
\RequirePackage[refpage,norefeq,intoc,english,cfg]{nomencl}
%% INDEXING COMMANDS
\newcommand{\indexemph}{\textbf} % definition or main location
\newcommand{\nn}[1]{{#1}n}
\newcommand{\figidx}[1]{{#1}fig}
\providecommand\gobbleone[1]{}
\newcommand{\seeonly}[2]{\, (\emph{\seename} #1)}
\newcommand{\also}[2]{\unskip\emph{\alsoname} #1}
\newcommand{\Also}[2]{\unskip\emph{See also} #1}
% Fix error re entries in index page header
% https://tex.stackexchange.com/a/332098/13492
\def\indexsee#1{\indexseeI#1@\end}
\def\indexseeI#1@#2\end{%
\def\temp{#2}%
\ifx\temp\empty
\def\next{\indexseeIII{#1}{#1}}%
\else
\def\next{\indexseeII#1@#2\end}%
\fi
\next
}
\def\indexseeII#1@#2@\end{\indexseeIII{#1}{#2}}
\def\indexseeIII#1#2#3{\index{#1@#2\protect\gobbleone|seeonly{#3}}}
\newcommand{\indexalso}[2]{\index{#1!zzzz@\protect\gobbleone|also{#2}}}
\newcommand{\indexAlso}[2]{\index{#1!zzzz@\protect\gobbleone|Also{#2}}}
%% try this
\newcommand{\indexnamesee}[2]{\index[names]{#1\protect\gobbleone|seeonly{#2}}}
% ...fix for memoir to put hyperlink on mainref, too:
\newcommand{\mainref}[1]{\textbf{\emph{\hyperpage{#1}}}}
%% END INDEXING
%% CROSS-REFERENCING
\RequirePackage{xurl} % new: break URL anywhere
\RequirePackage[type={CC},modifier={by-nc-nd},version={4.0},lang={english}]{doclicense}%
\RequirePackage{hyperxmp} % to add metadata info into pdf
\usepackage[pdfa]{hyperref}%
\hypersetup{
pdfapart=2, pdfaconformance=u,
bookmarksnumbered,bookmarksopen=true,bookmarksopenlevel=3,
breaklinks=true,
colorlinks, citecolor=red, filecolor=defaultcolor, linkcolor=blue, urlcolor=blue,
linktocpage=true,linktoc=all,
pdftitle={Topology, Second Edition},
pdfauthor={Murray Eisenberg},pdfcreator={Murray Eisenberg},
pdfauthortitle={Professor Emeritus, University of Massachusetts Amherst},
pdfcontactemail={[email protected]},
pdfcontacturl={https://www.math.umass.edu/directory/emeritus-faculty/murray-eisenberg},
pdfpublisher={Murray Eissenberg},
pdfdate={\today},
pdflang={en},pdfmetalang={en},
pdfpubtype={Book},
pdfsubject={topology},
pdfkeywords={topology, general topology,topological space,metric space,compact space,connected space,continuity,convergence},
pdfcopyright={Copyright (C) 2020, Murray Eisenberg},
pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/4.0/},
}%
\ifTUTeX
% no further glyph info needed
\else
\input{glyphtounicode}
\pdfgentounicode=1
\pdfglyphtounicode{EM}{0058 0058 0058 0058 0058 0058 0058 0058}%
\pdfglyphtounicode{NUL}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{uni222B.dsp}{222B}%
\pdfglyphtounicode{summationdisplay.1}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{summationdisplay}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalBigg}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalbig}{0060 0060 0060 0060 0060 0060 0060 0060}%
\pdfglyphtounicode{radicalbigg}{0060 0060 0060 0060 0060 0060 0060 0060}%
\immediate\pdfobj stream attr{/N 3} file{sRGB.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S /GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (sRGB v4)
/Info (sRGB)
>> ]
}
\fi
% Allow link to page with label -- patch by Martin Scharrer
% cf. https://tex.stackexchange.com/a/19416/9237
\let\orig@Hy@EveryPageAnchor\Hy@EveryPageAnchor
\def\Hy@EveryPageAnchor{%
\begingroup
\hypersetup{pdfview=Fit}%
\orig@Hy@EveryPageAnchor
\endgroup
}
% My commands to use that
% Usage: \pagereftext{text-to-appar-in-link}{lbl} with usual \label{lbl} for target.
\newcommand{\pagereftext}[2]{\hyperlink{page.\getpagerefnumber{#2}}{#1} on \cpageref{#2}}
\WithSuffix\newcommand\pagereftext*[2]{\hyperlink{page.\getpagerefnumber{#2}}{#1}}
% HYPERREF FIXES - not needed: using \CC for complexes!
\@ifpackageloaded{hyperref}{% then...
%%% Redo, from mismath: % Not needed!
\let\mafx@old@dot=\.
\def\mafx@dot@skip{\thinmuskip}
\def\mafx@dot{\mskip\mafx@dot@skip}
\def\mafx@per@dot{\begingroup\ifmmode\def\mafx@tmp{\mafx@dot}\else%
\def\mafx@tmp{\mafx@old@dot}\fi\expandafter\endgroup\mafx@tmp}
%
\let\.=\mafx@per@dot}
{}
\AtBeginDocument{\addtocontents{toc}{\protect\hypersetup{hidelinks}}}
%MUST NOT explicitly load showidx except within the Oberdiek hack, below.
%\RequirePackage{showidx} % already loaded in root .tex file
%Begin the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx
\ifHy@hyperindex
\def\HyInd@ParenLeft{(}%
% Hook in \HyInd@@wrindex
\let\HyInd@showidx\@empty
% Hook in \HyInd@@wrindex for package showidx
\def\HyInd@showidx#1{%
\@showidx{#1}%
\if@nobreak
\ifvmode
\nobrak
\fi
\fi
}%
% Load package showidx
\let\siOrg@makeindex\makeindex
\let\siOrg@@index\@index
\let\siOrg@@wrindex\@wrindex
\let\siOrg@index\index
\RequirePackage{showidx}
\let\makeindex\siOrg@makeindex
\let\@index\siOrg@@index
\let\@wrindex\siOrg@@wrindex
\let\index\siOrg@index
% rest of hyperref part
\@ifpackageloaded{multind}{%
\let\HyInd@org@wrindex\@wrindex
\def\@wrindex#1#2{\HyInd@@wrindex{#1}#2||\\}%
\def\HyInd@@wrindex#1#2|#3|#4\\{%
\ifx\\#3\\%
\HyInd@org@wrindex{#1}{#2|hyperpage}%
\else
\def\Hy@temp@A{#3}%
\ifx\Hy@temp@A\HyInd@ParenLeft
HyInd@org@wrindex{#1}{#2|#3hyperpage}%
\else
\HyInd@org@wrindex{#1}{#2|#3}%
\fi
\fi
}%
}{%
\def\@wrindex#1{\@@wrindex#1||\\}
\def\@@wrindex#1|#2|#3\\{%
\ifx\\#2\\%
\protected@write\@indexfile{}{%
\string\indexentry{#1|hyperpage}{\thepage}%
}%
\else
\def\Hy@temp@A{#2}%
\ifx\Hy@temp@A\HyInd@ParenLeft
\protected@write\@indexfile{}{%
\string\indexentry{#1|#2hyperpage}{\thepage}%
}%
\else
\protected@write\@indexfile{}{%
\string\indexentry{#1|#2}{\thepage}%
}%
\fi
\fi
\endgroup
\HyInd@showidx{#1}%
\@esphack
}%
}%
\fi
%End the ``quick and dirty hack'' due to Heiko Oberdiek which loads showidx
%% Allow ref to section n, not section m.n
% From "trickier version" by Christian Hupfer
% https://tex.stackexchange.com/a/383608/13492
\let\@xp\expandafter
%
% Stripping the dot from the 1.2 -like reference
\def\@@stripdot#1.#2\@nil{#2}
%
% Stripping the memoir stuff from the reference, i.e. \M@TitleReference {1.2}{FOO} and handing #1 (1.2) over to the \@@stripdot macro
\def\@stripdot\M@TitleReference #1#2\@nil{\@@stripdot#1\@nil}
%
%Macro, second level of expansion
\newcommand{\stripdot}[1]{%
\@xp\@stripdot#1\@nil
}
\newcommand{\crefsec}[1]{%
% Expand the argument first
\IfRefUndefinedExpandable{#1}{%
% Do nothing if #1 is not defined
}{%
\hyperlink{\getrefbykeydefault{#1}{anchor}{}}{\@xp\stripdot\@xp{\getrefnumber{#1}}}%
}%
}
% Another way to link to page - Ulrike Fischer
% https://tex.stackexchange.com/a/549807/13492
% Usage: \zlabel{lbl} on target, \hyperpageref{lbl} for link
\usepackage[user,hyperref]{zref}%{zref-base,zref-user}
\zref@newprop*{pagedest}[Doc-Start]{page.\@the@H@page}
\zref@addprop{main}{pagedest}
\newcommand\hyperpageref[1]{\hyperlink{\zref@extract{#1}{pagedest}}{\pageref*{#1}}}
% Fix capitalization of named theorems, etc., in list of theorems
\def\ll@theorem{%
\protect\numberline{\csname the\thmt@envname\endcsname}%
\ifx\@empty\thmt@shortoptarg
\thmt@thmname
\else
\protect\makefirstuc{\thmt@shortoptarg}%
\fi}
\def\l@thmt@theorem{}
%
\let\ll@proposition=\ll@theorem
\let\ll@corollary=\ll@theorem
\let\ll@lemma=\ll@theorem
\RequirePackage{aliascnt}
\RequirePackage[nameinlink,noabbrev,capitalize]{cleveref}
% Fix missing Oxford comma:
\newcommand{\creflastconjunction}{, and\nobreakspace}
\RequirePackage{crossreftools}
% Fix to crossreftools
% https://tex.stackexchange.com/a/512175/13492
\renewcommand{\@@crtextr@ct@ref}[2]{%
\expandafter\@@@crtextr@ct@ref\expandafter{\detokenize{#2}}{#1}%
}
\newcommand{\@@@crtextr@ct@ref}[2]{%
\expandafter\ifx\csname r@#1\endcsname\relax
\crt@refundefined%
\else
\expandafter\expandafter\csname crt@ref@splitter@#2\endcsname\csname r@#1\endcsname%
\fi
}
\crtlistoflabelsstructurelevel{chapter}
% cref names and formats:
\newcommand{\crefrangeconjunction}{--}
\crefname{page}{page}{pages}
\Crefname{Page}{Page}{Pages}
\crefname{theorem}{Theorem}{Theorems}
\Crefname{theorem}{Theorem}{Theorems}
\crefname{namedtheorem}{Theorem}{Theorems}
\Crefname{namedtheorem}{Theorem}{Theorems}
\crefname{namedproposition}{Proposition}{Propositions}
\Crefname{namedproposition}{Proposition}{Propositions}
\crefname{namedlemma}{Lemma}{Lemmas}
\Crefname{namedlemma}{Lemma}{Lemmas}
\crefname{proposition}{Proposition}{Propositions}
\Crefname{proposition}{Proposition}{Propositions}
\crefname{corollary}{Corollary}{Corollaries}
\Crefname{corollary}{Corollary}{Corollaries}
\crefname{namedcorollary}{Corollary}{Corollaries}
\Crefname{namedcorollary}{Corollary}{Corollaries}
\crefname{axiom}{Axiom}{Axioms}
\Crefname{axiom}{Axiom}{Axioms}
% need namedaxiom??
\crefname{convention}{Convention}{Conventions}
\Crefname{convention}{Convention}{Conventins}
\crefname{figure}{Figure}{Figures}
\Crefname{figure}{Figure}{Figures}
\crefname{table}{Table}{Tables}
\Crefname{table}{Table}{Tables}
\crefname{example}{Example}{Examples}
\Crefname{example}{Example}{Examples}
\crefname{continuedexample}{Example}{Examples}
\Crefname{continuedexample}{Example}{Examples}
\crefname{examples}{Examples}{Examples}
\Crefname{examples}{Examples}{Examples}
\crefname{examples}{Examples}{Examples}
\Crefname{examples}{Examples}{Examples}
\crefname{exampleaux}{Example}{Examples} % since example is envir not thm type
\Crefname{exampleaux}{Example}{Examples}
\crefname{application}{Application}{Applications}
\Crefname{application}{Application}{Applications}
\crefname{standingassumption}{Standing Assumption}{Standing Assumptions}
\Crefname{standingassumption}{Standing Assumption}{Standing Assumptions}
\crefformat{pfstepsi}{#2Step~#1#3}
\crefname{equation}{equation}{equations}
\Crefname{equation}{Equation}{Equations}
\crefname{problemsenumi}{Exercise}{Exercises}
\crefformat{problemsenumi}{#2Exercise~#1#3}
\Crefformat{problemsenumi}{#2Exercise~#1#3}
\crefformat{problempartsenumi}{#2#1#3}
\Crefformat{problempartsenumi}{#2#1#3}
\crefformat{problemscontent}{#2\textnormal{#3}}
\Crefformat{problemscontent}{#2\textnormal{#3}}
\crefname{topic}{}{}
\Crefname{topic}{}{}
\crefname{subtopic}{}{}
\Crefname{subtopic}{}{}
\crefformat{subtopic}{#2``#1''#3} % for my unnumbered subtopics
\Crefformat{subtopic}{#2``#1''#3} % ditto, capitalized
\crefname{enumi}{}{} % do not use ``Item''
\crefname{enumii}{}{}
\crefname{penumi}{}{} % do not use ``Item''
\crefname{penumii}{}{}
\crefformat{penumi}{(#2#1#3)}
\Crefformat{penumi}{(#2#1#3)}
\crefformat{penumi}{\textup{(#2#1#3)}}
\crefrangeformat{penumi}{\textup{(#3#1#4)}--\textup{(#5#2#6)}}
\crefformat{penumprimei}{(#2#1#3)}
\Crefformat{penumprimei}{(#2#1#3)}
\crefname{romenumi}{}{}
\Crefname{romenumi}{}{}
\crefname{pexenumi}{Example}{Examples}
\crefformat{pexenumi}{\textup{(#2#1#3)}}
\crefrangeformat{pexenumi}{\textup{(#3#1#4)}--\textup{(#5#2#6)}}
\crefname{proplis}{}{}
\Crefname{proplis}{}{}
\crefformat{proplisi}{#2#1#3}
\crefrangeformat{proplisi}{\textup{#3#1#4}--\textup{#5#2#6}}
\crefname{numcasesi}{Case}{Cases}
\Crefname{numcasesi}{Case}{Cases}
\crefname{romcasesi}{Case}{Cases}
\Crefname{romcasesi}{Case}{Cases}
\crefname{alphcasesi}{Case}{Cases}
\Crefname{alphcasesi}{Case}{Cases}
\crefname{chapter}{Chapter}{Chapters}
\crefname{section}{Section}{Sections}
\crefname{pdefenumi}{Definition}{Definitions}
\crefformat{pdefenumi}{\textup{(#2#1#3)}}
\crefname{subsec}{subsection}{subsections}
\Crefname{subsec}{Subsection}{Subsections}
\crefformat{subsec}{#2subsection~``#1''#3} % for my unnumbered subsections
\Crefformat{subsec}{#2Subsection~``#1''#3} % ditto, capitalized
\crefmultiformat{subsec}{subsections~``#2#1#3''}{ and~``#2#1#3''}{,~``#2#1#3''}{ and~``#2#1#3''}
% Special handling of cref's...
\newcommand\crefthmpart[2]{\cref{#1}~\cref{#2}}
\newcommand\crefdef[2]{\namecref{#2}~\labelcref{#1}~\cref{#2}}
\newcommand\crefex[2]{\namecref{#2}~\labelcref{#1}~\cref{#2}}
\newcommand\Crefex[2]{\nameCref{#2}~\labelcref{#1}~\cref{#2}}
\newcommand\crefexone[1]{Example~\cref{#1}}
\newcommand\refex[2]{\namecref{#2}~\labelcref{#1}~\cref{#2}}
\newcommand\crefrangeex[3]{\cref{#1}~\crefrange{#2}{#3}}
\newcommand\Crefrangeex[3]{\Cref{#1}~\crefrange{#2}{#3}}
% special handling of problems environment
\newcommand\crefprob[2]{\cref{#1}~\ref{#2}}
\newcommand\crefrangeprob[2]{Exercises~\textup{\ref{#1}}--\textup{\ref{#2}}}
\WithSuffix\newcommand\crefrangeprob*[2]{\textup{\ref{#1}}--\textup{\ref{#2}}}
\newcommand\crefrangeprobpart[2]{\textup{\ref{#1}}--\textup{\ref{#2}}}
\newcommand\crefprobandrangeprobpart[3]{\cref{#1}~\textup{\ref{#2}}--\textup{\ref{#3}}}
% Allow names in cross-reference to named theorem
\newcommand{\crefthm}[1]{%
\IfStrEqCase*{\crtcrefcounter{#1}}{%
{namedtheorem}{\crefthmname{#1}~(\ref{#1})}%
{namedtproposition}{\crefthmname{#1}~(\ref{#1})}%
{namedlemma}{\crefthmname{#1}~(\ref{#1})}%
{namedaxiom}{\crefthmname{#1}~(\ref{#1})}%
}%
[\crefthmname{#1}~(\cref{#1})]%
}
\WithSuffix\newcommand\crefthm*[1]{%
\IfStrEqCase*{\crtcrefcounter{#1}}{%
{namedtheorem}{\crefthmname*{#1}~(\ref{#1})}%
{namedproposition}{\crefthmname*{#1}~(\ref{#1})}%
{namedlemma}{\crefthmname*{#1}~(\ref{#1})}%
{namedaxiom}{\crefthmname*{#1}~(\ref{#1})}%
}%
[\crefthmname*{#1}~(\cref{#1})]%
}
%
% For upper-casing, i.e., leave names as is:
\newcommand{\crefthmname}[1]{\hyperlink{\crtrefanchor{#1}}{\crtrefname{#1}}}
\WithSuffix\newcommand\crefthmname*[1]{\crtrefname{#1}}
\newcommand{\Crefthmname}[1]{\hyperlink{\crtrefanchor{#1}}{\crtrefname{#1}}}
\WithSuffix\newcommand\Crefthmname*[1]{\crtrefname{#1}}
\newcommand\crefthmnamed[2]{\crefthm{#1}~\cref{#2}}
\WithSuffix\newcommand\crefthmnamed*[2]{\crefthm*{#1}~\cref{#2}}
% Allow names in cross-reference to chapters, sections, subsections
\newcommand*{\crefunit}[1]{\cref{#1} (\nameref*{#1})}
\WithSuffix\newcommand\crefunit*[1]{\cref*{#1} (\nameref*{#1})}
\newcommand*{\crefunitname}[1]{\hyperref[{#1}]{\nameref{#1}}}
\WithSuffix\newcommand\crefunitname*[1]{\nameref*{#1}}
% Need special ref command for subsecs since they're not numbered
\newcommand*{\crefsubsec}[1]{\cref{#1} (\cpageref{#1})}
\newcommand*{\Crefsubsec}[1]{\Cref{#1} (\cpageref{#1})}
\WithSuffix\newcommand\crefsubsec*[1]{\cref*{#1} (\cpageref{#1})}
\WithSuffix\newcommand\Crefsubsec*[1]{\Cref*{#1} (\cpageref{#1})}
% From https://tex.stackexchange.com/questions/1230/reference-name-of-description-list-item-in-latex
\def\namedlabel#1#2{\begingroup
#2%
\def\@currentlabel{#2}%
\phantomsection\label{#1}\endgroup
}
%% END CROSS-REFERENCING
%% SHORT & LONG TOCs
% daleif - https://tex.stackexchange.com/a/512752/13492
\newif\ifSHORT
\newif\ifLONG
%
% credit for Ulrike Fischer for this idea, we need to have the
% conditionals defined **inside** the toc
\DeclareRobustCommand\activateif{%
\let\showShort\ifSHORT
\let\showLong\ifLONG
\let\stopShort\fi
\let\stopLong\fi
}
% next use patching to add a wrapper around the \addcontentsline
% that \tableofcontents generates. Since this is inside a group we
% don't having one patch messing up the other
\newcommand\shortTOC[1][2]{
\begingroup
\setcounter{tocdepth}{#1}
\def\contentsname{\shorttocname}%
\ifthenelse{\boolean{colorsecs}}%
{\renewcommand{\cftchapterfont}{\color{mychapcolor}\bfseries\sffamily}}%
{\renewcommand{\cftchapterfont}{\bfseries\sffamily}}%
\xpatchcmd{\mem@tableofcontents}%
{\addcontentsline{toc}{chapter}{\contentsname}}{%
\addtocontents{toc}{\protect\showShort}%
\addcontentsline{toc}{chapter}{\contentsname}
\addtocontents{toc}{\protect\stopShort}%
}{\typeout{ok}}{\typeout{failed}}
\LONGtrue
\tableofcontents
\endgroup
}
\newcommand\longTOC[1][3]{
\begingroup
\setcounter{tocdepth}{#1}
\def\contentsname{\longtocname}%
\ifthenelse{\boolean{colorsecs}}%
{\renewcommand{\cftchapterfont}{\color{mychapcolor}\bfseries\sffamily}%
\renewcommand{\cftsectionfont}{\color{myseccolor}\bfseries\sffamily}%
}%
{\renewcommand{\cftchapterfont}{\bfseries\sffamily}%
\renewcommand{\cftsectionfont}{\bfseries\sffamily}%
}
\xpatchcmd{\mem@tableofcontents}%
{%
\addcontentsline{toc}{chapter}{\contentsname}}{%
\addtocontents{toc}{\protect\showLong}%
\addcontentsline{toc}{chapter}{\contentsname}
\addtocontents{toc}{\protect\stopLong}%
}%
{\typeout{ok}}{\typeout{failed}}
\SHORTtrue
\tableofcontents
\endgroup
}
% automatically add the activation to the toc
\AtBeginDocument{
\addtocontents{toc}{\activateif}
}
%% ADD TO USE CHRISTIAN HUPFER'S THIRD METHOD FOR \secref
\providecommand{\LastRefSteppedCounter}{}
\endinput
不幸的是,似乎没有办法绕过这个问题:如果我遇到错误时进入批处理模式,那么日志会显示此错误的几个实例......
I'm going to ignore the # sign you just used.
./topology.tex:99: You already have nine parameters.
<argument> ...M@sect ####1####2####3####4####5####
6[####7][####8]####9{\setc...
l.99 \begin{document}
I'm going to ignore the # sign you just used.
然后继续处理一些前言(标题页、序言),在这里我得到了以前没有错误的源的新错误!):
(./front/preface.tex [10.10
]
Runaway argument?
\@bsphack \edef \@tempa {{page}{\the \c@page }}\setcounter {page}{1}\edef \ETC.
./front/preface.tex:8: Paragraph ended before \cref@old@label was complete.
<to be read again>
\par
l.8
然后进入主要内容,我现在从之前没有错误编译的源文件中得到许多级联错误。
我很乐意根据要求提供完整的序言文件以及文档正文源的缩写版本