1

This question already has an answer here:

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 followsenter image description here


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

\item
\begin{equation*}
G(X)=ADSA DASD SAD ASD ASD
\end{equation*}

\end{enumerate}

marked as duplicate by campa, Phelype Oleinik, Raaja, siracusa, Marijn Jun 28 at 12:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

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 \\
&\quad+ SADSADDDDDDDDDDDA D+D DADS AD
\end{align*}


\mathitem
\begin{equation*}
G(X)=ADSA DASD SAD ASD ASD
\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
1

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} 

enter image description here

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