\subparagraph 与 llncs

\subparagraph 与 llncs

我无法让 \subparagaph 在我的文件中正常工作

\documentclass[runningheads]{llncs}


\usepackage{hyperref}
\renewcommand\UrlFont{\color{blue}\rmfamily}
\usepackage{thm-restate}
\usepackage{amsmath,amssymb}
\usepackage{comment}

\usepackage[algosection,ruled,lined,linesnumbered,longend]{algorithm2e}


%\usepackage{enumerate}
\newcommand{\mypara}[1]{\noindent{\bfseries #1.}}


\newcommand{\0}{\mathbb{0}} 
\newcommand{\1}{\mathbb{1}} 
\newcommand{\C}{\ensuremath{\mathcal{C}}}
\newcommand{\simp}{sim}

\newcommand{\ECT}{\ensuremath{\textsc{ECT}}}
 
 
\begin{document}
asdfasdf 
\subparagraph{adsfasfdsafdafdsfdasfdsf}



\end{document}

其中 llncs 是 Springer LNCS 格式文件https://www.overleaf.com/3138125197nxqpxwfdbfyb 我现在找不到官方链接

答案1

\subparagraph被类明确禁用但用于禁用它的代码中存在一个错误。

目的是让你收到警告

LLNCS warning: You should not use \subparagraph with this class

但会发生的情况是,您会陷入循环,并且会重复发出警告,直到内存耗尽为止。

LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
LLNCS warning: You should not use \subparagraph with this class
! TeX capacity exceeded, sorry [grouping levels=255].

llncs.cls文件有

\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use
                  \string\subparagraph\space with this class}\vskip0.5cm
You should not use \verb|\subparagraph| with this class.\vskip0.5cm}

您不能\verb在命令的参数中使用,因此这里\verb不会停止\subparagraph调用自身,因此您会得到一个循环。它应该是

\renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use
                  \string\subparagraph\space with this class}\vskip0.5cm
You should not use \texttt{\string\subparagraph} with this class.\vskip0.5cm}

您可能不需要它,\subparagraph仅应将其用于在、、、之后制作第 6 级标题\chapter,并且很少有文档需要那么多节级别。\section\subsection\subsubsection\paragraph

相关内容