Chinaunix首页 | 论坛 | 博客
  • 博客访问: 258635
  • 博文数量: 41
  • 博客积分: 2013
  • 博客等级: 大尉
  • 技术积分: 523
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-08 23:13
文章分类

全部博文(41)

文章存档

2010年(41)

我的朋友

分类: LINUX

2010-01-23 14:37:44

\usepackage{amsthm}%%提供\newtheorem等定义定理环境的命令
%% "theorem"表示内部关键字,这样就可以使用\begin{theorem}...\end{theorem}了
%% "定理"表示显示在文件里的文字
%% "[section]"这是一个可选选项,表示按章节号排序,加了这个选项,就会显示类似于"定理1.2.3"字样
\theremstyle{plain} \newtheorem{theorem}{定理}[section]

这样定义之后,就可以使用定理环境了.如

\documentclass{article}

\usepackage{amsthm}
\usepackage{CJK}
\begin{document}
\begin{CJK*}{UTF8}{song} %%windows下一般是{GBK}{song}
\theoremstyle{plain} \newtheorem{theorem}{定理}[section]
\begin{theorem}[勾股定理]勾股定理表示如下:\\
$a^2+b^2=c^2$
\end{theorem}
\end{CJK*}
\end{document}


其中"[勾股定理]"为定理名,为可选选项,将在定理标记后产生一个用括号括起来的定理名.

需要注意的是\begin{theorem}后需要有一段文字,然后才可以用\\换行,如果什么也没直接换行,会报错:There is no line to end

另外,定理后如果没有文字,而直接用\begin{enumerate},则第一行也不会自动换行,而手动加上 \\则会报同样的错误,则时候可以加一个不显示的符号即可,如

\documentclass{article}

\usepackage{amsthm}
\usepackage{CJK}
\begin{document}
\begin{CJK*}{UTF8}{song} %%windows下一般是{GBK}{song}
\theoremstyle{plain} \newtheorem{theorem}{定理}[section]
\begin{theorem}$\ $ %%something needed here
\begin{enumerate}
\item 第一项
\item 第二项
\end{enumerate}
\end{theorem}
\end{CJK*}
\end{document}
阅读(18131) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~