Page LayoutRemoving Space between Head and Body

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Removing Space between Head and Body

Post by AleCes »

Hello,

I'd like to remove or at least shrink the blank space between the header and the main body of text.

Code: Select all

\documentclass{book}
\usepackage{geometry}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{FreeSerif}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[CE]{{\leftmark}}
\fancyhead[CO]{{\rightmark}}
\begin{document}
\chapter{Foreword}
Blah
\section{Blah}
Blah
\end{document}
Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Removing Space between Head and Body

Post by AleCes »

I found it out on my own but I write it down here in case it may turn out to be useful for other members.

Code: Select all

\usepackage[headsep=0pt]{geometry}
Thanks everybody! :mrgreen:
Post Reply