1984: Donald Knuth, Literate Programming
1987: WEB and CWEB
1989: noweb
2002: Sweave, the pioneer in automated report generation
R + LaTeX
RIP, Fritz Leisch (1968-2024)!
2011: knitr (language-agnostic)
2011-10-16: initial development
2012-01-17: initial CRAN release
62 CRAN releases in 12 years
2012: the first generation of R Markdown, based on the R package markdown (N.B. not rmarkdown!), and only supports HTML output
2014: the second generation of R Markdown, i.e., the rmarkdown package, based on Pandoc for multiple output formats (HTML, Word, PDF, PowerPoint, E-book, etc.)
bookdown: https://github.com/rstudio/bookdown/
blogdown: https://github.com/rstudio/blogdown/
rticles: https://github.com/rstudio/rticles
pagedown: https://github.com/rstudio/pagedown
flexdashboard: https://github.com/rstudio/flexdashboard
xaringan: https://github.com/yihui/xaringan
shower: https://github.com/shower/shower
distill: https://github.com/rstudio/distill
pkgdown: https://github.com/r-lib/pkgdown
htmlwidgets: https://github.com/ramnathv/htmlwidgets
prettydoc: https://github.com/yixuan/prettydoc
minidown: https://github.com/atusy/minidown
rmdformats: https://github.com/juba/rmdformats
…
R Markdown = Markdown + computing languages
In theory, you can use dozens of computing languages in R Markdown (not limited to R), but R has to be installed in the first place, no matter if you use R or not in R Markdown
Generalizing 10+ years of experience from R Markdown (e.g., bookdown) to a wider community (e.g., Python and Julia)
On the Markdown side
On the computing side
2012 | 2024 | |
---|---|---|
Output formats | HTML | HTML, LaTeX, PDF, Word, PowerPoint, EPUB, … |
Applications | Reports | Reports, slides, articles, books, websites, dashboards, … |
Backend | sundown (a tiny C library) | Pandoc |
R package dependencies | 0 | 25 |
Package size | ~2Mb | ~83Mb (Pandoc: 152Mb) |
The above comparison does not include R Markdown extension packages such as bookdown and blogdown, which are even heavier.
litedown: https://github.com/yihui/litedown
The goal: litedown = min{knitr + evaluate + rmarkdown + bookdown + blogdown + pagedown + xaringan + tufte} - Pandoc - Hugo - GitBook - Bootstrap - jQuery
Re-implementing 12 years of work with fewer features and dependencies
Easier to develop, install, and manage (built on top of xfun and commonmark, and no dependency on Pandoc or knitr)
Also easier to be embedded in other applications (e.g., WebAssembly)
Be determined to say No (if you want rich features, you should use rmarkdown or Quarto instead)
Choose a stable foundation to develop software on top of
Hoping to declare “feature-complete” in a few months
As a software developer, I feel it’s tempting to pursue rich features
HTML only requires a web browser, which everyone has; other document formats require special tools
CSS and JavaScript can make HTML extremely powerful
you can manipulate the page arbitrarily with JS (no need to learn Lua)
you can print HTML to PDF (no need to battle with LaTeX)
If only one document format would survive in the far future, I believe it will be HTML
Installation:
remotes::install_github('yihui/litedown')
Rmd example: https://gist.github.com/yihui/44ccbae0b3d3ec3669d357f218b2f32d
Preview and build R Markdown: litedown::roam()
Figures and tables / Time code chunks / Execution order / R scripts, books, and slides / JS and CSS assets