我在 leaf 上编码并使用不同的新定理样式。这是我的序言。
\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]
我遇到的问题是,如果我提出一个定理和一个推论,那么它们就是数字定理 1 和推论 1。我如何才能为所有新定理样式显示相同的计数器?我的意思是我想要定理 1、推论 2、命题 3。我不希望每个新定理样式都有不同的计数器。
答案1
查看该amsthm
包的文档。它为多个类似定理的环境共享同一个计数器以及为定理文本使用不同的字体形状提供了解决方案。
\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