[英]Remove section numbers latex
我有乳膠切片編號的問題。 我想從標題和內容中刪除部分編號,但我希望數字存在於lemmas,定理等等。我希望它看起來像:
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{}
但它甚至從引理和定理中刪除了數字。 非常感謝你 :)
在默認的article
類下,我們只需通過添加刪除應用於節計數器的格式
\makeatletter
\renewcommand{\@seccntformat}[1]{}
\makeatother
到序言。 這將刪除所有分區標題編號( \\section
s, \\subsection
s, \\subsubsection
s,...),但將它們保留在引用的位置或使用\\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}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.