\part
. I want it to look more or less like a section with a larger font. For this I use titlesec. It works fine, except that LaTeX will insert additional space if the part start at the top of a new page. Why is that and how can I avoid it?MWE:
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{titlesec}
\titleformat{\part}[hang]{\scshape\Large}{Part~\Alph{part}}{2ex}{}{}
\titlespacing{\part}{0pt}{0pt}{*3}
\titleformat{\section}[hang]{\bfseries\large}{Section~\arabic{section}}{2ex}{}{}
\titlespacing{\section}{0pt}{*2}{0pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\part{At the start of a page \ldots{} space above}
\lipsum[1]
\pagebreak
\lipsum[1]
\part{In the middle of a page looks ok}
\lipsum[1]
\pagebreak{}
\section{At the start of a page looks ok}
\lipsum[1]
\end{document}