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.

3
  • Welcome to TeX.SE! Please make your code snippet be compilable resulting in your issue, then we do not have to guess what you are doing ...
    – Mensch
    Commented Oct 9, 2021 at 14:51
  • Try \newtheorem{conjecture}[theorem]{Conjecture}\newtheorem{proposition}[theorem]{Proposition}. Have you checked that the document option 8pt has any effect? My guess is that there is a warning in the log file saying that 8pt is unknown and therefore is ignored. Usually there is only the choice between 10pt (default), 11pt, and 12pt.
    – gernot
    Commented Oct 9, 2021 at 15:04
  • Potential duplicate: [Understanding the arguments in newtheorem e.g. \newtheorem{theorem}{Theorem}[section]](tex.stackexchange.com/q/155710) Commented Oct 9, 2021 at 15:37

1 Answer 1

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

You must log in to answer this question.

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