Latex 删除节号

Latex 删除节号,latex,sections,Latex,Sections,我对latex中的节编号有问题。我想从标题和内容中删除章节编号,但我希望引理、定理等的编号在那里。我希望它看起来像: Section Whatever Some unimportant text. Section Whatever else Another unimportant text. Lemma 2.1 Theorem 2.2 Section Whatever again Theorem 3.1 我怎么做?我试过了 \renewcommand

我对latex中的节编号有问题。我想从标题和内容中删除章节编号,但我希望引理、定理等的编号在那里。我希望它看起来像:

 Section Whatever
   Some unimportant text.

 Section Whatever else
   Another unimportant text.
   Lemma 2.1
   Theorem 2.2 

 Section Whatever again
   Theorem 3.1
我怎么做?我试过了

 \renewcommand\thesection{}

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

在默认的
文章
类下,我们只需通过添加

\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother
对序言的补充。这将删除所有章节标题编号(
\section
s、
\subsection
s、
\subsection
s……),但将其保留在参考位置或使用章节时


Hello:)该命令删除了标题中的数字,但它们仍在目录中。我怎样才能解决这个问题?@Katarina:你可以在序言中添加
\renewcommand{\numberline}[1]{}
,这将删除目录中的所有章节编号。
\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}