This generates style definitions either by including a language
specific style file (e.g. sty file for latex) or by parsing
a css stylesheet
Usage
styler(stylesheet, extension = "css", assistant)
Arguments
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
Details
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.
Value
a character vector containing style declarations in the target language
See Also
styler_assistant_latex gives a concrete implementation
of the assistant for the latex language