[Tex/LaTex] Inserting a logo below date in Rmarkdown YAML

r

I am using the following template in RMarkdown to create a PDF. Is there a way in which the following logo can go below the date instead of above the title?

---
title: Adding a Logo to LaTeX Title
author: Michael Harper
date: December 7th, 2018
output: pdf_document
header-includes:
  - \usepackage{titling}
  - \pretitle{\begin{center}
    \includegraphics[width=2in,height=2in]{logo.jpg}\LARGE\\}
  - \posttitle{\end{center}}
---

This YAML generates a cover page which looks like the image below. I would like the logo to appear below the date

e

Best Answer

You can use the \predate and \postdate commands for this instead of \pretitle and \posttitle. See more details in the documentation or check this example:

---
title: Adding a Logo to LaTeX Title
author: Michael Harper
date: December 7th, 2018
output: pdf_document
header-includes:
  - \usepackage{titling}
  - \predate{\begin{center}\large}
  - \postdate{\\
      \includegraphics[width=2in,height=2in]{logo.png}\end{center}}
---

logo below date