styler | R Documentation |
This generates style definitions either by including a language specific style file (e.g. sty file for latex) or by parsing a css stylesheet
styler(stylesheet, extension = "css", assistant)
stylesheet |
name of the stylesheet |
extension |
extension of the language specific format for the stylesheet. |
assistant |
function to which the styler delegates understanding of the parser output |
First, the function attempts to retrieve a language specific stylesheet
using the getStyleFile
function. If a language specific
stylesheet is found, it returns the content of the file as a character
vector.
Second, the function attemps to find a css stylesheet using
getStyleFile
, parse the css declarations using the
css.parser
function, and delegates to the
assistant which is responsible to translate the results
of the css parser into language specific declarations.
a character vector containing style declarations in the target language
styler_assistant_latex
gives a concrete implementation
of the assistant for the latex language
## Not run: styler( "default", "sty", styler_assistant_latex ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.