# Remove the white space between the item label and the equations [duplicate]

Here is a question. I want to know how to remove the white space between the item label and the equations? For example, I want to remove the blank between the number 1 and the equation f(X)=...

The code and picture are as follows


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
\begin{enumerate}
\item
\begin{eqnarray*}
f(X)&=& AD+SF SF SDF+DFDF FA \\
\end{eqnarray*}

\item
\begin{equation*}
\end{equation*}

\end{enumerate}


## marked as duplicate by campa, Phelype Oleinik, Raaja, siracusa, MarijnJun 28 at 12:41

Welcome to tex.SE... Hope the below codes may helps you:

\documentclass[10pt]{book}
\usepackage{amsmath}
\newcommand\mathitem{\item\leavevmode\vspace*{-\dimexpr\baselineskip+\abovedisplayskip\relax}}

\begin{document}

\begin{enumerate}
\mathitem
\begin{align*}
f(X)&= AD+SF SF SDF+DFDF FA \\
\end{align*}

\mathitem
\begin{equation*}
\end{equation*}

\item This is for test
\end{enumerate}

\end{document}


Note that please try to avoid eqnarray which is little bit older, use amsmath environments like align, gather, etc. Also hope your operator alignment was wrong, + sign should be quad indent with =

PS: Big thanks to Bernard who already gave this suggestion, refer Remove white line after \item in enumerate and before display math

• Ingenious! (+1) – Bernard Jun 28 at 12:04
• @Bernard Thanks... :-D – MadyYuvi Jun 28 at 12:28
• I try this, it looks excellent. Many thanks. Also, thanks a lot for the suggestions. – Trick1234 Jun 28 at 12:37

Here is a solution based on \makebox[\linewidth] and aligned:

\documentclass{article}
\usepackage{mathtools}
\usepackage[showframe]{geometry}

\begin{document}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
\begin{enumerate}
\item \makebox[\linewidth]{\displaystyle\begin{aligned}[t] f(X)={} &AD+SF SF SDF+DFDF FA \\ &+SADSADDDDDDDDDDDA D+D DADS AD \end{aligned}}
\item \makebox[\linewidth]{$\displaystyle G(X)=ADSA DASD SAD ASD ASD$}
\end{enumerate}

\end{document}