rstudio / revealjs

R Markdown Format for reveal.js Presentations
Other
325 stars 86 forks source link

Add institute variable in template for title slide #122

Closed cderv closed 2 years ago

cderv commented 2 years ago

Proposal for #87

This only add the same variable than in pandoc template: https://github.com/jgm/pandoc-templates/blob/466c90ed5bb489d9cafe41b59fff47a3c5eb858c/default.revealjs#L55-L57

Title slide would look like this with our format currently

Example:

---
title: "Title slide"
author: Christophe
institute: RStudio
date: '`r format(Sys.Date(), "%D")`'
output: revealjs::revealjs_presentation
---

image

With Pandoc's current default using Quarto 0.2.144

---
title: "Title slide"
author: Christophe
institute: RStudio
date: '`r format(Sys.Date(), "%D")`'
format: revealjs
---

# Important {data-background="background.jpg"}

This is the first slide.

image

Using multiple authors and institues , in both cases it will only pile up the authors, then the institute. Do we want something clever than that for the title slide or be close to Pandoc's default ?

title: "Title slide"
author: 
  - Bob
  - Joe
institute: 
  - Great, PBC
  - Good, PBC
date: '`r format(Sys.Date(), "%D")`'
output: revealjs::revealjs_presentation

image

Opening this PR for discussion about this.

cc @apreshill

cderv commented 2 years ago

We'll stay simple for now and just to as the pandoc template is doing. This means that to provide several author, one would need to provide them in one string

---
title: "Untitled"
author: Bob, Joe
institute: One PBC, Two PBC
date: "09/08/2021"
output: 
  revealjs::revealjs_presentation: default
---

image

or use only the author field

---
title: "Untitled"
author: 
  - Bob, One PBC
  - Joe, Two PBC
date: "09/08/2021"
output: 
  revealjs::revealjs_presentation: default
---

image

So merging to just bring the documented pandoc variable https://pandoc.org/MANUAL.html#variables-for-html-slides