删除部分编号乳胶

Kat*_*na 7 latex sections

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

 Section Whatever
   Some unimportant text.

 Section Whatever else
   Another unimportant text.
   Lemma 2.1
   Theorem 2.2 

 Section Whatever again
   Theorem 3.1
Run Code Online (Sandbox Code Playgroud)

我该怎么做?我试过了

 \renewcommand\thesection{}
Run Code Online (Sandbox Code Playgroud)

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

Wer*_*ner 13

在默认article类下,我们只需通过添加删除应用于节计数器的格式

\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother
Run Code Online (Sandbox Code Playgroud)

到序言.这将删除所有分段标题编号(\sections,\subsections,\subsubsections,...),但将它们保留在引用的位置或\thesection使用时.

在此输入图像描述

\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}
Run Code Online (Sandbox Code Playgroud)

  • @Katarina:您可以在您的序言中添加`\ renewcommand {\ numberline} [1] {}`,这将从目录中删除所有节编号。 (3认同)
  • 您好:)该命令从标题中删除了数字,但它们仍在目录中。我该如何解决? (2认同)