1

What i try to make work is effectively combining this question: Prevent line break before equation environment in enumerated list item(to have the equation on the same line as the label) with this question: How can I use an align environment flush left? (Have the equation all the way on the left).

This turns out to be not as easy as combining the solutions. I have a MWE here:

\documentclass[11pt, a4paper]{scrartcl}
\usepackage{enumitem}
\usepackage{mathtools}

\begin{document}
\begin{enumerate}[label=\alph*)]
    \item \mbox{} \vspace*{-\baselineskip} \[\begin{alignedat}{2}
                  \frac{1 - j}{1 + 2j} + \frac{1 + 3j}{1 - 2j} &= -\frac{6}{5} + \frac{2}{5} j
              \end{alignedat} \]
    \item \mbox{} \vspace*{-\baselineskip} \begin{flalign*}
              \frac{1 - j}{1 + 2j} + \frac{1 + 3j}{1 - 2j} &= -\frac{6}{5} + \frac{2}{5} j &
          \end{flalign*}
\end{enumerate}
\end{document}

The original equation is longer which is why there are still & delimiters at the = sign.

The problem here is now that for whatever reason the flalign* environment ist not in line with the item label even though it has the same \vspace*{-\baselineskip} in front. Does flalign* add more vertical space than the normal equation* environment and if yes how much is it exactly?

5
  • For single -line equations, why do you use alignedat or flalign*?
    – Bernard
    Apr 1, 2022 at 11:26
  • @Bernard Because the whole equation is around 3 to 4 times longer than the MWE there and is running off the right page side otherwise Apr 1, 2022 at 12:34
  • I see, You could simply use $\displaystyle\begin{aligned}… \end{aligned}. Another possibility would be to use the fleqn` environment from nccmathand make the list by hand, like this: \beginfleqn}\begin{align*}&a)&……\end{align*}{\end{fleqn}.
    – Bernard
    Apr 1, 2022 at 12:48
  • Unfortunately both of those ideas didn't work for me. ` $\displaystyle\begin{aligned}… \end{aligned}` vertically centered the whole equation to the label instead of having the first line aligned to it. The nccmath idea produced the same output as flalign* idea. Apr 1, 2022 at 13:20
  • But while checking the documentation of nccmath i stumbled upon the \abovedisplayskip and \abovedisplayshortskip and it looks like flalign* adds a \abovedisplayskip before the equation. Adding \vspace*{-\abovedisplayskip} to the flalign* idea it works. Apr 1, 2022 at 13:22

1 Answer 1

2

Following up on @Bernard's earlier suggestion: To get the first row of a multi-row aligned environment aligned [pun intended] with the external marker, just use the optional [t] positioning specifier, as in $\begin{aligned}[t] ... \end{aligned}$.

enter image description here

\documentclass[11pt, a4paper]{scrartcl}
\usepackage{enumitem}
\usepackage{mathtools}
\begin{document}
\begin{enumerate}[label=\alph*)]
    \item $\begin{aligned}[t]
              \frac{1 - j}{1 + 2j} + \frac{1 + 3j}{1 - 2j} 
                 &= -\frac{6}{5} + \frac{2}{5} j \\ 
                 &= \text{some additional thoughts\dots}
           \end{aligned}$
\end{enumerate}
\end{document}
1
  • 1
    Why was it that easy :D. Thank you so much for pointing out the [t] option. Apr 3, 2022 at 12:37

You must log in to answer this question.

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