Description Usage Arguments Value Author(s) See Also Examples
This function creates a renderer suitable for the renderer
argument of the highlight
function
using style
to decorate the tokens with
background and foreground color.
1 2 3 4 5 6 7 8 | renderer_xterm(translator = translator_xterm,
formatter = formatter_xterm(stylesheet = stylesheet),
space = space_xterm, newline = newline_xterm,
header = NULL, footer = NULL, stylesheet = "default", ...)
translator_xterm(x)
formatter_xterm( stylesheet )
newline_xterm()
space_xterm()
|
translator |
translator. No translation is performed. The function simply returns its argument |
formatter |
formatter. This function will decorate the tokens together with the styles decided by the detective using the information contained in the stylesheet |
space |
Function that returns a space character. |
newline |
Function that returns a new line character. |
header |
Empty header |
footer |
Empty footer |
stylesheet |
The stylesheet to use. This will be parsed by the
|
... |
Additional arguments |
x |
input of the translator. Returned as is. |
a renderer object suitable for the renderer
argument of the highlight
function
Romain Francois <francoisromain@free.fr>
The renderer is actually built by the renderer
function.
The css.parser
is used to parse the css stylesheet
The style
function is used to decorate the tokens with
background and foreground color.
The print.function
function uses this renderer
to pretty print functions.
1 2 3 4 5 6 | ## Not run:
r <- renderer_xterm( )
highlight( parser.output = parser( text = deparse(jitter) ),
renderer = r, detective = simple_detective )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.