Problem with footer in rmarkdown

rrmarkdown

I have been trying to add a footer to this report, generated with rmarkdown; however, whatever I do, it just doesn't work for me.

---
header-includes: 
  \usepackage{fancyhdr} 
   \usepackage{graphicx}
   \usepackage{eurosym} 
   \usepackage{booktabs,xcolor} 
   \pagestyle{fancy}
   \fancyhf{}
   \fancypagestyle{plain}{\pagestyle{fancy}}
   \fancyhead[LE,RO]{PBM}
   \addtolength{\headheight}{2.0cm} 
   \lhead{PBM - PPM - \today} 
   \renewcommand{\headrulewidth}{2pt}
   \fancyfoot{} 
   \lfoot{PBM- QSP}
   \rfoot{\thepage}
   \cfoot{center}
   \renewcommand{\footrulewidth}{5pt}




title: "report_8"
author: "Erik"
output: pdf_document
---
## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

Best Answer

Just delete \addtolength{\headheight}{2.0cm}

mwe

Related Question