I found this thread that shows how to use the frontmatter to tell Pandoc & LaTex what to do: Adding headers and footers using Pandoc - TeX - LaTeX Stack Exchange
---
title: Test
author: Author Name
header-includes: |
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[CO,CE]{This is fancy}
\fancyfoot[CO,CE]{So is this}
\fancyfoot[LE,RO]{\thepage}
abstract: This is a pandoc test . . .
...
I’ve installed TexLive (I’m on Linux Mint)
If I use this “Test” and “Author Name” show up, but not the header line.
If I delete some stuff so it looks like this:
---
header-includes:
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[CO,CE]{Name}
---
“Name” shows up in the header line (above the title) which is precisely what I want, but then there also appears the Header from the File (the title at the top of the file that comes after #
).
I would like to just see my name at the top, and maybe the page number that appears at the bottom of the page in the PDF.
Any ideas?
Thanks!
Edit: I’ve managed to achieve this:
with this code:
header-includes: |
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf[]{}
\fancyhead[R]{Name \date{\today}}
\fancyhead[C]{\thepage}
\usepackage[a4paper, portrait, margin=1in]{geometry}
\fontsize{12pt}{12pt}\selectfont
\usepackage{setspace}
\doublespacing
---
I don’t understand why the “\date{\today}}” isn’t appearing, but if I delete it, nothing works, so I’m leaving it in.
What I can’t figure out is how to center the whole thing. It’s too far on the left. Any ideas on that?
Thanks!