
セクションとサブセクションの新しい番号付けシステムを以下のように定義しました。
\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}