I am trying to add a cover page to my r code. I have tried first with \includepdf but it was adding an additional page at the beginning.
Then I have changed to \includegraphics with adjusting the width and high and below is the code.
output:
pdf_document:
toc: true
toc_depth: 2
latex_engine: xelatex
header-includes:
\usepackage{booktabs}
\usepackage{titling}
\pretitle{\begin{center}
\includegraphics[width=10in,height=8.48in]{CoverPage.jpg}\LARGE\\}
\posttitle{\end{center}}
Q1: I have uploaded the CoverPage in PDF, JPG and PNG to GitHub. Can I read it from URL instead of local computer? I saw few post and command but nothing worked. (Initially I have tried with Google Drive but didn't work probably due to lack of direct URL. )
Q2: is there a simple way of adding a cover page.
The below code with \includpdf that worked well but it was adding a blank page at the beginning.
title: "Test"
author: "Ali"
date: \today
output:
pdf_document:
toc: true
toc_depth: 2
latex_engine: xelatex
header-includes:
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{titling}
\pretitle{\begin{center}
\includepdf{CoverPage3.pdf}}
\posttitle{\end{center}}