将枚举列表放在方程计数器上

将枚举列表放在方程计数器上

我想将某些枚举列表放在与显示的方程式相同的计数器上。有人能建议我该怎么做吗?

接近下面的最小工作示例。

\documentclass{amsart}
\usepackage{enumitem}

\renewcommand{\baselinestretch}{1.3} 
\parskip=5pt  
\parindent=0pt  

\numberwithin{equation}{section}

\begin{document}

\section{My section} 
\subsection{My subsection}

This is an equation that I want to display:
\begin{equation}\label{first}
\mbox{An equation I want to display.}
\end{equation}

I like to be able to refer to \eqref{first}.

Sometimes I like to make normal enumerated lists. 
\begin{enumerate}
\item So interesting. 
\item Also interesting. 
\end{enumerate}

But sometimes, I like to make an enumerated lists that formatted the same way as displayed equations.  
\begin{enumerate}
\item \label{second} First enumerated fact. 
\item \label{third} Second enumerated fact. 
\item \label{fourth} Third enumerated fact.
\end{enumerate} 

And then I want to refer to \eqref{third} the same way that I refer to \eqref{first}. 

\end{document} 

我希望能够进行设置,以便第二个列表中的条目标记为 (1.2)、(1.3)、(1.4),样式与显示的方程 (1.1) 相同。

答案1

以下端口campa 指出的答案使用包\newlist定义的公式enumitem,因此将与其间距命令兼容,如下所示OP 的请求

\documentclass{amsart}
\usepackage{enumitem}

\newlist{eqenum}{enumerate}{1}
\setlist[eqenum]{before=\setcounter{eqenumi}{\value{equation}},after=\setcounter{equation}{\value{eqenumi}},label=(\thesection.\arabic*),ref=\thesection.\arabic*}


\renewcommand{\baselinestretch}{1.3} 
\parskip=5pt  
\parindent=0pt  

\numberwithin{equation}{section}

\begin{document}

\section{My section} 
\subsection{My subsection}

This is an equation that I want to display:
\begin{equation}\label{first}
\mbox{An equation I want to display.}
\end{equation}

I like to be able to refer to \eqref{first}.

Sometimes I like to make normal enumerated lists. 
\begin{enumerate}
\item So interesting. 
\item Also interesting. 
\end{enumerate}

But sometimes, I like to make an enumerated lists that formatted the same way as displayed equations.  
\begin{eqenum}
\item \label{second} First enumerated fact. 
\item \label{third} Second enumerated fact. 
\item \label{fourth} Third enumerated fact.
\end{eqenum} 

And then I want to refer to \eqref{third} the same way that I refer to \eqref{first}. 


\end{document}

笔记

  • 该语句\newlist{eqenum}{enumerate}{1}告诉enumitem创建一个只能在第一级使用的新枚举列表(不能嵌套)。
  • beforeafterenumitem可用于将equation计数器复制到用于列表的计数器eqenum,反之亦然。之后,我仅使用labelref键来设置标签的外观。这两个应该分开设置,因为我假设您希望标签显示为(1.3)并且希望\eqref{third}显示(1.3)而不是((1.3))

相关内容