R gurus,
I am struggling to design a letterhead template in Rmarkdown for a massive mail merge project.
What I ideally need is something like following:
Question is if the header can be defined in YAML? The code might look something like following:
---
output:
pdf_document:
fig_caption: false
logo: logo.png
institute: UNIVERSITY OF CALIFORNIA
name: Prof. Jones
address: Mathematics Search Committee
Department of Mathematics
University of California
Berkeley, California 12345
email: [email protected]
latex_engine: pdflatex
fontfamily: mathpazo
fontsize: 11pt
# spacing: double
endnote: no
---
---
title: "Prof. Jones \nDepartment \nUniversity \nState \nEmail"
output: pdf_document
editor_options:
chunk_output_type: console
header-includes:
- \usepackage{titling}
- \usepackage{graphicx}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \pretitle{\begin{flushright}\LARGE\includegraphics[width=8cm]{logo.jpg}\\[\bigskipamount]}
- \posttitle{\end{flushright}}
---
Add your logo to where it has {logo.jpg}
and the width might need altering as well.
Bit of a workaround using double space and \n
to add a line break to the heading to create the address.
flushright
right aligns the logo and title then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With