答案1
您不需要手动对环境进行编号,只需更改相关计数器的表示形式:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{hyp}{Hyp}
\renewcommand{\thehyp}{\Alph{hyp}}
\begin{document}
\begin{hyp}\label{hyp-flat}
The Earth is flat.
\end{hyp}
Assuming Hyp~\ref{hyp-flat} we now prove that pigs can fly.
\end{document}
还有使用的可能性cleveref
:
\documentclass{article}
\usepackage{amsthm}
\usepackage{cleveref}
\newtheorem{hyp}{Hyp}
\renewcommand{\thehyp}{\Alph{hyp}}
\crefname{hyp}{Hyp}{Hyp} % always uppercase
\begin{document}
\begin{hyp}\label{hyp-flat}
The Earth is flat.
\end{hyp}
Assuming \cref{hyp-flat} we now prove that pigs can fly.
\end{document}