I am using a list like this:
\section{My section}
\begin{enumerate}
\item My first item
\item Second item
\end{enumerate}
The problem is that enumerate
produces a vertical whitespace just before the first item.
So if I use
\section{My section}
Some text
\begin{enumerate}
\item My first item
\item Second item
\end{enumerate}
instead of just
\section{My section}
\begin{enumerate}
\item My first item
\item Second item
\end{enumerate}
the first item, "My first item", will have exact same location.
So the list environment seems to reserve a spot for text above it. I have tried using:
\usepackage{enumitem}
\setenumerate{partopsep=0cm, topsep=0cm}
but it doesn't change anything.
I guess I could use \vspace{-some value}
just before my lists, but I need a more generic code, so I have to set the option globally.
Edit
This code:
\documentclass{article}
\usepackage{titlesec}
\usepackage{enumitem}
\titleformat{\section}[leftmargin]{\raggedright}{}{0pt}{}[]
\titlespacing*{\section}{2.5cm}{2.5ex}{0cm}
\setlist[enumerate]{topsep=0cm, leftmargin=0cm, label={}}
\begin{document}
\section{Experience}
Some text
\begin{enumerate}
\item Software Developer
\item Project Manager
\end{enumerate}
\section{Education}
\begin{enumerate}
\item M.Sc.
\item B.Sc.
\end{enumerate}
\end{document}
produces this:
As seen next to "Education", the problem is that the list 'reserves' some space for a paragraph just above it.
\setlist[enumerate]{topsep=0pt]
-- please note that\section
has also a vertical skip!\setenumerate
is deprecated by the way (according to the manual) -- since the spacing belowenumerate
is ruled bytopsep
also changingtopsep
will also modify thebelow skip
as well!