# Let equation numbers and enumerate use the same counter

I managed to customized the enumeration, so it mimics the format of the math equation number. Now, I would like to replace the math equation counter by the one from the enumerate, (\thechapter.\arabic{enumi}), so that both share the same numbering. Note that I want change the align counter rather than define a new environment.

For example, below I would like the equation number to be (1.2) rather than (1.1).

(My use case is to number both equations and other textual propositions throughout the text without having to either use equations with text only or enumerates with inline equations.)

\documentclass[fleqn,leqno]{book}

\usepackage{amsmath}

\setlength{\mathindent}{3\parindent}

\usepackage{enumitem}
\setlist{leftmargin=3\parindent,labelindent=3\parindent}
\setlist[enumerate]{%
leftmargin=3\parindent,%
align=left,%
labelwidth=3\parindent,%
labelsep=0pt%
}
\setlist[enumerate,1]{%
label=(\thechapter.\arabic{enumi}),
resume%
}

\begin{document}

\chapter{One}

\begin{enumerate}
\item Item one
\end{enumerate}

\begin{align}
y = x^2
\end{align}

\end{document}


To have the best alignment of the items, I suggest using aligned in in-line math mode:

\documentclass[fleqn,leqno]{book}
\usepackage{amsmath}
\setlength{\mathindent}{3\parindent}
\usepackage{enumitem}
\setlist{leftmargin=3\parindent,labelindent=3\parindent}
\setlist[enumerate]{%
leftmargin=3\parindent,%
align=left,%
labelwidth=3\parindent,%
labelsep=0pt%
}
\setlist[enumerate,1]{%
label=(\thechapter.\arabic{enumi}),
resume%
}

\begin{document}
\chapter{One}
\begin{enumerate}
\item Item one
\item \begin{aligned}[t] y &= x^2 + 2x + 1\\ &= (x+1)^2 \end{aligned}
\end{enumerate}
\end{document}


You could use \parbox in math mode.

\documentclass{book}

\usepackage[fleqn,leqno]{amsmath}
\settowidth{\mathindent}{$(2.22)\quad$}

\usepackage{blindtext}% MWE only
\usepackage{showframe}% MWE only

\begin{document}

\chapter{One}

$$\parbox[t]{\dimexpr \textwidth-\mathindent}{\blindtext}$$
\begin{align}
y &= x^2 \\
&= x\times x\notag
\end{align}

\end{document}


You could also use the aliascnt package. In the following example, we undefine/delete the enumi counter, and then redefine it as an alias to the equation counter. (Disclaimer: blatantly deleting an existing counter like enumi seems rather blunt, and I'm not sure as to whether this has any unforeseen side effects. However, I didn't encounter any, and everything seems to go well...)

\documentclass[fleqn,leqno]{book}

\usepackage{amsmath}

% ----------------------------------------
\usepackage{aliascnt}

\makeatletter
\let\c@enumi\relax
\makeatother
\newaliascnt{enumi}{equation}
% ----------------------------------------

\setlength{\mathindent}{3\parindent}

\usepackage{enumitem}
\setlist{leftmargin=3\parindent,labelindent=3\parindent}
\setlist[enumerate]{%
leftmargin=3\parindent,%
align=left,%
labelwidth=3\parindent,%
labelsep=0pt%
}
\setlist[enumerate,1]{%
label=(\thechapter.\arabic{enumi}),
resume%
}

\begin{document}

\chapter{One}

\begin{enumerate}
\item Item one
\end{enumerate}

\begin{align}
y = x^2
\end{align}

\end{document}