- equation numbers for in-line math
- equations numbers for regular math
- comments in the right margin
Is there any way I can do all three of these things together and make the document look professional? Let me know, thanks!
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass{article}\usepackage{amsmath}\newcounter{inlineequation}\setcounter{inlineequation}{0}\renewcommand{\theinlineequation}{(\Roman{inlineequation})}\newcommand{\inlineeq}[1]{\refstepcounter{inlineequation}\theinlineequation\ \(#1\)}\begin{document}Two of the most useful results are \inlineeq{x + y = y + z}\label{comm}, and \inlineeq{x+(y+z)=(x+y)+z}\label{assoc}. The equation \ref{comm} expresses the law of commutativity, and \ref{assoc} expresses the law of associativity. From them you can infer that $x+(y+z)=z+(x+y)$. Now let us consider:\marginpar{A Comment}\begin{equation}x \cdot (y \cdot z) = (x \cdot y) \cdot z\label{assocm}\end{equation}The result \eqref{assocm} is a lot like \ref{assoc}, except for multiplication.\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.