Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. documentclass{report}
  2. numberwithin{equation}{section}
  3. begin{document}
  4.  
  5. chapter{First}
  6. begin{equation}
  7. x^2 + y^2 = z^2
  8. end{equation}
  9. begin{equation}
  10. x^3 + y^3 neq z^3
  11. end{equation}
  12.  
  13. section{Next}
  14. begin{equation}
  15. a^2 + b^2 = c^2
  16. end{equation}
  17. begin{equation}
  18. sqrt{-1} = - sqrt{-1}
  19. end{equation}
  20.  
  21. end{document}
  22.  
  23. documentclass{report}
  24. usepackage{amsmath}
  25.  
  26. renewcommand*{theequation}{%
  27. ifnumvalue{section}=0 %
  28. thechapter
  29. else
  30. thesection
  31. fi
  32. .arabic{equation}%
  33. }
  34. begin{document}
  35.  
  36. chapter{First}
  37. begin{equation}
  38. x^2 + y^2 = z^2
  39. end{equation}
  40. begin{equation}
  41. x^3 + y^3 neq z^3
  42. end{equation}
  43.  
  44. section{Next}
  45. begin{equation}
  46. a^2 + b^2 = c^2
  47. end{equation}
  48. begin{equation}
  49. sqrt{-1} = - sqrt{-1}
  50. end{equation}
  51.  
  52. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement