Title: | 'knitr' Bootstrap Framework |
---|---|
Description: | A framework to create Bootstrap <http://getbootstrap.com/> HTML reports from 'knitr' 'rmarkdown'. |
Authors: | Jim Hester |
Maintainer: | Jim Hester <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.3 |
Built: | 2024-11-03 04:05:58 UTC |
Source: | https://github.com/jimhester/knitrBootstrap |
rmarkdown Format for converting from R markdown to Bootstrap styled HTML
bootstrap_document(title = NULL, theme = "default", highlight = "highlightjs", theme.chooser = FALSE, highlight.chooser = FALSE, menu = TRUE, custom.header = NULL, clean_supporting = TRUE)
bootstrap_document(title = NULL, theme = "default", highlight = "highlightjs", theme.chooser = FALSE, highlight.chooser = FALSE, menu = TRUE, custom.header = NULL, clean_supporting = TRUE)
title |
Title to use in the bootstrap document |
theme |
Visual theme ('Default', 'Amelia', 'Cerulean', 'Cosmo', 'Cyborg', 'Journal', 'Flatly', 'Readable', 'Simplex', 'Slate', 'Spacelab', 'United'). |
highlight |
Syntax highlighting style ('HighlightJs', 'Dark', 'Far', 'Idea', 'Sunburst', 'Zenburn', 'Visual Studio', 'Ascetic', 'Magula', 'Github', 'Google Code', 'Brown Paper', 'School Book', 'IR Black', 'Solarized - Dark', 'Solarized - Light', 'Arta', 'Monokai', 'Xcode', 'Pojoaque', 'Rainbow', 'Tomorrow', 'Tomorrow Night', 'Tomorrow Night Bright', 'Tomorrow Night Blue', 'Tomorrow Night Eighties'). |
theme.chooser |
Adds a dynamic theme chooser to the page, pass 'TRUE' to include. |
highlight.chooser |
Adds a dynamic highlight chooser to the page, pass 'TRUE' to include. |
menu |
Whether to show the menu or not. |
custom.header |
HTML file containing any extra header logic such as external script or CSS includes. |
clean_supporting |
Whether to clean supporting files or not. |
This function includes the knitrBootstrap HTML headers to wrap the knitr output in bootstrap styled HTML.
bootstrap_HTML(input, output = NULL)
bootstrap_HTML(input, output = NULL)
input |
html filename to be wrapped with Bootstrap. |
output |
html filename to output. |
This function includes the knitrBootstrap HTML headers to wrap the knitr output in bootstrap styled HTML.
knit_bootstrap(input, output = NULL, ...)
knit_bootstrap(input, output = NULL, ...)
input |
Rmd input file to knit into HTML |
output |
HTML output file created, if NULL uses the input filename with the extension changed to .html |
... |
options passed to |
This function includes the knitrBootstrap HTML headers to wrap the knitr output in bootstrap styled HTML.
knit_bootstrap_md(input, output = NULL)
knit_bootstrap_md(input, output = NULL)
input |
md input file to be converted to HTML' |
output |
HTML output file created, if NULL uses the input filename with the extension changed to .html |
knit_bootstrap
knit
,
markdownToHTML
bootstrap_document
custom
rendering function for use with the rmarkdown
http://rmarkdown.rstudio.com/) package.You can also specify the options in your YAML front-matter, see the rmarkdown documentation for examples.
## Not run: library(rmarkdown) library(knitrBootstrap) render('input.Rmd', bootstrap_document()) #with some options render('input.Rmd', bootstrap_document(title='Test', highlight='Github', theme='Slate', theme.chooser=TRUE, highlight.chooser=TRUE)) ## End(Not run)
## Not run: library(rmarkdown) library(knitrBootstrap) render('input.Rmd', bootstrap_document()) #with some options render('input.Rmd', bootstrap_document(title='Test', highlight='Github', theme='Slate', theme.chooser=TRUE, highlight.chooser=TRUE)) ## End(Not run)
This function sets the appropriate knitr output hooks to produce a bootstrap styled report.
render_bootstrap()
render_bootstrap()
This will allow use of the knitr bootstrap output hooks without the rmarkdown package. Note you still need to use pandoc to generate the HTML document, as the sundown library in the markdown package cannot handle markdown embedded in HTML tags, which knitr bootstrap uses.