1

I created the following environments in an amsart document:

 \documentclass{amsart}
\usepackage[a4paper, total={6 in, 9 in}]{geometry}
\usepackage{amssymb,amsfonts}
\usepackage{mathrsfs}
\usepackage{hyperref}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{quest}[thm]{Question}

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{exmp}[thm]{Example}
\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}

\makeatletter
\let\c@equation\c@thm
\makeatother
\numberwithin{equation}{section}

I can use \label{label} to label such environments and then reference it as \hyperref[label]{shown label}.

However, I would like to label enumerate enviroments simmilar to the one bellow:

\begin{enumerate}
\item[\textup{(C1)}] ...
\item[\textup{(C2)}] ...
\item[\textup{(C3)}] ...
\end{enumerate}

such that I can reference properties (C1), (C2) and (C3).

How should I go about this?

2 Answers2

2

If you load enumitem, you can create a custom labelling, which \ref{} can recognise

enter image description here

\documentclass{article}
\usepackage{enumitem}

\begin{document} List \begin{enumerate}[label=(C\theenumi)] \item X \label{x} \item Y \item Z. \label{z} \end{enumerate}

Reference to \ref{x} and \ref{z}. \end{document}

Celdor
  • 9,058
1

You want to use enumitem and also to simplify the code. It's not necessary to define a thm counter and then to make equation point to it. Just use equation.

\documentclass{amsart}
\usepackage[a4paper, total={6 in, 9 in}]{geometry}
\usepackage{amssymb,amsfonts}
\usepackage{mathrsfs}
\usepackage{enumitem}
\usepackage{hyperref}

\numberwithin{equation}{section}

\newtheorem{thm}[equation]{Theorem} \newtheorem{cor}[equation]{Corollary} \newtheorem{prop}[equation]{Proposition} \newtheorem{lem}[equation]{Lemma} \newtheorem{quest}[equation]{Question}

\theoremstyle{definition} \newtheorem{defn}[equation]{Definition} \newtheorem{exmp}[equation]{Example} \theoremstyle{remark} \newtheorem{rem}[equation]{Remark}

\newenvironment{conditions}[1] {\enumerate[label=\upshape(#1\arabic*)]} {\endenumerate}

\begin{document}

\section{Introduction} Let's make a reference to condition~\ref{condition3}.

\begin{conditions}{A} \item This is a condition. \item This is another one. \end{conditions}

\section{Text}

\begin{thm} The following conditions are equivalent: \begin{conditions}{C} \item ... \item ... \item\label{condition3} ... \end{conditions} We have also an equation \begin{equation} 0=0 \end{equation} \end{thm}

Another equation \begin{equation} 1=1 \end{equation}

\begin{rem} This is interesting, isn't it? \end{rem}

\end{document}

enter image description here

egreg
  • 1,121,712