crmda_html_document | R Documentation |
The rmarkdown::html_document
fails to use MathJax if a custom HTML
template is supplied. This is described here
https://github.com/rstudio/rmarkdown/issues/727. The workaround
is to provide this wrapper.
crmda_html_document(template = "theme/guide-template.html", ...)
template |
Name of template file. |
... |
Any arguments passed along to html_document in rmarkdown |
This function is needed only so as to "fool" pandoc in order to
make an HTML document compatible with MathJax. See the example
files created by initWriteup("rmd2html-guide")
for a usage
example.
html_document object with custom template
Paul Johnson
tdir <- tempdir()
doctype <- "rmd2html-guide"
dirout <- initWriteup(doctype, dir = file.path(tdir, doctype))
list.files(dirout)
MESSG <- paste("Inspect the YAML header output section of 'skeleton.Rmd'.",
"It makes use of 'crmda_html_document'.")
cat(MESSG)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.