资源描述
LaTeX中的定理环境
发表于 2010 年 12 月 15 日 由 路箩筐
在LaTex中需要有关定理、公理、命题、引理、定义等时,常用如下命令
\newtheorem{定理环境名}{标题}[主计数器名]
%例如
\newtheorem{theorem}{Theorem}[Chapter]
意思就是定义一个以Theorem为标题的theorem环境,计数以章节数为主.
\begin{theorem}[均值不等式] 设$A,B$是两个实数, 则$2AB\leq A^2+B^2$.
\end{theorem}
的输出为
表示为Chapter 5的第一个定理.
如果需要输出中文,使用定义theorem如下
\newtheorem{theorem}{\hspace{2em}定理}[chaptet]
同样的代码其输出为
另外在{\hspace{2em}定理}中还可以输入更改字体的命令来改变定理的字体.
前面提到的定理、公理、命题、引理、定义的一套命令可以用这个
% Theorem style
\newtheoremstyle{mystyle}{3pt}{3pt}{\kaishu}{0cm}{\heiti}{}{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]
%类似地定义其他“题头”. 这里“注”的编号与定义、定理等是分开的
其中\hspace{2em} 表示在定理的前面空2格.
展开阅读全文