ramnathv/knitr — comment on commit c3375ee1c17c7b709295bdd66ffdf6a2e7eef8cd
File: R/themes.R line 3
By yihui:

I'm not commenting on a correct commit, but it does not matter here: for `get_theme` and `set_theme`, I hope they can share a same help page, and you can group them together by adding `@rdname theme` to both functions; after roxygenization, a single `theme.Rd` will be generated. You can see `render_xxx` series in `hooks.R` for examples. After you group them in one page, they can share documentation, e.g. you only need to write one `@author`, one title and one `@param theme` (currently the argument `theme` is not documented yet).

For `set_theme`, I hope the `theme` argument can take both a character name like `'acid'` and a list (returned by `get_theme()`). The reason is to be able to cache the theme object (a list); sometimes we may not have internet access, so it will be good to cache a theme object in advance and use it later without internet connection. Therefore, probably use `header <- if (is.list(theme)) theme else theme_to_header(theme)`