hi_andre {highr}R Documentation

A wrapper to Andre Simon's Highlight

Description

This function calls Highlight to syntax highlight a code fragment.

Usage

hi_andre(code, language, format = "html")

Arguments

code

a character string of the source code

language

the input language (c, cpp, python, r, ...); see system('highlight -p')

format

the output format (html, latex, ...)

Value

A character string for the syntax highlighted code.

References

Andre Simon's Highlight package http://www.andre-simon.de.

Examples

## Not run: 
hi_andre("1+1", language = "R")
hi_andre("void main() {\nreturn(0)\n}", language = "c", format = "latex")

## End(Not run)

[Package highr version 0.6.1 Index]