I am using RMarkdown to generate a PDF document. I am trying to find a solution whereby I can adjust the line spacing on my cover page (Table of Contents as well as the spacing between the Title, Name and Date), as I noticed that adding linestretch
in my YAML only affects the rest of the document and not the cover page. I am also hoping for a solution to move the logo on the cover page below the date if possible as opposed to it appearing on top
My YAML is as follows
---
title: "A Template for a Dynamic Report you can use for work"
author: My Name
date: "`r format(Sys.time(), '%d %B, %Y')`"
Uni_Logo: Tex/logo.jpg
toc: TRUE # Add a table of contents. Change this to false if you don't want one
numbersections: TRUE # Should sections (and thus figures and tables) be numbered?
fontsize: 11pt # Set fontsize
linestretch: 1.5 # Set distance between lines.
link-citations: TRUE # This creates dynamic links to the papers in reference list.
header-includes:
- \usepackage {hyperref, xcolor, float}
- \usepackage{makeidx}
- \definecolor{winered}{rgb}{0.5,0,0}
- \hypersetup {colorlinks = true, linkcolor = winered, urlcolor = winered}
output:
pdf_document:
includes:
in_header: "header.tex"
---
and here is the header.tex
file I'm using
\usepackage{fancyhdr}
\usepackage{titling}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\setlength{\headheight}{50pt}
\rhead{\includegraphics[width = .2\textwidth]{logo.jpg}}
\fancyfoot[R]{\thepage}
\renewcommand{\footrulewidth}{1pt}
\pretitle{%
\begin{center}
\LARGE
\includegraphics[width=10cm,height=15cm]{logo.jpg}\\[\bigskipamount]
}
\posttitle{\end{center}}