crmda_html_document: Custom output_format object to make MathJax work with custom...

Description Usage Arguments Details Value Author(s) Examples

View source: R/runme.R

Description

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.

Usage

1
crmda_html_document(template = "theme/guide-template.html", ...)

Arguments

template

Name of template file.

...

Any arguments passed along to html_document in rmarkdown

Details

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.

Value

html_document object with custom template

Author(s)

Paul Johnson

Examples

1
2
3
4
5
6
7
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)

stationery documentation built on Oct. 8, 2021, 5:07 p.m.