[Tex/LaTex] Remove space before itemize

itemizelistsspacing

I have defined a \newcommand called \NewEntry that takes two parameters and prints one above the other.

\newcommand{\NewEntry}[2]{
    #1 \\
    #2
}

Calling this command by

\NewEntry{ENTRY}
{\begin{itemize}[topsep=0pt]
\item First Item
\item Second Item
\end{itemize}
}

leads to a vertical space between "ENTRY" and "First item", even though topsep is set to zero.

enter image description here

I would like to remove this space.

If the command is called by

\NewEntry{ENTRY}
{Blah\begin{itemize}[topsep=0pt]
\item First Item
\item Second Item
\end{itemize}
}

then "Blah" occupies the space that I am trying to remove.

enter image description here

A MWE follows:

\documentclass{article}
\usepackage{enumitem}
\setlength{\parindent}{0pt}

\newcommand{\NewEntry}[2]{
    #1 \\
    #2
}

\begin{document}
    \NewEntry{ENTRY}
    {Blah\begin{itemize}[topsep=0pt]
    \item First Item
    \item Second Item
    \end{itemize}
    }
    \NewEntry{ENTRY}
    {\begin{itemize}[topsep=0pt]
    \item First Item
    \item Second Item
    \end{itemize}
    }
\end{document}

Any help would be greatly appreciated.

Best Answer

enter image description here

\documentclass{article}
\usepackage{enumitem}
\setlength{\parindent}{0pt}

\newcommand{\NewEntry}[2]{%
    #1 \par\noindent
    #2}

\begin{document}
    \NewEntry{ENTRY}{}
    Blah
    \begin{itemize}[topsep=0pt]
    \item First Item
    \item Second Item
    \end{itemize}

    \NewEntry{ENTRY}{}        
    \begin{itemize}[topsep=0pt]
    \item First Item
    \item Second Item
    \end{itemize}

\end{document}

itemize starts in a new line by itself, so adding one more \\ in your macro will lead to a blank line. Replacing this with \par\noindent can solve the problem. Further, you may remember adding an empty pair {} so perhaps you might add another argument later.