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

learn more… | top users | synonyms

30
votes
1answer
19k 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} ...
24
votes
3answers
24k 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 ...
24
votes
1answer
728 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 ...
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 ...
17
votes
5answers
8k 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 ...
14
votes
3answers
18k 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 ...
13
votes
1answer
6k views

How to add a horizontal line above the footer with fancyhdr?

How to add a horizontal line above the footer using fancyhdr, just like the line present below the header?
12
votes
3answers
7k 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 ...
12
votes
3answers
3k views

Non-special first page in \documenclass{article}

I'm new to TeX and LaTeX, so I might not explain it all that well. I'm trying to put pagenumbers on each footer in the form "Page X of XX" using fancyhdr. So far I have this: \cfoot{Page \thepage\ ...
12
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 ...
11
votes
3answers
7k views

Headrule length in fancyhdr

Using the fancyhdr package, is it possible to change(increase or decrease) the headrule length without changing the header length? In the picture related, one can see that the headrule rectangle(in ...
11
votes
2answers
6k views

Top right side page numbering

I want the numbers of pages to be placed at the top right side. I try to do it like this \documentclass[12pt]{article} \usepackage{fancyhdr} \begin{document} \lhead{} \chead{} \rhead{\thepage} ...
10
votes
2answers
18k 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
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?
10
votes
1answer
3k views

header spacing trouble

I'm using the fancy header package, yet I've also adjusted all of my margins, to allow more text on each page as there is no need for the excessively large margins. I've run in to some trouble with ...
10
votes
2answers
519 views

Cross-references in headers, clash between fancyhdr and hyperref

I am writing my thesis and using fancyhdr for the headers. Just the standard "Chapter name on odd pages and section name on even pages". I also need to use the hyperref package to break up long urls ...
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
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
422 views

Annoying problem with fancyhdr and auto-generated chapters

I have been facing an annoying little problem. I'm using fancyhdr to customize the headings on my thesis but according to the package documentation it is unable to remove the "uppercasedness" of the ...
9
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 ...
9
votes
2answers
799 views

chapter heading appearing in appendix

I am using \fancyhdr package for the headings and report as a document class samplecode is given below \documentclass[a4paper,11pt]{report} \usepackage[toc,page]{appendix} \usepackage{fancyhdr} ...
9
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 ...
9
votes
1answer
394 views

Page header with box sections & page border

So I'm currently working on converting some documents used in our university to use LaTeX, and I'm stuck on a bit of a hangup. I've been able to nail down all the basics, using plotting, etc; but I ...
9
votes
2answers
281 views

Decrease space between paragraph and header

How can I decrease the white space marked with blue? I tried \vspace with negative marks but to no avail (it normally does the trick but not this time). I am using the 'fancyhdr'-package. ...
9
votes
1answer
602 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} ...
9
votes
2answers
604 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
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 ...
9
votes
2answers
571 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
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
2answers
107 views

Tcolorbox in footer with nobeforeafter adds space to other elements in footer

EDIT: \documentclass[10pt]{article} \usepackage{geometry} \usepackage[skins]{tcolorbox} \usepackage{fancyhdr} \renewcommand{\footrule}{\hbox to\headwidth{\color{blue}\leaders\hrule height ...
8
votes
2answers
14k 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 ...
8
votes
1answer
3k views

How to add a picture to fancyhdr *header* (and align in the top right)?

In the MWE below, the blue square aligns according to plan, whereas the dummy-image doesn't, see screenshots below. How to re-code so that the dummy-image "A" is aligned like the blue square? ...
8
votes
3answers
546 views

Preserve page numbering in fancyhdr

I'm using the fancyhdr package to include a header on each page. In order to surpress the section title also being cited in the header of each page, I'm using the command \fancyhf{}, however this also ...
8
votes
2answers
455 views

Generating QR-code in header impossible?

I've got a strange issue with the packages pstricks/pst-barcode and fancyhdr. Here is what I like to do: A custom header for every page, Name on the left, QR-code on the right. Although the QR-code ...
8
votes
2answers
213 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
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 ...
8
votes
1answer
2k views

Fancyheaders and special pages: contents, bibliography

I use the fancyhdr package and it works in general. Unfortunately, some "special" pages' headers, like those of the contents and bibliography, seem to resist every approach to format them. They show ...
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 ...
8
votes
1answer
237 views

Distance between top edge of paper and header

EDIT : Please apologize me. I forget to add two lines to MWE I think very essential to handle the problems. Please re-check the MWE. There is parameter defining distance between bottom edge of top ...
7
votes
3answers
982 views

My footer disappears when I increase headheight

I have created a custom simple layout with the fancyhdr package. Because the header I must use is somewhat big, LaTeX instructed me to increase the headheight to at least a minimum value. The problem ...
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 ...
7
votes
2answers
5k views

How to get only “Chapter 1. The title of the chapter” in the left of header

I am trying to use fancyhdr, but I can't get it to not show the section and to keep the normal case for title and 'Chapter'. How can I have my heading to be "Chapter 1. The title of the chapter" ...
7
votes
1answer
2k views

fancyhdr: How get part on even and chapter on odd pages

I am trying to use fancyhdr to set the part no. and name on my left pages and chapter no and name on the right pages. My document is ...
7
votes
1answer
3k views

How do I increase the spacing between header text and the 'headrule' line with fancyhdr?

This is going to be something so obvious that I'm almost embarrassed to ask! I've been using fancyhdr to put some fancy headers and footers in my thesis template – in fact, doing what it says on the ...
7
votes
1answer
510 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 ...
7
votes
2answers
499 views

Switching from memoir to report

I've been using memoir for a while now, and have started facing problems with modified output routine, this has forced me to seriously consider switching (back) to report class. What I'm going to ask ...
7
votes
1answer
354 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 ...
7
votes
2answers
873 views

Simple school style report headers

I want to use LaTeX to do a school paper. I need the professor name the class name and class time all to be in the upper right corner of every page. The fancyhdr package, at least in it's default ...
7
votes
1answer
350 views

lost formating on one page

Formating on one page is broken, namely in header part there is missing one parameter (word) and the columns looks differently as shows the picture bellow. How can I correct the formating? The script ...
7
votes
1answer
777 views

How to use short subsection title in header but not in table of contents?

I have a (onesided) document with fancyhdr and pagestyle fancy so it displays the section-title on the right header and the subsection-title on the left header. If section and subsection titles are ...