我想要的是以下内容:
1. Introduction
Theorem 1.1 theorem 1.1
Theorem 1.2 theorem 1.2
Lemma 1.3 lemma 1.3
Remark 1.4 remark 1.4
In theorem [1.1], lemma [1.3], and remark [1.3], we obtained...
2. Implementation
Corollary 2.1 corollary 2.1
Corollary 2.2 corollary 2.2
Definition 2.3 definition 2.3
Conjecture 2.4 conjecture 2.4
In corollary [2.1], definition23 [2.3], and conjecture [2.4], we obtained...
我研究过之前发布的几个例子,但未能找到一个解决方案,让我能够正确地定义这些定理/备注,并在以后正确引用它们。
非常感谢你的帮助 - Mike
最小工作示例
%--------------------------
\documentclass[a4paper,12pt,reqno,twoside]{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{color}
\usepackage{ifpdf}
\usepackage{array}
\usepackage{url}
\usepackage{graphicx}
\usepackage{float}
\usepackage{multirow,bigdelim}
\addtolength{\textheight}{2cm}
\addtolength{\topmargin}{-1.5cm}
\addtolength{\textwidth}{2cm}
\addtolength{\oddsidemargin}{-1cm}
\addtolength{\evensidemargin}{-1cm}
\numberwithin{equation}{section}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{conjecture}{Conjecture}[section]
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\usepackage{cleveref}% http://ctan.org/pkg/cleveref
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{chngcntr}% http://ctan.org/pkg/lipsum
\newcommand*{\C}{\mathbb{C}}%.............................C
\newcommand*{\R}{\mathbb{R}}%.............................R
\newcommand*{\Q}{\mathbb{Q}}%.............................Q
\newcommand*{\Z}{\mathbb{Z}}%.............................Z
\newcommand*{\N}{\mathbb{N}}%.............................N
\newcommand{\comment}[1]{}
%................................
%\def\baselinestretch{2}%.espacement des lignes
%................................
\title[title]%
{title}
\author[A. Author]{Author AUTHOR}
%
\date{Version of \today}
%................................
\subjclass[2000]{11M26, 11M50, 11N64 }
\keywords{}
%
\AtBeginDocument{%
%\mathtoolsset{showonlyrefs,mathic = true}
\begin{abstract}
\end{abstract}
\maketitle
%\tableofcontents % Table of Contents
}
%..........................................
\begin{document}
%..........................................
%
\section{Introduction}
\counterwithin{equation}{section}
\begin{theorem}\label{theorem11}
theorem 1.1
\end{theorem}
\begin{theorem}\label{theorem12}
theorem 1.2
\end{theorem}
\begin{lemma}\label{lemma13}
lemma 1.3
\end{lemma}
\begin{remark}\label{remark14}
remark 1.4
\end{remark}
In \cref{theorem11}, \cref{lemma13}, and \cref{remark14}, we obtained...
\section{Implementation}
\counterwithin{equation}{section}
\begin{corollary}\label{corollary21}
corollary 2.1
\end{corollary}
\begin{corollary}\label{corollary22}
corollary 2.2
\end{corollary}
\begin{definition}\label{definition23}
definition 2.3
\end{definition}
\begin{conjecture}\label{conjecture24}
conjecture 2.4
\end{conjecture}
In \cref{corollary21}, \cref{definition23}, and \cref{conjecture24}, we obtained...
%---------------------------------------
\end{document}
更新我按照@Eric 的回答修改了 tex 文件。数字现在看起来没问题了。但在引用部分,命名不正确。我本以为会看到“在定理 1.1 中”,但它显示“在定义 1.1 中”。请参见下面的图 2。
答案1
对除第一个之外的所有定理环境使用第一个可选参数。
\documentclass[a4paper,12pt,reqno,twoside]{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{color}
\usepackage{ifpdf}
\usepackage{array}
\usepackage{url}
\usepackage{graphicx}
\usepackage{float}
\usepackage{multirow,bigdelim}
\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\usepackage{cleveref}% http://ctan.org/pkg/cleveref
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{chngcntr}% http://ctan.org/pkg/lipsum
\addtolength{\textheight}{2cm}
\addtolength{\topmargin}{-1.5cm}
\addtolength{\textwidth}{2cm}
\addtolength{\oddsidemargin}{-1cm}
\addtolength{\evensidemargin}{-1cm}
\numberwithin{equation}{section}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}[definition]{Theorem}
\newtheorem{lemma}[definition]{Lemma}
\newtheorem{proposition}[definition]{Proposition}
\newtheorem{corollary}[definition]{Corollary}
\newtheorem{remark}[definition]{Remark}
\newtheorem{conjecture}[definition]{Conjecture}
\newcommand*{\C}{\mathbb{C}}%.............................C
\newcommand*{\R}{\mathbb{R}}%.............................R
\newcommand*{\Q}{\mathbb{Q}}%.............................Q
\newcommand*{\Z}{\mathbb{Z}}%.............................Z
\newcommand*{\N}{\mathbb{N}}%.............................N
\newcommand{\comment}[1]{}
%................................
%\def\baselinestretch{2}%.espacement des lignes
%................................
\title[title]%
{title}
\author[A. Author]{Author AUTHOR}
%
\date{Version of \today}
%................................
\subjclass[2000]{11M26, 11M50, 11N64 }
\keywords{}
%
\AtBeginDocument{%
%\mathtoolsset{showonlyrefs,mathic = true}
\begin{abstract}
\end{abstract}
\maketitle
%\tableofcontents % Table of Contents
}
%..........................................
\begin{document}
%..........................................
%
\section{Introduction}
\counterwithin{equation}{section}
\begin{theorem}\label{theorem11}
theorem 1.1
\end{theorem}
\begin{theorem}\label{theorem12}
theorem 1.2
\end{theorem}
\begin{lemma}\label{lemma13}
lemma 1.3
\end{lemma}
\begin{remark}\label{remark14}
remark 1.4
\end{remark}
In \cref{theorem11}, \cref{lemma13}, and \cref{remark14}, we obtained...
\section{Implementation}
\counterwithin{equation}{section}
\begin{corollary}\label{corollary21}
corollary 2.1
\end{corollary}
\begin{corollary}\label{corollary22}
corollary 2.2
\end{corollary}
\begin{definition}\label{definition23}
definition 2.3
\end{definition}
\begin{conjecture}\label{conjecture24}
conjecture 2.4
\end{conjecture}
In \cref{corollary21}, \cref{definition23}, and \cref{conjecture24}, we obtained...
%---------------------------------------
\end{document}