Latex 乳胶部分从0.1开始,而不是从1.1开始

Latex 乳胶部分从0.1开始,而不是从1.1开始,latex,Latex,我在latex中使用文档类作为报告,我不想使用文章。现在的问题是,当我在我的文档中使用节时,它以0.0 0.1 0.2等开头,而我希望它是1.0抽象1.1介绍等,小节应该是1.0.0 1.0.1等,同样应该反映到目录中。 任何人都可以帮我做这个。谢谢如果您不使用任何\chapter的话,就没有必要使用报告(或书籍)。但有一种方法可以做到: \documentclass{report} % Subtract 1 from counters that are used \renewcommand{

我在latex中使用文档类作为报告,我不想使用文章。现在的问题是,当我在我的文档中使用节时,它以0.0 0.1 0.2等开头,而我希望它是1.0抽象1.1介绍等,小节应该是1.0.0 1.0.1等,同样应该反映到目录中。
任何人都可以帮我做这个。谢谢

如果您不使用任何
\chapter
的话,就没有必要使用
报告
(或
书籍
)。但有一种方法可以做到:

\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}


非常感谢你,沃纳。。它起作用了:)可能是重复的