Latex中定義、定理、引理、證明 設置方法總結
在LaTex中需要有關定理、公理、命題、引理、定義等時,常用如下命令
- \newtheorem{定理環境名}{標題}[主計數器名]
- \newtheorem{theorem}{Theorem}[Chapter]
意思就是定義一個以Theorem為標題的theorem環境,計數以章節數為主.
\begin{theorem}[均值不等式] 設$A,B$是兩個實數, 則$2AB\leq 2 A^2+B^2$. \end{theorem}
如果需要輸出中文,使用定義theorem如下
\newtheorem{theorem}{\hspace{2em}定理}[chaptet]
另外在{\hspace{2em}定理}中還可以輸入更改字體的命令來改變定理的字體
其他中文模式:
- \newtheorem{Definition}{\hspace{2em}定義}[chapter]
- \newtheorem{theorem}{\hspace{2em}定理}[chapter]
- \newtheorem{lemma}{\hspace{2em}引理}[chapter]
- \newtheorem{Proof}{證明}[chapter]
前面提到的定理、公理、命題、引理、定義的一套命令可以用這個
% Theorem style
- \newtheoremstyle{mystyle}{3pt}{3pt}{\kaishu}{0cm}{\heiti2 }{}{1em}{} \theoremstyle{mystyle}
- \newtheorem{definition}{\hspace{2em}定義}[chapter] %
- 沒有章, 只有節, 把上面的[chapter]改成[section]
文章中可以直接使用的范例:
\newtheorem{theorem}[definition]{\hspace{2em}定理}
\newtheorem{axiom}[definition]{\hspace{2em}公理}
\newtheorem{lemma}[definition]{\hspace{2em}引理}
\newtheorem{proposition}[definition]{\hspace{2em}命題}
\newtheorem{corollary}[definition]{\hspace{2em}推論}
\newtheorem{remark}{\hspace{2em}注}[chapter]
Latex-定理定義的排版
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}{Proposition}[section]
以上定理和命題分別計數,如果命題也用定理的計數器,可以這樣定義:
\newtheorem{prop}[thm]{Proposition}
引用:
\begin{thm}[附加標題,如定理名稱,作者] 文本 \end{thm} 較短的證明可以用 \begin{proof}[標題] 證明內容。 \end{proof}
如果有[標題]選項,則顯示這個標題(斜體),否則自動打印斜體的Proof,並在證明結束時自動生成證畢符號口。
如果使用\proof命令,則需要在結束時手動加上結束命令\qed。
當然你可以重定義證畢符號,例如:
\renewcommand*{\qedsymbol}{[證畢]} \begin{proof}[證:] 證明正文。 \end{proof}
注意: \begin{proof}...\end{proof}環境需要\usepackage{amsthm}宏包的支持