发布时间:2010-12-26 13:40:15
文章类别:TeX字体
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770100nyyn.html

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

大家知道《计算机程序设计艺术》,LaTeX如何制作和这本书字体一样的样式呢?
下面我们给出一个样例,让你眼前一亮,让你的字体和Knuth的书一样哦,下图为书中的截图,我们制作一段类似的。

image

代码如下:

\documentclass{article}
\usepackage{type1cm}
\AtBeginDocument{%
\SetSymbolFont{operators} {normal}{OT1}{cmr} {m}{n}
\SetSymbolFont{letters} {normal}{OML}{cmm} {m}{it}
\SetSymbolFont{symbols} {normal}{OMS}{cmsy}{m}{n}
\SetSymbolFont{largesymbols}{normal}{OMX}{cmex}{m}{n}
\SetSymbolFont{operators} {bold} {OT1}{cmr} {bx}{n}
\SetSymbolFont{letters} {bold} {OML}{cmm} {b}{it}
\SetSymbolFont{symbols} {bold} {OMS}{cmsy}{b}{n}
\SetSymbolFont{largesymbols}{bold} {OMX}{cmex}{m}{n}

\SetMathAlphabet{\mathbf}{normal}{OT1}{cmr}{bx}{n}
\SetMathAlphabet{\mathsf}{normal}{OT1}{cmss}{m}{n}
\SetMathAlphabet{\mathit}{normal}{OT1}{cmr}{m}{it}
\SetMathAlphabet{\mathtt}{normal}{OT1}{cmtt}{m}{n}
\SetMathAlphabet{\mathbf}{bold} {OT1}{cmr}{bx}{n}
\SetMathAlphabet{\mathsf}{bold} {OT1}{cmss}{bx}{n}
\SetMathAlphabet{\mathit}{bold} {OT1}{cmr}{bx}{it}
\SetMathAlphabet{\mathtt}{bold} {OT1}{cmtt}{m}{n}
}
\begin{document}

in other words, x consists of some arbitrary (but infinite) binary string $\alpha$, followed by
a 0, which is followed by $a+1$ ones, and followed by $b$ zeros, for some $a\ge 0$ and $b\ge 0$.
(The exceptions occur when $x = -2^b$; then $a=\infty$.) Consequently
\begin{eqnarray}
\bar x &=& (\bar \alpha 1 0^a 0 1^b)_2,\\
x - 1 &=& (\alpha 0 1^a 0 1^b)_2,\\
- x &=& (\bar \alpha 1 0^a 0 1^b)_2;
\end{eqnarray}

\end{document}
效果图:

image

很给力!呵呵


点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部