删除部分编号乳胶

时间:2016-07-10 13:50:44

标签: latex sections

我在乳胶中的章节编号有问题。我想从标题和内容中删除部分编号,但我希望数字存在于lemmas,定理等等。我希望它看起来像:

Cordova CLI: Not installed
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.9.0
Xcode version: Xcode 7.3.1 Build version 7D1014 

我该怎么办?我试过了

 Section Whatever
   Some unimportant text.

 Section Whatever else
   Another unimportant text.
   Lemma 2.1
   Theorem 2.2 

 Section Whatever again
   Theorem 3.1

但它甚至从引理和定理中删除了数字。非常感谢你:)

1 个答案:

答案 0 :(得分:10)

在默认的article类下,我们只需添加

即可删除应用于分区计数器的格式
\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother

到序言。这将删除所有部分标题编号(\section s,\subsection s,\subsubsection s,...),但将它们保留在引用的位置或每当使用\thesection

enter image description here

\documentclass{article}

\newtheorem{theorem}{Theorem}[section]% Theorems numbered by section
\newtheorem{lemma}[theorem]{Lemma}% Lemma uses theorem's counter

\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother

\begin{document}

\section{Section whatever}
Some uninportant text.

\section{Section whatever else}
Another uninportant text.

\begin{lemma}
Some lemma.
\end{lemma}

\begin{theorem}
Some theorem.
\end{theorem}

\section{Section whatever again}
\begin{theorem}
Another theorem.
\end{theorem}

\end{document}