
所以我目前正在寫我的數學論文。
假設我在論文的「第5 節」中,並且正在按5.1、5.2、5.3 等排序引理、命題、定理和推論。新的5.2,舊的 5.2 將更改為 5.3,5.3 將更改為 5.4,...等等?
謝謝你的幫助
答案1
希望你已經發現這個問題在 LaTeX 中很容易解決(實際上,它本質上就是這樣)設計的for),但這裡有一個明確構造供您查看。
嘗試編譯此文檔,無論其中是否包含引理。 (根據您編寫文件的方式,您可能必須連續運行 LaTeX 兩次才能在每次刪除引理時進行交叉引用解析。許多現代編輯器會自動執行此操作。)
\documentclass{article}
\usepackage{amsthm,amssymb}
\newtheorem{theorem}{Theorem}[section]
% Theorem numbering is Sec#.Thm#
\newtheorem{lemma}[theorem]{Lemma}
% Lemmata are numbered as theorems
\begin{document}
\section{A section with some politically motivated math in it}
The following Lemma is folklore among Business Administration circles of
the \emph{Paradigmatic Shift} school:
\begin{lemma}[Synergy Lemma]
\label{lemma:synergy}
Under the right circumstances, $1 + 1 = 3$.
\end{lemma}
\begin{proof} By adoption of a positive workplace culture. \end{proof}
\noindent
The Synergy Lemma proves quite useful to show the following celbrated result:
\begin{theorem}
\label{thm:2+2=5}
When it suits us, $2 + 2 = 5$.
\end{theorem}
\begin{proof} Exercise for the reader; use good stomping boots. \end{proof}
\noindent
Theorem~\ref{thm:2+2=5} is commonly known as \emph{Orwell's Theorem},
though it is often (and more accurately) called \emph{Vissarionovich's Theorem}
in many eastern European countries.
\end{document}