1

I'm typesetting a book where the author uses groups of aligned equations as items of an enumerate list, like this: enter image description here together with other items of the enumerate list, which are not formulas. Would it be possible to describe a variant of the align* environment which, when used in an enumerate list, would be vertically aligned with number of the item?

Ideally something like this:

\begin{enumerate}
\item\begin{align*}(T_1+T_2)(\vec{x}+\vec{y})&=T_1(\vec{x}+\vec{y})+T_2(\vec{x}+\vec{y})\\
&=T_1(\vec{x})+T_1(\vec{y})+T_2(\vec{x})+T_2(\vec{y})\\
etc.
\end{align*}
\item\begin{align*}(T_1+T_2)(\alpha\vec{x})&=etc.
\end{align*}
\item …
\item as well as other entries that are not formulas…
\end{enumerate}

And also, if possible, to retain horizontal alignment throughout \item commands? By using, for example, \item inside \intertext, or by having a special command \interitem that would play the role of \item without leaving the align environment?

Ideally something like this:

\begin{enumerate}
\item\begin{align*}(T_1+T_2)(\vec{x}+\vec{y})&=T_1(\vec{x}+\vec{y})+T_2(\vec{x}+\vec{y})\\
&=T_1(\vec{x})+T_1(\vec{y})+T_2(\vec{x})+T_2(\vec{y})\\
etc.
\interitem(T_1+T_2)(\alpha\vec{x})&=etc.
\interitem …
\end{align*}
\item as well as other entries that are not formulas…
\end{enumerate}
2

1 Answer 1

1

(I've updated this answer to provide a second solution method.)

I can think of two approaches:

  • You could use an flalign* environment and manually insert numbers on the far left to make it look like it's part of an enumerate environment. The advantage is that all equations will automatically be aligned on a single = symbol. The downside is that one isn't using a real enumerate environment.

  • You could use a sequence of aligned environments, with a common width of the material to the left of the = symbols, achieved with the use of a bespoke \parbox. The advantage is that you can use all facilities of the enumerate environment and that you could use \intertext and \shortintertext without having to apply further positioning directives. The main disadvantage is that you need to manually choose the width of the width of the parbox; in the code below, I've set up a parameter called \mylen that governs the width of the parbox. Another potential disadvantage is that LaTeX doesn't allow page breaks inside aligned environments: this may, or may not, be an issue in practice.

The framelines in the following screenshot are drawn by the showframe package.

enter image description here

\documentclass{article}
\usepackage{newtxtext,newtxmath} % optional
\usepackage{amsmath} % for 'flalign*' and 'aligned' environments
\usepackage{xcolor,enumitem,showframe}

% code for 2nd solution approach:
\newlength\mylen
\setlength\mylen{4.5cm} % choose a suitable value
\newcommand\mybox[1]{\parbox{\mylen}{\raggedleft$\displaystyle #1$}}

\begin{document}

%% first approach
\begin{flalign*}
\quad&\textcolor{red}{1.} & 
  (T_1+T_2)(\vec{x}+\vec{y}) &= T_1(\vec{x}+\vec{y}) + T_1(\vec{x}+\vec{y}) & {} \\
  &&&= \dots & \\
  &&&= \dots & \\
  &&&= (T_1+T_2)(\vec{x})+(T_1+T_2)(\vec{y})\,. & \\[0.75\baselineskip]
&\textcolor{red}{2.} & 
  (T_1+T_2)(\alpha\vec{x}) &= \dots & {} \\
  &&&= \dots & \\
  &&&= \dots & \\
  &&&= \alpha(T_1+T_2)(\vec{x}))\,. & \\[0.75\baselineskip]
&\textcolor{red}{3.} & 
  (kT_1)(\vec{x}+\vec{y}) &= \dots & {} \\
  &&&= \dots & \\
  &&&= \dots & \\
  &&&= (kT_1)(\vec{x})+(kT_1)(\vec{y})\,. 
\end{flalign*}

\hrule

%% second approach
\begin{enumerate}[label=\color{red}\arabic*.]
\item
$\begin{aligned}[t]
 \mybox{(T_1+T_2)(\vec{x}+\vec{y})} 
    &= T_1(\vec{x}+\vec{y}) + T_1(\vec{x}+\vec{y})  \\
    &= \dots \\
    &= \dots \\
    &= (T_1+T_2)(\vec{x})+(T_1+T_2)(\vec{y})\,. 
 \end{aligned}$
\item
$\begin{aligned}[t]
 \mybox{(T_1+T_2)(\alpha\vec{x})} 
    &= \dots  \\
    &= \dots \\
    &= \dots \\
    &= \alpha(T_1+T_2)(\vec{x}))\,. 
 \end{aligned}$
\item
$\begin{aligned}[t]
 \mybox{(kT_1)(\vec{x}+\vec{y})} 
    &= \dots \\
    &= \dots \\
    &= \dots \\
    &= (kT_1)(\vec{x})+(kT_1)(\vec{y})\,. 
 \end{aligned}$
\end{enumerate}

\end{document}

You must log in to answer this question.

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