假设我们有以下代码:
\documentclass[reqno]{amsart}
\usepackage{amsaddr}
\usepackage{geometry}
\geometry{margin=1in,top=3cm}
\usepackage{amssymb}
\usepackage{microtype}
\usepackage{listings}
\newtheorem{thm}{Theorem}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}[definition]
\newtheorem{note}[thm]{Note}
\begin{document}
\section{Section 1}
\begin{definition}
Definition 1
\end{definition}
\section{Section 2}
\begin{definition}
Definition 2
\end{definition}
\begin{definition}
Definition 3
\end{definition}
\section{Section 3}
\begin{definition}
Definition 4
\end{definition}
\begin{definition}
Definition 5
\end{definition}
\begin{definition}\label{def:6}
Definition 6
\begin{enumerate}
\item djdj
\begin{enumerate}
\item jffj
\item krlf
\item krfk
\begin{enumerate}
\item dkdk
\item krkd
\item keld
\item shsj
\item krlf
\end{enumerate}
\item skxk \label{crit:d}
\begin{enumerate}
\item jddj \label{crit:di}
\end{enumerate}
\item kssk
\end{enumerate}
\item skdk
\item krdk
\end{enumerate}
\end{definition}
\section{Label of Criteria In The List of def. \ref{def:6}}
See sec. \ref{def:6}, crit. \ref{crit:d} \ref{crit:di}
\end{document}
问题:交叉引用时sec. 3, def. 6 crit. d(i)
,如何获取(i)
而不是1(d)i
(参见前面屏幕截图中黄色突出显示的字段)?
编辑:使用最近的评论进行更改。
答案1
我建议你加载枚举项包并使用其\setlist
宏重新定义 1 级至 3 级枚举环境中标签的外观。
\documentclass{amsart}
%% I've tried to simplify and streamline the preamble
\newtheorem{definition}{Definition}
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional
\usepackage{enumitem} % see https://ctan.org/pkg/enumitem
\setlist[enumerate,1]{label=\upshape(\arabic*),
ref=\arabic*}
\setlist[enumerate,2]{label=\upshape(\alph*),
ref=\arabic{enumi}\alph*}
\setlist[enumerate,3]{label=\upshape(\roman*),
ref=(\roman*)}
\begin{document}
\setcounter{section}{3} % just for this example
\setcounter{definition}{5}
\begin{definition}\label{def:6}
Definition 6
\begin{enumerate}
\item djdj* \label{crit:1}
\begin{enumerate}
\item jffj
\item krlf
\item krfk
\begin{enumerate}
\item dkdk
\item krkd
\item keld
\item shsj
\item krlf
\end{enumerate}
\item skxk* \label{crit:1d}
\begin{enumerate}
\item jddj* \label{crit:1di}
\end{enumerate}
\item kssk
\end{enumerate}
\item skdk
\item krdk
\end{enumerate}
\end{definition}
\section{Labels of Criteria in the Numbered Lists in Definition \ref{def:6}}
\noindent
\ref{def:6} -- \ref{crit:1} -- \ref{crit:1d} -- \ref{crit:1di}
\end{document}