加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

LaTeX技巧74:公式编号与章节关联的标准方法

(2009-11-18 16:59:48)
标签:

latex

now

document

公式

编号

分类: 数学公式

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

公式编号如何入章节相关联,而又格式标准。很多人使用的方法是不很正确的。

正确方法是在导言区加入:

\makeatletter % `@' now normal "letter"
\@addtoreset{equation}{section}
\makeatother  %
`@' is restored as "non-letter"
\renewcommand\theequation{\oldstylenums{\thesection}%
                   .\oldstylenums{\arabic{equation}}}

演示代码:

\documentclass{article}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{135.0pt}
\makeatletter % `@' now normal "letter"
\@addtoreset{equation}{section}
\makeatother  % `@' is restored as "non-letter"
\renewcommand\theequation{\oldstylenums{\thesection}%
                   .\oldstylenums{\arabic{equation}}}
\begin{document}
\section{Equations\ldots}
\begin{equation} (a+b)^2 = a^2 + 2ab + b^2\end{equation}
\begin{equation} (a-b)^2 = a^2 - 2ab + b^2\end{equation}

\section{\ldots per section}
\begin{equation} (a+b)(a-b) = a^2 -  b^2  \end{equation}
\end{document}

效果图如下:

LaTeX技巧74:公式编号与章节关联的标准方法

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

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

新浪公司 版权所有