Make text align left in the new enumerate environment enumerated uniformly with equations

#enumeratealignequations

First a MWE is as follows.

\documentclass[12pt,leqno]{article}
\usepackage{amsmath}
\numberwithin{equation}{section}%
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}%
\newcounter{keepeqno}
\newenvironment{myenumerate}
{\setcounter{keepeqno}{\value{equation}}%
    \begin{list}{(\theequation)}
        {\setlength{\itemsep}{0pt}\setlength{\partopsep}{0.3\baselineskip plus 0.2ex minus 0.1ex}\setlength{\parsep}{0pt}\setlength{\topsep}{0pt}\usecounter{equation}}%
        \setcounter{equation}{\value{keepeqno}}}
    {\end{list}}

\begin{document}
\section{Test}
The equation is
\begin{equation}
f(x)=x^2+3x+9.
\end{equation}
It satisfies the following conditions.
\begin{myenumerate}
\item Belonging to a hereditary class with high social or political status; aristocratic. Belonging to a hereditary class with high social or political status; aristocratic.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Belonging to a hereditary class with high social or political status; aristocratic. Belonging to a hereditary class with high social or political status; aristocratic.
\end{myenumerate}

\end{document}

And the appearance of the compiled PDF is as follows.

enter image description here

As you see, I defined a new enumerate environment in which items are enumerated together with equations in the section (please see the link for the reason to define such a new enumerate environment), and the texts in item (1.2) are aligned left while those in item (1.10) are not. Then how to make texts in item (1.10) are also aligned left?

Best Answer

Try this.

\documentclass[12pt,leqno]{article}
\usepackage{amsmath}
\numberwithin{equation}{section}%
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}%
\newcounter{keepeqno}
\usepackage{enumitem,calc}
\newlist{myenumerate}{enumerate}{1}
\setlist[myenumerate]{label={(\theequation)},
align=left,labelwidth=\widthof{(9.99)},leftmargin=!,
itemsep=0pt,partopsep=0.3\baselineskip plus 0.2ex minus 0.1ex,parsep=0pt,topsep=0pt,
before={\setcounter{keepeqno}{\value{equation}}\usecounter{equation}},
first={\setcounter{equation}{\value{keepeqno}}}}
  

\begin{document}
  
\section{Test}
The equation is
\begin{equation}
f(x)=x^2+3x+9.
\end{equation}
It satisfies the following conditions.
\begin{myenumerate}
\item Belonging to a hereditary class with high social or political status; aristocratic. Belonging to a hereditary class with high social or political status; aristocratic.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Belonging to a hereditary class with high social or political status; aristocratic. Belonging to a hereditary class with high social or political status; aristocratic.
\end{myenumerate}
The equation is
\begin{equation}
f(x)=x^2+3x+9.
\end{equation}
It satisfies the following conditions.
\begin{myenumerate}
\item Belonging to a hereditary class with high social or political status; aristocratic. Belonging to a hereditary class with high social or political status; aristocratic.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Some texts.
\item Belonging to a hereditary class with high social or political status; aristocratic. Belonging to a hereditary class with high social or political status; aristocratic.
\end{myenumerate}


\end{document}

enter image description here

Related Question