powered by
This function calls Highlight to syntax highlight a code fragment.
hi_andre(code, language, format = "html")
A character string for the syntax highlighted code.
a character string of the source code
the input language (c, cpp, python, r, ...); see system('highlight -p')
system('highlight -p')
the output format (html, latex, ...)
Andre Simon's Highlight package https://gitlab.com/saalen/highlight.
if (FALSE) { hi_andre("1+1", language = "R") hi_andre("void main() {\nreturn(0)\n}", language = "c", format = "latex") }
Run the code above in your browser using DataLab