アップデート1:

アップデート1:

ドキュメント内に 2 つの新しいセクション コマンドを作成しようとしていますscrartcl。2 つ目のコマンドは最初のコマンドに基づいています。

MWE は次のとおりです。

\documentclass{scrartcl}
\DeclareNewSectionCommand[
    afterskip=1.5ex plus .2ex,
    beforeskip=-3.25ex plus -1ex minus -.2ex,
    indent=0pt,
    level=2,
    font=\usekomafont{subsection},
    tocindent=1.5em,
    tocnumwidth=2.3em,
    counterwithin=section,
    style=section]{subphase}

\DeclareNewSectionCommand[
    afterskip=1.5ex plus .2ex,
    beforeskip=-3.25ex plus -1ex minus -.2ex,
    indent=0pt,
    level=3,
    font=\usekomafont{subsection},
    tocindent=2.0em,
    tocnumwidth=2.3em,
    counterwithin=subphase,
    style=section]{task}

\begin{document}
 \section{A}
 \subphase{Phase}
 \task{Task}
 \task{Task}
 \task{Task}
 \subphase{Phase}
 \task{Task}
 \task{Task}
 \task{Task}
\end{document}

これを使用するとlualatex、次のエラー メッセージが表示されます。

! TeX capacity exceeded, sorry [input stack size=5000].
\thesubphase ...sname the\scr@local@counterwithin 
                                                  \endcsname .\arabic {subph...
l.26  \subphase{Phase}

それで、問題はどこにあるのでしょうか?

私は KOMA-Script を初めて使用するので、これは完全な初心者のミスかもしれません。

アップデート1:

TeXlive のインストールが古かった可能性があります。今すぐ 2017 バージョンをインストールして、問題が解決するかどうかを確認してください。

アップデート2:

新しいバージョンの TeXlive をインストールすると、問題は解決しました。確かに、KOMA スクリプトのバージョンが古かったようです。

答え1

新しい TeXlive バージョン (20170524) を手動でインストールすると、問題は解決しました (元のバージョンは Ubuntu 16.04 APT リポジトリの 2015 でした)。確かに、KOMA スクリプトのバージョンが古かったようです。

関連情報