3
\documentclass[11pt,]{article}
\usepackage{titlesec}
\titleformat{\section}[leftmargin]{\normalfont
\titlerule*[.6em]{\bfseries.}%
\vspace{6pt}%
\sffamily\bfseries\filleft}
{\thesection}{.5em}{}
\titlespacing{\section}
{8pc}{1.5ex plus .1ex minus .2ex}{1pc}
\begin{document}

\section{This is a section heading}
\begin{enumerate}
\item This is the first item and it is too low on the page...
\item This is another item
\item This is another item
\item This is another item
\item This is another item
\item This is another item
\item This is another item
\end{enumerate}
\section{This is a section heading}

This paragraph is fine ...
\end{document}

Why am I getting extra vertical space before a list but not before a paragraph?

1
  • Not sure of a general fix, but you can place \vspace{-23pt} after the \begin{enumerate}. Feb 17 '16 at 12:26
5

Just add this code between \section{…} and your list without adding blank lines:

...
\section{This is a section heading}
\leavevmode\vspace*{-\dimexpr\baselineskip+\topsep\relax}
\begin{enumerate}
...

enter image description here

6
  • I can't reproduce this with your suggestion: \documentclass[11pt]{article} \usepackage{titlesec} \titleformat{\section}[leftmargin] {\normalfont\titlerule*[.6em]{\bfseries.}\vspace{6pt}\sffamily\bfseries\filleft}{\thesection}{.5em}{} \titlespacing{\section}{8pc}{1.5ex plus .1ex minus .2ex}{1pc} \begin{document} \section{This is a section heading} \leavevmode\vspace*{-\dimexpr\baselineskip+\topsep\relax} \begin{enumerate} \item This is the first item and it is too low on the page... \item This is another item \end{enumerate} \section{This is a section heading} This para is fine \end{document} Feb 17 '16 at 21:27
  • I tried your code, and had an error message with part of the code containing invisible characters, it seems. It compiles fine after I've deleted these characters. Could you test with the \titleformat{…} command replaced with this one: \titleformat{\section}[leftmargin] {\normalfont\titlerule*[.6em]{\bfseries.}\vspace{6pt}\sffamily\bfseries\filleft}% {\thesection}{.5em}{} ? (Note: I'm utf8 encoded).
    – Bernard
    Feb 17 '16 at 22:14
  • I can't compile your code either because there is a 'ZERO WIDTH SPACE' (U+200B) after \filleft}. I didn't have it in my original code, sorry for inconvenience. I post an answer and a snap shot to show what I mean. Feb 17 '16 at 22:32
  • @ArashEsbati It works fine for me.
    – cfr
    Feb 17 '16 at 23:37
  • Please do let me know if you object to my having edited your answer for clarity.
    – cfr
    Feb 17 '16 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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