加载中…
个人资料
LaTeX_Fun
LaTeX_Fun
  • 博客等级:
  • 博客积分:0
  • 博客访问:6,869,583
  • 关注人气:2,401
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
谁看过这篇博文
加载中…
正文 字体大小:

LaTeX技巧562:如何定制漂亮精美的定理环境

(2011-07-31 21:10:29)
标签:

latex

tikz

定理

theorem

环境

分类: 数学公式

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

之前的博文中,曾经定制了一个较为简单的定理漂亮的盒子,LaTeX技巧327,下面摘自一个博客的定制相对好看一些,希望对大家的排版有所帮助。

Here is a little sty file for LaTeX that is inspired from this. The result :

boiboites

With this file, you can create new environments with \newboxedtheorem. It works kind of like \newtheorem except that you have to give it a counter name as a third argument. To be more precise :

\newboxedtheorem[options]{theo}{Theorem}{thCounter}

If you don't put anything in the last {}, your environment won't be numbered. If you want to make another environment numbered like this one, just put the same counter name, for example :

\newboxedtheorem{defi}{Definition}{thCounter}

There are a lot of options. For example, thcounter=section will have your environment's counter go back to 0 whenever you enter a new section in your document.

Here is the full list of the options with their default value :

titlecolor = black, titlebackground = white, background = white,
titleboxcolor = black, boxcolor = black, thcounter=, size = .9\textwidth

Finally, the code used for the example :

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{boiboites}

\newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground=blue!20,
titleboxcolor = black]{theo}{Theorem}{anything}

\begin{document}
  \begin{theo}[Law of Large Numbers]
     Let $(X_n)_{n\in \mathbb{N}}$ be an infinite sequence of i.i.d. variables with finite expected value. Then:
     $$\frac{1}{n} \sum_{i=1}^n X_i \overset{\textnormal{a.s.}}{\longrightarrow}
         \mathbb{E} (X_1) .$$
  \end{theo}
\end{document}

 

选自:http://snouffy.free.fr/blog-en/index.php/post/2010/01/30/Nice-boxes-for-your-theorems-with-tikz

0

阅读 评论 收藏 禁止转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有