File tree Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Expand file tree Collapse file tree 2 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -371,24 +371,6 @@ plotly_build.plotly <- function(p, registerFrames = TRUE) {
371
371
# box up 'data_array' attributes where appropriate
372
372
p <- verify_attr_spec(p )
373
373
374
-
375
- verify_mathjax <- function (p ) {
376
- hasMathjax <- " mathjax" %in% sapply(p $ dependencies , " [[" , " name" )
377
- if (hasMathjax ) return (p )
378
-
379
- hasTeX <- any(rapply(p $ x , is.TeX ))
380
- if (! hasTeX ) return (p )
381
-
382
- # TODO: it would be much better to add the dependency here, but
383
- # htmlwidgets doesn't currently support adding dependencies at print-time!
384
- warning(
385
- " Detected the use of `TeX()`, but mathjax has not been specified. " ,
386
- " Try running `config(.Last.value, mathjax = 'cdn')`" ,
387
- call. = FALSE
388
- )
389
- p
390
- }
391
-
392
374
# make sure we're including mathjax (if TeX() is used)
393
375
p <- verify_mathjax(p )
394
376
Original file line number Diff line number Diff line change @@ -830,6 +830,23 @@ verify_guides <- function(p) {
830
830
p
831
831
}
832
832
833
+ verify_mathjax <- function (p ) {
834
+ hasMathjax <- " mathjax" %in% sapply(p $ dependencies , " [[" , " name" )
835
+ if (hasMathjax ) return (p )
836
+
837
+ hasTeX <- any(rapply(p $ x , is.TeX ))
838
+ if (! hasTeX ) return (p )
839
+
840
+ # TODO: it would be much better to add the dependency here, but
841
+ # htmlwidgets doesn't currently support adding dependencies at print-time!
842
+ warning(
843
+ " Detected the use of `TeX()`, but mathjax has not been specified. " ,
844
+ " Try running `config(.Last.value, mathjax = 'cdn')`" ,
845
+ call. = FALSE
846
+ )
847
+ p
848
+ }
849
+
833
850
verify_scattergl_platform <- function (p ) {
834
851
if (! identical(.Platform $ OS.type , " windows" )) return (p )
835
852
if (! is_rstudio()) return (p )
You can’t perform that action at this time.
0 commit comments