【问题标题】:Latex section starting from 0.1 not 1.1乳胶部分从 0.1 开始而不是 1.1
【发布时间】:2015-02-02 04:37:39
【问题描述】:

我在乳胶中使用文档类作为报告,我不想使用文章。现在的问题是,当我在文档中使用部分时,它以 0.0 0.1 0.2 等开头,而不是我希望它为 1.0 Abstract 1.1 Introduction 等,小节应该是 1.0.0 1.0.1 等,并且应该反映到目录中。 任何人都请帮我解决这个问题。谢谢你

【问题讨论】:

标签: latex


【解决方案1】:

如果您不使用任何\chapters,则实际上不需要使用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}

【讨论】:

  • 非常感谢 Werner.. 它成功了 :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-11-04
  • 2014-12-03
  • 2013-09-26
  • 1970-01-01
  • 1970-01-01
  • 2010-10-21
相关资源
最近更新 更多