{header-footer} is about customizing headers and footers, i.e., choosing a page style for certain pages (e.g. empty, plain, headings) and (for the styles employed) placing information like the current section title and page number. Popular packages are {fancyhdr}, {scrlayer-scrpage}, {titleps}, and ...

learn more… | top users | synonyms (2)

77
votes
7answers
22k views

How can I add “page # of ##” on my document?

I want to add a footer to my document displaying the current number out of total number of pages. How do I do that?
40
votes
4answers
25k views

How can I display a short chapter name in the header and a long chapter name in the ToC?

I am writing a book and one of my chapter has a very long title. As it can't be displayed correctly on the top of even pages, I provide a "short title name" via the \chapter[short title]{long title} ...
36
votes
1answer
23k 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} ...
33
votes
3answers
77k views

Headers and Footers

I want a header similar to Microsoft word that appears at the top of each page. However I do not want this on the first page. I would like to have the name of the project on the left, my name in the ...
29
votes
3answers
30k 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 ...
28
votes
5answers
7k views

How to remove headers and footers for pages between chapters?

To ensure that a new chapter starts on a right-hand page, the book class (and the report class with the options twoside and openright) will insert blank pages between chapters if necessary. However, ...
25
votes
1answer
752 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 ...
24
votes
2answers
19k views

Creating unnumbered chapters/sections (plus adding them to the ToC and/or header)

I'm using the report document class for a thesis, and I need to add things like "Acknowledgements" and an "Introduction". I noticed that there is an \abstract command which would have been wonderful ...
24
votes
2answers
528 views

Breadcrumb hyperlink header

I wish to put breadcrumb navigation with hyperlinks into the header of each page. Clicking on each part, chapter, section will take you to the beginning of that part/chapter/section. I'm already ...
21
votes
5answers
2k views

How I can automatically add a page if the total number of pages is odd?

I need automatically add a blank page (also without document header, numbering and footer) at the end of the document, if the total numbers of pages is odd. How I can do that? And preferably without ...
21
votes
2answers
2k views

Chapter Title in rotated vertical box at the margin

I am using the book document class. I would like to have Chapter name (Interduction, Results, Discussion, ...conclusion...) to appear in every page, in the right side small vertical (color filled) box ...
20
votes
3answers
407 views

Strange behaviour with PGF/TikZ and Plain TeX output routine

I noticed a strange behavior when running PGF/tikZ with pdfTeX on my Debian box : a simple session without tikz: pdftex **\relax *Hello World *\bye do output the page number on the page footer. On ...
20
votes
3answers
12k views

Why doesn't \pagestyle{empty} work on the first page of a chapter?

Here's a minimal case of the problem: \documentclass{book} \pagestyle{empty} \begin{document} \chapter{The first} This page has a page number\ldots \newpage \ldots but not this one. ...
19
votes
3answers
15k views

Add a new empty page

I have a .tex file which is like my main, \documentclass[spanish]{article} \usepackage{times} \usepackage{amsmath} \usepackage{graphicx} ...
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 ...
19
votes
2answers
14k views

Reproducing an official letterhead

My university, just like many other institutions, isn't really aware of something called LaTeX. Therefore, the letterhead comes only in MS Word. The following (low quality) image is the best guide I ...
19
votes
1answer
464 views

Indexing an interval of words on top of every page

Friends, I'm curious on how to do the following in LaTeX: Dictionaries have two words on the top of each page, meaning the interval of words to be found on that specific page, e.g., In the figure, ...
18
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 ...
18
votes
2answers
11k views

Suppress page numbers in article documentclass

I want to suppress page numbers. I am also using \maketitle command which seems to trigger the problem. MWE: \documentclass[a4paper,10pt,english]{article} \title{My title} \begin{document} ...
18
votes
2answers
2k views

\pause in tikzpicture breaks footline

I've discovered that you can \pause within a tikzpicture, which works well until I switched the theme to one with a footline. I've created a "test case" that illustrates the problem. ...
17
votes
3answers
4k views

Suppress page number for a single page that only contains one large table?

I have a large table that uses up the whole space on a page. Unfortunately, the table also covers the page number, which is shining through. I don't want to split the table across two pages, hence I ...
17
votes
3answers
1k views

How to add “cont.” section title to the top of pages?

I have a document that contains few small sections. What I would like is if the section name was repeated at the top of page body (not in the header), if new section doesn't start on that page. And ...
17
votes
2answers
16k views

How to remove footline on the title page of beamer slides

I am using the default theme, and use the following to customize the footline, \useoutertheme{infolines} \setbeamertemplate{footline}{\hspace*{.5cm}\scriptsize{\insertshorttitle \hspace*{50pt} ...
17
votes
2answers
2k views

Creating letters with zero-margin colored headers, in addition to the regular letterhead

I'm trying to use LaTeX for creating corporate letters. What I have found is that there are many tools to write letters, but they are mostly focused on letters of more personal nature rather than ...
17
votes
2answers
1k views

Hyperref Link Spans a Pagebreak, Looks Ugly

I'm using hyperref for links in pdflatex and I have the following problem: when a bibliography citation spans across a page-break (which usually occurs with long author names), then an additional ...
16
votes
3answers
8k views

When do I need invoke \clearpage manually?

I am not sure whether invoking \clearpage is necessary or redundant at many places in my input .tex files. Here I will ask you, in what condition is invoking \clearpage necessary? I hope I get a ...
16
votes
2answers
3k views

Attached external pdf file is not showing page number

I am writing my thesis. I have a "main" LaTeX file from where I am calling (attaching) pdf file. But the attached pdf file is not showing any page number. Also, it is not showing other page style I ...
16
votes
2answers
776 views

Automatically remove page number if document has only one page (but not if two)

I write a lot of documents (agreements) based on memoir with the article option. Normal pagestyleis plain (page number centered in the footer). Sometimes a document is only one page long, and a page ...
16
votes
1answer
782 views

Displaying the range of sections on the page in the header

I would like to have on each page the range of sections covered by it displayed, opposite of the page number and accompanied by the name of the first new section (if there is a new one) starting on ...
15
votes
4answers
671 views

Show page number as a “percent complete”

I want to show in the page foot the current progress of the document. For example, if the document contains 200 pages, then I want the foot to show 11.5% in the page 23. Edit: I'm also interested the ...
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 ...
15
votes
2answers
3k views

How to get rid of reference in beamer presentation menu

The following code causes the text References in the top left hand side of the slide. I've tried lots and lots of things but I don't seem to be able to get rid of the text. (Redefining \bibname ...
15
votes
1answer
731 views

How could one setup a layout for a dictionary? (if possible)

A friend asked me if I knew any free software for creating dictionaries - which is good at saving space (reduce total number of pages). Example: I suppose this might be possible in LaTeX. ...
15
votes
1answer
953 views

Create a fancy page layout

In the following picture (desired layout) the grayed area is reserved for the header. It is supposed to be fancy looking with tikz pictures, chapter/section names with pretty fonts etc. The ...
14
votes
3answers
947 views

How to set colored ruled margins for different pages?

I want to write a LaTeX document, and I want to have document rules (colored margins distinguishing sections and/or even/odd pages). Here is a model of what I have in mind: How can this be ...
14
votes
1answer
4k views

\pagestyle{empty} doesn't seem to work for page with \maketitle

In the LaTeX document pasted below, I still see page numbers upon compiling, even though I've included a \pagestyle{empty} command below the \maketitle command. Any ideas what I'm doing wrong? Thanks ...
14
votes
1answer
382 views

Different image in every page's footer

I found Using fancyhdr to create an image based header and footer which is helpful and gave some ideas but I want to basically put in the bottom right or center of the footer a different image file ...
14
votes
1answer
943 views

How to draw a simple but beautiful decorative head-rule?

The picture shown below is the desired simple head-rule, but the rule width should be much thinner like 1pt. Real one: So how to use Tikz or other packages to draw this kind of line as a ...
14
votes
1answer
2k views

Header and page numbers with pdfpages

I have a chapter of attachments which contains pdf files in this format, using the awesome pdfpages package: \chapter{Title} Lots of multipage pdfs following ...
14
votes
2answers
17k views

How to add running title and author

My question is this: how can I add the co-called "running" title and author name on the top of each page? This feature is often used in journals so that the short running title is shown on the top of ...
14
votes
5answers
7k views

How do I insert text into the footline of a specific slide in Beamer?

I'm trying to insert references into a beamer footline. These references are different for each slide, so I cannot include them in the footline template - unless there is then some way to later define ...
13
votes
5answers
1k views

“Foldable” “Booklet” like Toodledo's one (pocketmod)

How to achieve in pdfLaTeX foldable booklets similar to those provided by Toodledo ? (to make question usable to others LuaTex, ConTeX and other systems answers are highly welcome) Note: look, how ...
13
votes
4answers
332 views

Adding page number to the even page right after \part

Friends, I've never used \part{} before, so bear with me. =) Consider the following code: \documentclass[twoside]{book} \usepackage{lipsum} \begin{document} \pagestyle{empty} \begin{titlepage} My ...
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 ...
13
votes
1answer
7k 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?
13
votes
2answers
5k views

How to translate and rotate the heading of landscaped pages?

Objective How to change the heading of landscaped pages from to ? Minimal Code \documentclass{book} \usepackage[a5paper,hmargin=3cm,vmargin=5cm]{geometry} \usepackage{lscape,lipsum} ...
13
votes
2answers
7k 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} ...
13
votes
1answer
3k views

How to get a colored box as the header?

I want to produce this particular template in LaTeX. With no page numbering, and rectangles in colours in a a4paper.
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 ...
12
votes
3answers
6k views

How can I add text in the top right corner of a page _without_ using fancyhdr

I want to put a block of text into the top right corner of my document (which uses the article class). The specifications of the document's formatting are very detailed, and it has taken me about 2 ...