Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

downlit-package

downlit: Syntax Highlighting and Automatic Linking


Description

Syntax highlighting of R code, specifically designed for the needs of 'RMarkdown' packages like 'pkgdown', 'hugodown', and 'bookdown'. It includes linking of function calls to their documentation on the web, and automatic translation of ANSI escapes in output to the equivalent HTML.

Options

downlit provides a number of options to control the details of the linking. They are particularly important if you want to generate "local" links.

  • downlit.package: name of the current package. Determines when topic_index and article_index

  • downlit.topic_index and downlit.article_index: named character vector that maps from topic/article name to path.

  • downlit.rdname: name of current Rd file being documented (if any); used to avoid self-links.

  • downlit.attached: character vector of currently attached R packages.

  • downlit.local_packages: named character vector providing relative paths (value) to packages (name) that can be reached with relative links from the target HTML document.

  • downlit.topic_path and downlit.article_path: paths to reference topics and articles/vignettes relative to the "current" file.

Author(s)

Maintainer: Hadley Wickham hadley@rstudio.com

Other contributors:

  • RStudio [copyright holder]

See Also

Useful links:


downlit

Syntax Highlighting and Automatic Linking

v0.2.1
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.