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

learn more… | top users | synonyms

19
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 ...
23
votes
3answers
21k 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 ...
16
votes
5answers
7k 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 ...
12
votes
3answers
6k 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 ...
26
votes
1answer
16k 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} ...
5
votes
1answer
7k 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.
24
votes
1answer
716 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 ...
9
votes
2answers
540 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 ...
14
votes
3answers
16k 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 ...
6
votes
1answer
2k 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 ...
7
votes
2answers
13k 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 ...
2
votes
2answers
1k 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 ...
8
votes
1answer
3k 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
410 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 ...
4
votes
1answer
448 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 ...
10
votes
2answers
3k 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 ...
5
votes
2answers
9k 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} ...
9
votes
2answers
472 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 ...
8
votes
1answer
3k 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 ...
5
votes
2answers
4k 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}} ...
0
votes
1answer
293 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 ...
6
votes
1answer
344 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 ...
4
votes
2answers
1k 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
11k 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 ...
4
votes
1answer
4k 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
2answers
1k 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
424 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
955 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 ...
1
vote
3answers
371 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. ...
1
vote
2answers
731 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 ...
0
votes
1answer
810 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 ...
7
votes
1answer
337 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 ...
11
votes
1answer
1k views

Page numbering at the top centre

I'm trying to place page numbering at the top centre (as required by submission guidelines at my university). It should be a very easy thing to do, but it seems impossible... I spent a day ...
9
votes
1answer
499 views

fancyhdr not centering after changed geometry

I have a document with different page margins, so I have to change geometry settings after fancyhdr loaded. However, the width of header after geometry is not correct. \documentclass[12pt]{article} ...
6
votes
1answer
107 views

fancyhdr page decorations and page numbering

Hello there are several examples of decorative pages. Most examples work with a single page,when numbering is not necessary. When i try to make for every page. It does not work, or i have problems ...
4
votes
2answers
4k views

Custom header/footer rules (fancyhdr?)

I want to be able to customize my header/footer so far that I can change the rules that separate it from the document. Look for example at http://ww1.microchip.com/downloads/en/appnotes/00734b.pdf ...
10
votes
2answers
4k 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? ...
10
votes
2answers
17k 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 ...
8
votes
2answers
207 views

Page number in the margin and separator

I want to produce this kind of header. My first attempt includes the use of fancyhdr package but still I can't figure out how it is possible to move the page number in the margin and put the | bold ...
8
votes
1answer
2k 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 ...
7
votes
3answers
3k views

Graphics/logo in headers

I am writing a short note. I would like to include a graphics file with a logo in the header of all pages including the front page. The logo is roughly the size of the box generated in the example ...
6
votes
3answers
2k views

Right align inside header

I have a header, prepared using fancyhdr. I would like the first row of the left header to be right-aligned with the second row of the left header. In the following MWE I would like "My City" to be ...
3
votes
1answer
167 views

How to make different headings on even and odd pages

I want to make some headings on my thesis. I use the following codes in my cls file. \pagestyle{fancy} \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. #1 }}{}} ...
2
votes
1answer
444 views

\markboth is not working when using \chapter and \section

I am having a problem when adding \chapter and \section in the document. \markboth is not working when I compile it. I have got a link Why is \markboth not working?. But there is no solution about my ...
2
votes
1answer
2k views

fancy header/footer on pages with chapter beginning

I'd like to produce report class document with one style of page numbering. I've declared: \usepackage{fancyhdr} \fancyfoot[R]{\thepage} \pagestyle{fancy} but on pages with new chapter the page ...
8
votes
4answers
3k 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 ...
7
votes
1answer
450 views

Page styles only work for \thispagestyle under afterpage

Using afterpage to set a page style after some page only works for \thispagestyle, but not for \pagestyle. Why is that? How can I make it work? \lipsum[1-20] produces 4 pages of text, Lorem Ipsum ...
6
votes
2answers
99 views

Automatically remove ruler when no header is present

This is a question triggered by Automatically remove page number in one-page documents. When activating the fancyhdr package, it is necessary to clear the headers, which I do below with \fancyhf{}, ...