Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Left-align YAML title for Rmarkdown PDF

R gurus,

I wonder if it is possible at all to left align PDF output title in YAML in Rmarkdown documents.

And also is it possible to add a logo above title (in header)?

---
output: 
  pdf_document:
    fig_caption: false

#title: "Multi pricing report"
latex_engine: xelatex
fontfamily: mathpazo
fontsize: 11pt
# spacing: double
endnote: no
---

You time and effort to answer is much appreciated.

like image 841
M.Qasim Avatar asked Feb 08 '18 03:02

M.Qasim


1 Answers

You can use the titling package and add \begin{flushleft} before the title and \end{flushleft} afterwards:

---
output: 
  pdf_document:
    fig_caption: false
    keep_tex: yes
title: "Multi pricing report"
fontfamily: mathpazo
fontsize: 11pt
header-includes:
  - \usepackage{titling}
  - \pretitle{\begin{flushleft}}
  - \posttitle{\end{flushleft}}
---
like image 156
Martin Schmelzer Avatar answered Oct 04 '22 18:10

Martin Schmelzer