⚠️There's a newer version (0.10) of this package. Take me there.

highr

This is an infrastructure R package for syntax highlighting. It supports LaTeX and HTML output. Not surprisingly, it works best with R code. It attaches markups onto source code, e.g., it turns

a <- 1 # something

into LaTeX code

\hlstd{a} \hlkwb{<-} \hlnum{1} \hlcom{\# something}

or HTML code

<span class="hl std">a</span> <span class="hl kwb">&lt;-</span> <span class="hl num">1</span> <span class="hl com"># something</span>

via

library(highr)
hi_latex("a <- 1 # something")
hi_html("a <- 1 # something")
# or hilight(code, format = "latex"/"html")

This package also has a wrapper function, hi_andre(), for Andre Simon's Highlight package.

There are a few package Markdown vignettes in this package:

browseVignettes(package = "highr")

To install the development version here, use

install.packages('highr', repos = 'http://rforge.net', type = 'source')

This package is licensed under GPL, and is supposed to serve other packages such as knitr.

Copy Link

Version

Down Chevron

Install

install.packages('highr')

Monthly Downloads

701,776

Version

0.8

License

GPL

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

March 20th, 2019

Functions in highr (0.8)