Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{report}
- numberwithin{equation}{section}
- begin{document}
- chapter{First}
- begin{equation}
- x^2 + y^2 = z^2
- end{equation}
- begin{equation}
- x^3 + y^3 neq z^3
- end{equation}
- section{Next}
- begin{equation}
- a^2 + b^2 = c^2
- end{equation}
- begin{equation}
- sqrt{-1} = - sqrt{-1}
- end{equation}
- end{document}
- documentclass{report}
- usepackage{amsmath}
- renewcommand*{theequation}{%
- ifnumvalue{section}=0 %
- thechapter
- else
- thesection
- fi
- .arabic{equation}%
- }
- begin{document}
- chapter{First}
- begin{equation}
- x^2 + y^2 = z^2
- end{equation}
- begin{equation}
- x^3 + y^3 neq z^3
- end{equation}
- section{Next}
- begin{equation}
- a^2 + b^2 = c^2
- end{equation}
- begin{equation}
- sqrt{-1} = - sqrt{-1}
- end{equation}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement