0

I'm coding in over leaf and using different new theorem styles. Here's my preamble.

\documentclass[8pt,letterpaper, oneside]{report}
\usepackage{amsmath, amssymb, amscd, amsthm, amsfonts}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{enumitem}
\usepackage{tikz-cd}
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparwidth 40pt
\marginparsep 10pt
\topmargin -20pt
\headsep 10pt
\textheight 8.7in
\textwidth 6.65in
\linespread{1.2}

\newtheorem{theorem}{Theorem}[chapter] \newtheorem{lemma}{Lemma}[chapter] \newtheorem{conjecture}{Conjecture}[chapter] \newtheorem{example}{Example}[chapter] \let\oldexample\example \renewcommand{\example}{\oldexample\normalfont} \newtheorem{definition}{Definition}[chapter] \let\olddefinition\definition \renewcommand{\definition}{\olddefinition\normalfont} \newtheorem{proposition}{Proposition}[chapter] \newtheorem{remark}{Remark}[chapter] \let\oldremark\remark \renewcommand{\remark}{\oldremark\normalfont} \newtheorem{corollary}{Corollary}[chapter]

The problem I am getting is that if I make, say a theorem and a corollary, then they are number Theorem 1 and Corollary 1. How can I display the same counter for all new theorem styles? I mean I would like Theorem 1, Corollary 2, Proposition 3. I don't want a different counter for each newtheorem style.

1 Answers1

4

Take a look at the documentation of the amsthm package. It provides a solution for several theorem-like environments sharing the same counter, as well as for using different font shapes for the theorem text.

\usepackage{amsthm}

%\theoremstyle{plain}% The default: italic font, extra space above and below theorems \newtheorem{theorem}{Theorem}[chapter] \newtheorem{lemma}[theorem]{Lemma}% use the same counter as theorems \newtheorem{conjecture}[theorem]{Conjecture}% use the same counter as theorems \newtheorem{proposition}[theorem]{Proposition}% use the same counter as theorems \newtheorem{corollary}[theorem]{Corollary}% use the same counter as theorems

\theoremstyle{definition}% upright text, extra space above and below environment \newtheorem{example}[theorem]{Example}% use the same counter as theorems \newtheorem{definition}[theorem]{Definition}% use the same counter as theorems

\theoremstyle{remark}% upright text, no extra space above and below \newtheorem{remark}[theorem]{Remark}% use the same counter as theorems

gernot
  • 49,614