Guest User

Untitled

a guest
Jul 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. documentclass{article}
  2.  
  3. usepackage{amsthm}
  4. usepackage{chngcntr}
  5. counterwithin*{equation}{section}
  6. counterwithin*{equation}{subsection}
  7. theoremstyle{remark}
  8. newtheorem{problem}{Problem}
  9.  
  10. begin{document}
  11.  
  12.  
  13. section{One}
  14. begin{problem}
  15. begin{equation}
  16. f(x)=g(y)
  17. end{equation}
  18. begin{equation}
  19. h(x)=p(z)
  20. end{equation}
  21. end{problem}
  22.  
  23. begin{equation}
  24. h(x)=p(z)
  25. end{equation}
  26.  
  27. section{Two}
  28.  
  29.  
  30. begin{equation}
  31. int f(x)dx= int g(x)dx
  32. end{equation}
  33. begin{equation}
  34. v=frac{e}{t} end{equation}
  35. begin{problem}
  36. begin{equation}
  37. f(x)=g(y)
  38. end{equation}
  39. begin{equation}
  40. h(x)=p(z)
  41. end{equation}
  42. end{problem}
  43.  
  44. end{document}
  45.  
  46. newenvironment{problem}[2][Problem]{stepcounter{myproblemcnt}setcounter{myproblemcnt}{#2}begin{trivlist}
  47. item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}
  48.  
  49. makeatletter
  50. renewcommand{theequation}{arabic{myproblemcnt}.arabic{equation}}
  51. newcounter{myproblemcnt}
  52. @addtoreset{equation}{myproblemcnt}
  53. makeatother
Add Comment
Please, Sign In to add comment