Latex 部分从 0.1 开始而不是 1.1

Latex section starting from 0.1 not 1.1

我正在使用文档 class 作为 latex 中的报告,我不想使用文章。现在的问题是,当我在文档中使用部分时,它以 0.0 0.1 0.2 等开头,而不是我希望它作为 1.0 摘要 1.1 介绍等,小节应该是 1.0.0 1.0.1 等,同样应该反映到 table 的内容。 任何人都请帮我这个。谢谢

如果您不使用任何 \chapter,则没有必要使用 report(或 book)。不过,这是一种方法:

\documentclass{report}

% Subtract 1 from counters that are used
\renewcommand{\thesection}{\thechapter.\number\numexpr\value{section}-1\relax}
\renewcommand{\thesubsection}{\thesection.\number\numexpr\value{subsection}-1\relax}
\renewcommand{\thesubsubsection}{\thesubsection.\number\numexpr\value{subsubsection}-1\relax}
\setcounter{secnumdepth}{3}

\setcounter{chapter}{1}% Not using chapters, but they're used in the counters
\begin{document}

\tableofcontents

\section{First section}
\subsection{First subsection}
\subsubsection{First subsubsection}
\subsubsection{Second subsubsection}
\subsection{Second subsection}

\section{Second section}
\subsection{First subsection}
\subsubsection{First subsubsection}

\end{document}