1

So I've been experimenting with Latex as it'll apparently be useful for the next year of my degree, and I've come across the following issue with enumerated lists.

\begin{enumerate}[label=(\roman*)]
    \item test 1
    \item test 2
    \item $\begin{aligned}
    \mathbb{E}(X) 
       &= \sum_{k=0}^N k {N \choose k} p^k (1-p)^{N-k} \\ 
       &= Np \sum_{k=1}^N {N-1 \choose k-1}p^{k-1} (1-p)^{(N-1)-(k-1)} \\ 
       &= Np \underbrace{\sum_{k=0}^{N-1} {N-1 \choose k} p^k (1-p)^{N-1-k}}_\text{1} \\ 
       &= Np
    \end{aligned}$
\end{enumerate}

Where the third listed item is some probability, that I have in this for demonstrating my issue. With said third listed item, the '(iii)' in the list centers itself vertically alongside the equation, when I would like it to be positioned alongside and to the left of the first line of the equation, not the center, much like it appears for the first two items in the list. How would I go about doing this?

2

The fix lies not with the enumerate environment, but with the aligned environment: Give it the [t] placement specifier, as in

$\begin{aligned}[t]

A full MWE (minimum working example):

enter image description here

\documentclass{article}
\usepackage{amsmath,amssymb,enumitem}
\begin{document}
\begin{enumerate}[label=(\roman*)]
\item test 1
\item test 2
\item $\begin{aligned}[t]
       \mathbb{E}(X) &=    \sum_{k=0}^N k {N \choose k} p^k (1-p)^{N-k} \\ 
                     &= Np \sum_{k=1}^N {N-1 \choose k-1}p^{k-1} (1-p)^{(N-1)-(k-1)} \\ 
                     &= Np \underbrace{\sum_{k=0}^{N-1} {N-1 \choose k} p^k (1-p)^{N-1-k}}_{1} \\ 
                     &= Np
      \end{aligned}$
\end{enumerate}
\end{document}  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.