MyNixOS website logo
Description

A Lightweight Version of R Markdown.

Render R Markdown to Markdown (without using 'knitr'), and Markdown to lightweight HTML or 'LaTeX' documents with the 'commonmark' package (instead of 'Pandoc'). Some missing Markdown features in 'commonmark' are also supported, such as raw HTML or 'LaTeX' blocks, 'LaTeX' math, superscripts, subscripts, footnotes, element attributes, and appendices, but not all 'Pandoc' Markdown features are (or will be) supported. With additional JavaScript and CSS, you can also create HTML slides and articles. This package can be viewed as a trimmed-down version of R Markdown and 'knitr'. It does not aim at rich Markdown features or a large variety of output formats (the primary formats are HTML and 'LaTeX'). Book and website projects of multiple input documents are also supported.
  ______  
 /   ⚡  \
/litedown\
\   ⚡    /
 \______/

R Markdown Reimagined

R-CMD-check CRANrelease litedown onr-universe Codecov testcoverage

This package provides a trimmed-down and reimagined implementation of R Markdown. It is much more lightweight, at the price of dropping some features. It does not depend on the R package knitr or the system package Pandoc.

Please consider this package experimental for now. The documentation is also very incomplete and still under development.

Usage

Installation

At the moment, you are recommended to install the development version from r-universe:

install.packages('litedown', repos = c('https://yihui.r-universe.dev', 'https://cloud.r-project.org'))

Markdown rendering

The function litedown::mark() is based on the R package commonmark, and renders Markdown to various output formats supported by commonmark, which are primarily HTML and LaTeX. MS Office formats are not supported.

Knitting

R Markdown documents need to be knitted to Markdown before being rendered to a target output format. The function litedown::fuse() plays a role similar to knitr::knit() and rmarkdown::render(). It fuses program code with narratives, i.e., it executes code in the source document and interweaves results with narratives in the output document.

Previewing

Try litedown::roam().

Scope

We want to limit the scope of this package. Most planned features have been (re-)implemented so far, such as reports, slides, books, websites (including package sites), and paged HTML documents, etc. See the set $R$ below:

$$\mathrm{litedown} = \min{{R}} + {D_i} - {D_e} + {J}$$

  • $R$ = knitr + evaluate + rmarkdown + bookdown + blogdown + pagedown + pkgdown + xaringan + tufte + distill + htmlwidgets

  • $D_i$ = (internal dependencies) commonmark + xfun

  • $D_e$ = (external dependencies) Pandoc + Bootstrap + jQuery + GitBook + Hugo + paged.js + remark.js + tufte.css + distill.js/.css + ...

  • $J$ = Lightweight vanilla JavaScript/CSS

Please feel free to file feature requests anyway, but we may be a little conservative when considering them (we will take votes into consideration, so please upvote features you like).

License

The litedown package is licensed under MIT.

Metadata

Version

0.7

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows