1

i've used

\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]

\theoremstyle{definition}
\begin{definition}(Definition.){
Eine Definition ist die Bestimmung eines Begriffs}
\end{definition}

and that shows me Definition 2.1 instead of Definition 2

What's the cause for that?

Tried to clear the pages before that didn't help

1
  • Why are you expecting that the number would be 2? By the way, the braces around the body of the definition should be removed.
    – egreg
    Commented Nov 12, 2019 at 22:06

2 Answers 2

1

That is the usual behavior. The first number reflects the section number, in this case. The second number counts the occurrence of a definition within a section.

This means that the first definition in the second section would be: Definition 2.1.

The third definition in section 4 would be: Definition 4.3.

What you want to get, if I understood you correctly, you get by

  • removing the square bracket in \newtheorem{definition}{Definition}[section]
  • and resetting the counter before each definition: \setcounter{definition}{0}

Your code would look like this for the definition in section 2:

\newtheorem{definition}{Definition}

\setcounter{definition}{1} % sets counter to one, next definition starts with 2

\begin{definition}(Definition.){
Eine Definition ist die Bestimmung eines Begriffs}
\end{definition}

Note, however, that if you have more than two definitions in a section, you will get trouble with this numbering.

1

Just redefine the representation of the counter associated to the environment.

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{definition}
\newtheorem{definition}{Definition}
\renewcommand{\thedefinition}{\thesection}

\begin{document}

\section{First}

\begin{definition}
This is the definition in the first section
\end{definition}

\section{Second}

\begin{definition}
This is the definition in the second section
\end{definition}

\end{document}

enter image description here

Omitting the definition in section 1, leads to

enter image description here

You should be aware of the fact that all definitions in section 2 will be “Definition 2”.

Also avoid bracing the environment's body: it's wrong and, in your case, leads to unwanted spaces.

If you want definitions numbered independently of sections:

\documentclass{article}
\usepackage{amsthm}

\theoremstyle{definition}
\newtheorem{definition}{Definition}

\begin{document}

\begin{definition}
This is the first definition
\end{definition}

\begin{definition}
This is the second definition
\end{definition}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .