0

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.

cgss
  • 301
  • A simple \newtheorem{definition}{Definition}[section] should work as expected and number youd definitions as follows: "chapter.section.definition" while the definition counter starts from 1 with every new section. – leandriis Oct 17 '20 at 11:51

1 Answers1

2

Using \newtheorem{definition}{Definition}[section] should result in the expected output:

enter image description here

\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}

leandriis
  • 62,593