Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I number theorems, definitions etc. etc. consecutively in latex without starting an own line for each?

Tags:

latex

tex

Because I'm not a native speaker and I'm sure so far noone understood it I will try to explain it in simple words... I'm writing a thesis for my bachelor so it's just around 30 pages... Now I made a definition for some commands like this:

\newtheorem{theo}{Theorem}[chapter]

\newtheorem{lema}{Lemma}[chapter]

\theoremstyle{definition}
\newtheorem{defin}{Definition}[chapter]

\theoremstyle{plain}
\newtheorem{cor}{Corollar}[chapter]

This works great; However e.g. if I'm in chapter 2 and use commands like this:

\cor
\cor
\defin
\lema

it counts like this:

Corollar 2.1 
Corollar 2.2
Definition 2.1
Lemma 2.1

However it doesn't make sense to start an own numbering for corollar, definiton, lemma etc. because the thesis is very short and for this reason it would be more confusing than helping; So I want it to be like this:

Corollar 2.1 
Corollar 2.2
Definition 2.3
Lemma 2.4

Any idea how to do that?

like image 265
J.Doe Avatar asked Dec 14 '15 18:12

J.Doe


1 Answers

As explained there you can try this :

\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theo}{Theorem}[chapter] % reset theorem numbering per chapter

\theoremstyle{definition}
\newtheorem{defin}[theo]{Definition} % definition numbers are dependent on theorem numbers
\newtheorem{lema}[theo]{Lemma} % same for  Lemmas
\newtheorem{cor}[theo]{Corollar}% same for Corollars
like image 175
Gerard Rozsavolgyi Avatar answered Nov 02 '22 18:11

Gerard Rozsavolgyi