
아래와 같이 섹션과 하위 섹션에 대한 새로운 번호 매기기 시스템을 정의했습니다.
\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
.
정제. 의견에 따르면 카운터의 기본값 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}