|
11 | 11 | #' Applies to all output images.
|
12 | 12 | #' @param height Sets the image height. If not set, defaults to `layout.height` value.
|
13 | 13 | #' Applies to all output images.
|
14 |
| -#' @param mathjax whether or not to specify a path to mathjax (required to export LaTeX characters). |
15 |
| -#' This should 'just work' in RStudio, but outside RStudio, you may have to set |
16 |
| -#' the PLOTLY_MATHJAX_PATH environment variable to the location of MathJax. |
| 14 | +#' @param mathjax whether or not to include MathJax (required to render [TeX]). |
| 15 | +#' If `TRUE`, the PLOTLY_MATHJAX_PATH environment variable must be set and point |
| 16 | +#' to the location of MathJax (this variable is also used to render [TeX] in |
| 17 | +#' interactive graphs, see [config]). |
17 | 18 | #' @param parallel_limit Sets the limit of parallel tasks run.
|
18 | 19 | #' @param verbose Turn on verbose logging on stdout.
|
19 | 20 | #' @param debug Starts app in debug mode and turn on verbose logs on stdout.
|
|
25 | 26 | #'
|
26 | 27 | #' \dontrun{
|
27 | 28 | #' p <- plot_ly(z = ~volcano) %>% add_surface()
|
28 |
| -#' orca(p, "surface-plot.png") |
29 | 29 | #' orca(p, "surface-plot.svg")
|
30 |
| -#' orca(p, "surface-plot.pdf") |
31 | 30 | #' }
|
32 | 31 | #'
|
33 | 32 |
|
@@ -65,7 +64,7 @@ orca <- function(p, file = "plot.png", format = tools::file_ext(file),
|
65 | 64 | if (!is.null(height)) args <- c(args, "--height", height)
|
66 | 65 | if (!is.null(parallel_limit)) args <- c(args, "--parallel-limit", parallel_limit)
|
67 | 66 | if (!is.na(mapbox_token())) args <- c(args, "--mapbox-access-token", mapbox_token())
|
68 |
| - if (isTRUE(mathjax)) args <- c(args, "--mathjax", mathjax_path()) |
| 67 | + if (isTRUE(mathjax)) args <- c(args, "--mathjax", file.path(mathjax_path(), "MathJax.js")) |
69 | 68 |
|
70 | 69 | # TODO: point to local topojson? Should this only work if plot_geo(standalone = TRUE)?
|
71 | 70 | try_library("processx", "orca")
|
|
0 commit comments