getStyleFile: get a style file

Description Usage Arguments Details Value Author(s) Examples

View source: R/renderer.R

Description

This function retrieves the path of a style file by looking in various places of the system

Usage

1
getStyleFile(name = "default", extension = "css")

Arguments

name

name of the stylesheet, without extension

extension

extension of the stylesheet (e.g. css)

Details

The function looks for a file called name.extension in the following places: the current working directory (see getwd), the user directory used by highlight (~/.R/highlight), the stylesheet directory of the installed package.

Value

The first file found is returned. If no file is found, the function returns NULL.

Author(s)

Romain Francois <romain@r-enthusiasts.com>

Examples

1
2
3
4
5
6
## Not run: 
getwd()
file.path(Sys.getenv("HOME"), ".R", "highlight" )
system.file("stylesheet", package = "highlight")

## End(Not run)

Dasonk/highlight documentation built on May 6, 2019, 1:37 p.m.