TeX - LaTeX Asked on June 11, 2021
I encountered this behavior from LaTex: last definition from section 2.1 was labeled (correctly) as 2.1.8. Then, the first definition of the next section was 2.2.9. I would like it to be 2.2.1 (don’t know the standards but that makes much more sense to me). I found this question which is kinda relevant but works with theorems and not definitions.
The only commands(I think) that modify somehow the definitions are:
newtheorem{definition}{MyDef}
renewcommand{thedefinition}{arabic{chapter}.arabic{section}.arabic{definition}}
So, how do I change it? Thanks in advance.
Using newtheorem{definition}{Definition}[section]
should result in the expected output:
documentclass{report}
newtheorem{definition}{Definition}[section]
begin{document}
chapter{chapter}
section{first section}
begin{definition}
first definition in first section
end{definition}
begin{definition}
second definition in first section
end{definition}
section{second section}
begin{definition}
first definition in second section
end{definition}
end{document}
Correct answer by leandriis on June 11, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP