user2930327
user2930327

Reputation:

Using fancyhdr in YAML metadata produces multiple page numbers with Pandoc

I'm using Pandoc to generate a PDF from markdown. When specifying header/footer information in the YAML metadata (as below), I continue to get a page number in the center of my footer (with the text of \fancyfoot[L] written overtop), in addition to the page number in footer on the right that I've specified with \fancyfoot[R].

How can I remove the default page number in the footer at center? If I use \pagenumbering{gobble} it just removes all page numbers, at center and on right.

---
title: Test Title
author: Author Name
header-includes:
    - \usepackage{fancyhdr}
    - \pagestyle{fancy}
    - \fancyhead[L]{Author Name}
    - \fancyhead[R]{Test Title}
    - \fancyfoot[L]{Extra text here}
    - \fancyfoot[R]{\thepage} 
--- 

Currently using Pandoc 1.17.2 on OSX 10.11.6.

Upvotes: 1

Views: 1226

Answers (1)

corix
corix

Reputation: 21

Well, I think this should work if you just give the center field an empty content field. That is at least one way in which it works in Latex and hopefully the same for pandoc.

\fancyfoot[C]{}

Upvotes: 1

Related Questions