rstudio / revealjs

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

[FR] Enable revealjs code formatting options #92

Open apreshill opened 3 years ago

apreshill commented 3 years ago

See: https://revealjs.com/code/

Specifically:

```{r code-chunk, line.numbers = "3,8-10"}

- [ ] Step-by-step highlights (https://revealjs.com/code/#step-by-step-highlights)


Notes on discussion re: implementation:
add option hook with knitr, replace dot with dash for users (users will use the dot like `highlight.output` with xaringan), concatenated with `attr.source` in case users pile that on
cderv commented 2 years ago

I agree that reveal.js features are really nice.

On the same topic, currently the numberLined feature from Pandoc is not working ok.

---
title: "Reveal Template"
output:
  revealjs::revealjs_presentation: 
    keep_md: true
---

# Slide 1

```{r class.source = "numberLines", collapse = TRUE}
1 + 1
2 + 2
3 + 3


Probably something related to CSS with our package as it is working correctly with Pandoc default directly.