{fancyhdr} is a package which allows the creation of custom page headers and footers.

learn more… | top users | synonyms

19
votes
5answers
9k views

How to get part name in LaTeX ?

Actually I am using the fancyhdr package, and trying to put the current part name in the right header. I know that \rightmark and \leftmark are used to represent the current section and chapter ...
30
votes
3answers
34k views

Custom first page with fancyhdr

I'm using the package fancyhdr to format my footers and headers, with my name in the header and a n of m pages format for the footer. Like so: \pagestyle{fancy} \fancyhf{} % clear all header and ...
41
votes
1answer
27k views

How to remove the top horizontal bar in fancyhdr?

When using fancyhdr, how do you remove the top horizontal rule? I do not want a header at all, just a footer. This is what I do now: \documentclass{article} \usepackage{fancyhdr} \pagestyle{fancy} ...
20
votes
2answers
3k views

How to customize headers and footers?

I'd like to modify the contents of my headers and footers - e.g., to display the current chapter and/or section title or to change the pagination alignment. How can I do that? I've noticed the ...
9
votes
2answers
2k views

How to remove header on the page with big picture?

Can you help me to remove header from the page where is only one big picture? I tried \thispagestyle{empty} but it removes a header on the next or previous page. I don't know how to remove it exactly ...
15
votes
3answers
20k views

page number position

I am working on a long document in LaTeX with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right ...
2
votes
2answers
2k views

fancyhdr - anomalous behaviour on first page

I am having trouble typesetting multi-line headers using fancyhdr The header on the first page behaves differently than the header on subsequent pages. The first page header has no depth, but produces ...
13
votes
3answers
9k views

Using fancyhdr to create an image based header and footer

I'm trying to generate a latex report (via Sweave and R) where the header of the document is an image that covers everything (including the top/left/right page margin) and the footer covers everything ...
8
votes
1answer
11k views

Suppress Fancy header and footer on first page only.

How to suppress the fancy header and footer on the first page? On other pages, they should be visible.
26
votes
1answer
782 views

Non rectangular page geometry

I am interested in using non-rectangular page geometries for my flipbook idea (in fancyhdr with image and flowing text). The page geometry that I'm after is that the text has a little rectangle ...
6
votes
2answers
4k views

How to determine head height automatically

I'm creating three documents with three different headers, containing images or large banners. Is there a way to determine the head height automatically or even better a way to change the head height ...
9
votes
1answer
4k views

geometry, fancyhdr: \fancyfoot[C]{\thepage} is not really centered

After switching from the report class to the book class and starting to use the fancyhdr package to control headers/footers, the page numbers in my footers are no longer centered. This is my fancyhdr ...
6
votes
1answer
585 views

fancyhdr plus fontsize 12pt causes varying vertical alignment of sections

Looking at the example provided in Different headers for different chapters, I noticed something strange: The vertical alignment of sections is varying. I was able to strip the effect down to the ...
11
votes
2answers
645 views

How to change header to list first section on page and not last section

The standard use of header/footer is to display the chapter/section information, which normally begins on a new page. What I would like to do is to have the header show the first question that is on a ...
8
votes
2answers
17k views

Define different heights for head and foot

is it possible to define different \headerheight for head and foot respectively? For example, there is a logo image in the header which needs a large \headerheight and only text is in foot which needs ...
10
votes
2answers
6k views

Problem with the header/ footer width

I have recently started using the geometry package to format the margins of my documents. Although, I've noticed that the width of the header/ footer remains the same. How can I correct this? ...
9
votes
2answers
927 views

Header not displaying correctly on chapter page due to subsection

(Complete source code below.) (Note: Not sure if I am using LaTeX or just TeX. I am editing with TeXworks, as TeXStudio was not rendering what I typed without +20 seconds of lag.) I apologize if ...
9
votes
4answers
4k views

How to cut a section title in the header

I redefine my headers as in the following MWE: \documentclass[12pt]{article} \usepackage{xstring} \usepackage{fancyhdr} \fancypagestyle{monstyle}{% \fancyhf{} % remove everything ...
8
votes
2answers
5k views

Fancyhdr does not apply same header/footer on chapter and non-chapter pages

I have a problem with the fancy package: I use the report documentclass and I have a chapter, a lot of text and then a new page starting with a section (or the next page has no chapter starting on ...
4
votes
1answer
672 views

Header and Footer on multipage listoffigures

I've using the fancyhdr package to modify the header and footer. If my \listoffigures spans multiple pages then the header and footer on page one of the LoF is not fancy. The TeX example below ...
3
votes
2answers
249 views

Replacing \fancyhdr with \titlesec in complicated design documents

Thes page on the picture below (from this post) has been created within \fancyhdr package, but I need to something like this keeping incompatible \titlesec usage and using twopage layout. Really, I ...
2
votes
1answer
44 views

Spacing between lhead and rhead content while wrapping

I am having troubles with wrapped text in the header. At the moment it looks like this: And this is how I would like it to look like: This is my code: \documentclass[12pt,a4paper]{article} ...
11
votes
2answers
4k views

Different headers for different chapters

I cannot find in any latex forums a solution for my problem with chapter-specific headers. I am compiling a one-sided report with various chapters. For all the chapters, I have the header showing the ...
10
votes
2answers
2k views

Want \section* to change the page header

In a book, I have several numbered sections followed by an unnumbered section. I have placed an \addcontentsline following the \section* that introduces the unnumbered section, so that it will appear ...
8
votes
1answer
3k views

fancyhdr headings , how to remove the number of the section

I'm French so it's not easy to explain my problem but I'll try. I use fancyhdr to make my own headings (book class). I want the section's title at the right of the heading in small caps, and only in ...
5
votes
2answers
13k views

How to set the header font size using fancyhdr package?

Basically, I want the header fonts to use a different (smaller) font size than the size I set using \documentclass. What should be the option I'd be using ? \documentclass[12pt]{article} ...
15
votes
2answers
20k views

How to move page number?

I want to change the position of the page number. I've read around here that some suggest to use the fancyhdr package, but I don't want to use it – I'm a beginner to LaTeX so I don't want to use a ...
10
votes
2answers
6k views

How can I get no header but still get “page x of y” in footer?

I'd like to get "page x of y" in a footer on each page, and the way I've found is to use: \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \cfoot{Page \thepage\ of \pageref{LastPage}} ...
8
votes
1answer
4k views

Replacing fancyhdr with scrpage2

I'm trying to reduce the number of packages I'm loading in my documents and I read on the KOMA documentation (and elsewhere) that it can define page styles better than fancyhdr. But each time I try to ...
7
votes
1answer
649 views

Chapter Thumbs or Tabs in Book Class

I'm currently finalizing a book, and would like to add chapter thumbs or tabs to the document. While I've found a fair number of packages which are likely capable of doing so, I can't seem to get the ...
6
votes
1answer
16k views

sectionname + number in header with fancyhdr

I want to have section name + number on the left side in the header, and a predefined text on the right side. Also want to have subsection / subsubsection name + number, if the subsection is long ...
3
votes
1answer
8k views

Increase height of fancyhdr header

How would one increase the height of the \fancyhead{} so that the text in the main body, doesn't collide with the title? I have the following MWE: \documentclass[a4paper,10pt,oneside]{article} ...
2
votes
1answer
431 views

How to write custom footer for some pages

I am using fancyhdr to hide header and footer in some pages but I also want to write custom footers for certain pages. Is there an easy way to do it? Or is there any way to put define text in the ...
1
vote
1answer
89 views

How to include headers in first page of list of tables ,contents, etc

\documentclass[12pt,a4paper]{report} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{fullpage} \usepackage{sectsty} \usepackage{tocloft} \usepackage{epstopdf} \usepackage{fancyhdr} ...
6
votes
1answer
408 views

Hyperlinked sectionnames in fancyheader

I am trying to create a header that consist of chaptername and sectionname (chaptername:sectionname) both of them a hyperlink to chapter and section respectively. I am using Hungarian language so ...
5
votes
2answers
352 views

Different margins in title and chapters

I am struggling here with adapting school template for my document. The problem is that I need different margins on the title and on the chapter pages. Here is the code. On the title page is all easy. ...
4
votes
1answer
5k views

fancyhdr: Section number, Section, colon and subsection in header

I am a bit confused with the fancyhdr options. I currently have this style for my headers: MWE: \documentclass[12pt,oneside]{book}%use oneside to ensure no blanks\ \usepackage[text={5.45in,8.5in}, ...
4
votes
1answer
2k views

Problem with multiple fancyheader page styles

I want to use multiple fancyheader styles in my document. I've run into a problem that seems to be a bug to me. The code below doesn't compile with latex; it seems stuck in an infinite loop. ...
3
votes
1answer
353 views

Nomenclature header problems

I'm writing a document in book class, using the fancyhdr package. I have both an index, and a symbol list, for which I use the imakeidx and nomencl packages. I had problems with getting the right ...
3
votes
1answer
2k views

How to remove 'Chapter 1.' from 'Chapter 1. Introduction' while using \leftmark?

MWE is below: \documentclass{report} \usepackage{fancyhdr} %\newcommand{\currentchapter}{} %\let\oldchapter\chapter %\renewcommand{\oldchapter}[1]{\oldchapter{#1}\renewcommand{\currentchapter}{#1}} ...
3
votes
2answers
2k views

Fancyhdr footer not working on pages where a chapter does not begin

I'm using fancyhdr to put a text and page number on every page: \usepackage{fancyheadings} \fancypagestyle{plain}{ \fancyhf{} \lhead{section \bfseries \thesection} \chead{CS04-708 Main Project, ...
2
votes
1answer
470 views

Why \hyperlink{\rightmark}{} does not work in fancyhead (and inside some other macros)?

\fancyhead[LO,RE]{\hyperlink{\rightmark}{\bfseries\rightmark}} (\leftmark is all the same) cause error: TeX capacity exceeded, sorry [input stack size... Why? (here, \rightmark has double ...
2
votes
1answer
1k views

How to get header and footer over ToC, LoF and Nomeclature?

I would like to know how we include header and footer over Table of Contents, List of Figures and Nomenclature? Do we need to renew any command? or any package is used to do that? Sample script would ...
2
votes
2answers
854 views

fancyhdr with image and flowing text

I want to add a flipbook to my document. Everything seems to work (adding the write pictures. The only thing I'm looking for is making the text flow on every page around the image inserted with ...
1
vote
1answer
194 views

avoid \headrulewidth appearing at chapter beginning

I am using the following code set my headers. \fancypagestyle{plain} \fancyhf{} \pagestyle{fancy} \fancyhead{} ...
1
vote
2answers
190 views

Problems with header and footer in documentclass book

I tried to use a header and footer layout I found here on this website. But I have some problems with changing the code to what I want. I want the pagenumbering to be like page x of y in the footer. ...
1
vote
3answers
683 views

Change linewidth for the whole document, while keeping fancyhdr wide?

Somebody noticed that \abstract changes the linewidth for the whole document (here). The problem was the syntax: with correct syntax as below this is avoided. \begin{abstract} This is an abstract. ...
0
votes
1answer
2k views

How to insert footer in first pages of chapter?

I am using fancyhdr to make header and footer for pages. In the minimal example the footer is not appearing in the first page of chapter. I want footer to be appear in the first pages of the chapter ...
11
votes
2answers
3k views

Alternatives to the horizontal line in fancyhdr

I'm looking for a more fancy alternative to the default (read boring) horizontal line produced under the fancyhdr package. How creative can we get?
7
votes
1answer
394 views

How to display unprinted text in headers?

I use fancyhdr to display first and last headword from my dictionary in the header section. The problem is that the headwords in the dictionary may contain special symbols (see example picture)) that ...