Putting image the top centered with the beamer in R-markdown

1.8k Views Asked by At

Esteemed,

I need your help.

From the following code, how do I put this logo at the top of the title?

---
title: "Title_article"  
author: "My name"
date: "08/10/2020"
output: 
  beamer_presentation:
    theme: "Madrid"
header-includes: 
- \titlegraphic{\centering \includegraphics[width=1.5cm]{logo.png}\\LARGE}
classoption: "aspectratio=169"
---

I appreciate any help.

1

There are 1 best solutions below

1
On

Instead of using \titlegraphic you could add the image to the title page template:

---
title: "Title_article"  
author: "My name"
date: "08/10/2020"
output: 
  beamer_presentation:
    theme: "Madrid"
    keep_tex: true
header-includes: 
- \addtobeamertemplate{title page}{\centering \includegraphics[width=1.5cm]{example-image}\par TEXT}{}
classoption: "aspectratio=169"
---

enter image description here