Skip to content

Commit

Permalink
Manually add ajax pandoc arguments to html_docco
Browse files Browse the repository at this point in the history
  • Loading branch information
juba committed Mar 19, 2015
1 parent 1462840 commit 446e443
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/html_docco.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ html_docco <- function(fig_width = 6,
fig_height = 6,
fig_caption = TRUE,
highlight = "pygments",
pandoc_args = NULL,
...) {

## js and css dependencies
Expand All @@ -38,13 +39,19 @@ html_docco <- function(fig_width = 6,
html_dependency_magnific_popup(),
html_dependency_docco())

## Force mathjax arguments
pandoc_args <- c(pandoc_args,
"--mathjax",
"--variable", paste0("mathjax-url:", rmarkdown:::default_mathjax()))

rmarkdown::html_document(
template=system.file("templates/html_docco/default.html", package="rmdformats"),
extra_dependencies = extra_dependencies,
fig_width = fig_width,
fig_height = fig_height,
fig_caption = fig_caption,
highlight = highlight,
pandoc_args = pandoc_args,
...
)

Expand Down

0 comments on commit 446e443

Please sign in to comment.