Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add an image as a header/footer in Markdown for a PDF document

Tags:

markdown

r

knitr

I want to add images as headers and footers (in keeping with my organizations visual identity) to PDF reports. I've managed to do it in Sweave but I'd also like to be able to do it using just Markdown. I can insert the image using ![footer](H:/R/Footer.pdf) however when I try to use the wallpaper package (like I do in Sweave) I get an error.

---
title: "2014 Report"
author: "My Name"
date: "Monday, October 06, 2014"
output:
  pdf_document:
    number_sections: yes
    toc: yes
fontsize: 10pt
header-includes:
    - \usepackage{wallpaper}
abstract: This is my abstract
---
\LRCornerWallPaper{0.99}{![footer](H:/R/Footer.pdf)} 

Is there a way in Markdown, or do I need to stick to Sweave?

like image 631
GregRousell Avatar asked Oct 07 '14 14:10

GregRousell


1 Answers

The correct usage of the wallpaper package in this case would be simply

\LRCornerWallPaper{0.99}{path/to/pic}
like image 62
tonytonov Avatar answered Oct 08 '22 04:10

tonytonov