Page LayoutRemove line at top of page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
k123123
Posts: 6
Joined: Tue Aug 20, 2013 12:35 pm

Remove line at top of page

Post by k123123 »

Sorry if answered before, I didn't quite know what to search for...

The problem is either related to 'geometry' or 'fncychap' -- the pages with the Chapter headings have nothing at the header, but the following pages have a line at the top of the page... How do I remove this please?

Here is a cut-down version of my Thesis.tex

Code: Select all

\documentclass[a4paper, oneside, 11pt, openany]{book}
\usepackage{graphicx, natbib, amssymb, textcomp, amstext}
\usepackage{layouts}

\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[top=2cm, bottom=2.5cm, footskip=1.2cm, left=4cm, right=2.2cm]{geometry}	% shows margins, sets margin widths etc


\usepackage[Bjornstrup]{fncychap}
\ChTitleVar{\raggedleft\Huge\sffamily\bfseries}

%force pagenumbering at bottom/centre of each page
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhf{}
\cfoot{--- \thepage\ ---}

\usepackage{lipsum}
% generate nonsense latin text

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\mainmatter


\chapter{The first chapter}
\section{First section}
\lipsum[1-5]

\section{Second section}
\lipsum[6-12]

\chapter{The second chapter}
\section{First section}
\lipsum[1-5]

\section{Second section}
\lipsum[6-12]

\end{document}

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

mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Remove line at top of page

Post by mas »

Add this to the preamble:

Code: Select all

\renewcommand{\headrulewidth}{0pt}
It will remove the head rule that you are seeing.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
k123123
Posts: 6
Joined: Tue Aug 20, 2013 12:35 pm

Re: Remove line at top of page

Post by k123123 »

Thanks for that -- works perfectly
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Remove line at top of page

Post by mas »

k123123 wrote:Thanks for that -- works perfectly
Then, please mark the topic as Solved.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Post Reply