1

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.)

enter image description here

\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}

3 Answers 3

3

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}

enter image description here

1

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}

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

\end{document}

demo

1

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}

% ----------------------------------------
% ADDED THE FOLLOWING LINES TO YOUR MWE:
\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}

modified MWE with aliascnt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .