新しいサブセクションの定義が機能しない

新しいサブセクションの定義が機能しない

セクションとサブセクションの新しい番号付けシステムを以下のように定義しました。

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}

次に以下を追加してみます:

\renewcommand*\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}

これは機能しません。他のものとまったく同じなのに、なぜ機能しないのか理解できません。

ご協力いただければ幸いです。

答え1

回答ではありませんが、MWE を提供するだけです。

\documentclass{article}

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}
\renewcommand*\thesubsubsection{%
  \arabic{section}.\arabic{subsection}.\arabic{subsubsection}%
}

\begin{document}
\tableofcontents
\section{Section A}
\section{Section B}
\subsection{Subsection A}
\subsection{Subsection B}
\subsubsection{Subsubsection A}
\subsubsection{Subsubsection B}
\end{document}

ムウェ

私が見つけた唯一の問題は、 が追加されたために、目次のセクション番号とセクションタイトルの間の距離が狭くなっていることです.0

改良コメントによると、counter のデフォルトsecnumdepthは 2 のようですが、クラスはおそらくarticleまたはreportまたはbook類似のものではありません。

新しい例:

\documentclass{report}

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}
\renewcommand*\thesubsubsection{%
  \arabic{section}.\arabic{subsection}.\arabic{subsubsection}%
}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\begin{document}
\tableofcontents
\chapter{Chapter X}
\section{Section A}
\section{Section B}
\subsection{Subsection A}
\subsection{Subsection B}
\subsubsection{Subsubsection A}
\subsubsection{Subsubsection B}
\end{document}

MWE2

関連情報