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

learn more… | top users | synonyms

29
votes
3answers
31k 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 ...
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 ...
37
votes
1answer
24k 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} ...
18
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 ...
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
19k 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
8k 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 ...
6
votes
1answer
10k 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.
25
votes
1answer
757 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
1answer
545 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
620 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 ...
6
votes
1answer
3k 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 ...
8
votes
2answers
16k 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 ...
9
votes
2answers
813 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 ...
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 ...
8
votes
2answers
4k 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
641 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
209 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 ...
10
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 ...
5
votes
2answers
12k 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} ...
14
votes
2answers
19k 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
5k 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 ...
6
votes
1answer
15k 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
6k 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} ...
1
vote
1answer
406 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
395 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
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
311 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
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
460 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 ...
1
vote
2answers
154 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
598 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
828 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
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
2k 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
378 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 ...
13
votes
1answer
2k 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
789 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} ...
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 ...
7
votes
1answer
1k views

Tables as Header and footer

I've been struggling with my .tex for quite some time now, and decided its time to look for help. This is the situation: all docs here (my office) need to bring, as header, a table (3 columns) which ...
6
votes
1answer
210 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 ...
6
votes
1answer
3k views

Format page numbers

How can I control look of the page numbers? For example, in the MWE below: \documentclass[12pt]{article} \usepackage[backend=biber]{biblatex} \usepackage{fancyhdr} ...
4
votes
2answers
8k 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
5k 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? ...
8
votes
2answers
245 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 ...