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

标签:
latexnowdocument公式编号 |
分类: 数学公式 |
QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载
公式编号如何入章节相关联,而又格式标准。很多人使用的方法是不很正确的。
正确方法是在导言区加入:
\makeatletter % `@'
now normal "letter"
\@addtoreset{equation}{section}
\makeatother
\renewcommand\theequation{\oldstylenums{\thesection}%
演示代码:
\documentclass{article}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{135.0pt}
\makeatletter % `@' now normal
"letter"
\@addtoreset{equation}{section}
\makeatother
\renewcommand\theequation{\oldstylenums{\thesection}%
\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 -
\end{document}
效果图如下: