Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{amsthm}
- usepackage{chngcntr}
- counterwithin*{equation}{section}
- counterwithin*{equation}{subsection}
- theoremstyle{remark}
- newtheorem{problem}{Problem}
- begin{document}
- section{One}
- begin{problem}
- begin{equation}
- f(x)=g(y)
- end{equation}
- begin{equation}
- h(x)=p(z)
- end{equation}
- end{problem}
- begin{equation}
- h(x)=p(z)
- end{equation}
- section{Two}
- begin{equation}
- int f(x)dx= int g(x)dx
- end{equation}
- begin{equation}
- v=frac{e}{t} end{equation}
- begin{problem}
- begin{equation}
- f(x)=g(y)
- end{equation}
- begin{equation}
- h(x)=p(z)
- end{equation}
- end{problem}
- end{document}
- newenvironment{problem}[2][Problem]{stepcounter{myproblemcnt}setcounter{myproblemcnt}{#2}begin{trivlist}
- item[hskip labelsep {bfseries #1}hskip labelsep {bfseries #2.}]}{end{trivlist}}
- makeatletter
- renewcommand{theequation}{arabic{myproblemcnt}.arabic{equation}}
- newcounter{myproblemcnt}
- @addtoreset{equation}{myproblemcnt}
- makeatother
Add Comment
Please, Sign In to add comment