免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3137 | 回复: 0
打印 上一主题 下一主题

latex中的定理 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-23 14:37 |只看该作者 |倒序浏览
\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}

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/109940/showart_2158436.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP