Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Theorem numbering in LaTeX

Tags:

latex

I have a problem with theorem numbering in LaTeX. I can make it number by subsection, e.g

Theorem 1.2.1

for the first theorem in the second subsection of the first section. But I need it to show me only the numbers of the subsection and the theorem, but not the section number, like this:

Theorem 2.1

I use

\newtheorem{thm}{Theorem}[subsection]

for the numbering.

like image 843
jbradaric Avatar asked Jun 16 '09 21:06

jbradaric


1 Answers

Putting the following code in the preamble seems to have the desired effect:

\usepackage{amsthm}
\newtheorem{thm}{Theorem}[subsection]
\renewcommand{\thethm}{\arabic{subsection}.\arabic{thm}}

I don't understand why you want this particular theorem numbering system, but the code does what you want: LaTeX output

like image 148
las3rjock Avatar answered Nov 15 '22 12:11

las3rjock