# Remove white line after \item in enumerate and before display math

The goal is to remove the white line after the 1. in the second enumerate in the picture, so it will look like the first enumerate.

I don't like the first enumerate because it uses inline math, needs the white line in the code to make a new paragraph, and uses \displaystyle which I think is not the way to go: it feels like a 'hack'. Maybe I am mistaken, in that case say so, but I think there must be a good solution.

MWE:

\documentclass[english]{exam}
\usepackage[fleqn]{amsmath}

\begin{document}

\begin{enumerate}  %result looks fine, but code ugly
\item
$\displaystyle \pi$

$\displaystyle 2\pi$
\end{enumerate}

\begin{enumerate} %code looks fine, but result ugly
\item
$\pi$
$2\pi$
\end{enumerate}

\end{document}

• Welcome, you are using a displayed math environment. Their purpose is to present their content on an extra line. – Johannes_B May 16 '16 at 14:45
• @Johannes_B But even in an enumerate? So I should use the \displaystyle? – PHPirate May 16 '16 at 14:51
• I think this is a classical XY-question. So you want math in an enumerate? Or do you want to enumerate math? If you ake that clear, an experienced user can help you find a solution. – Johannes_B May 16 '16 at 14:52
• @Johannes_B I want math in an enumerate, as said like in the first enumerate in the picture. But I want to avoid using \displaystyle because I don't like typing that every time in an inline math environment. – PHPirate May 16 '16 at 14:55

x & = 0   \\
y & = \frac{1}{2}
\end{aligned}\$
\end{enumerate}
\end{document}


With the extension witharrows correctly parameted, you have directly the result. Of course, the main purpose of the extension witharrows is to add arrows. That's, why, in the following example, I have added an arrow.

\documentclass[english]{exam}
\usepackage[fleqn]{amsmath}
\usepackage{witharrows}
\WithArrowsOptions{fleqn,displaystyle,mathindent = 0pt,notag}
\begin{document}
\begin{enumerate}
\item
\begin{DispWithArrows}[format=c]
\frac{2\pi}{3} \Arrow[tikz=-]{which one?}\\
\frac{5\pi}{4}
\end{DispWithArrows}
\end{enumerate}
\end{document}