From cd30d8e8e2c1431ddee892f60e70463c23d75fe4 Mon Sep 17 00:00:00 2001 From: Charles Zhang Date: Sun, 24 Oct 2021 22:48:36 -0700 Subject: [PATCH 1/4] Update save_kable.R to include MathJax --- R/save_kable.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/save_kable.R b/R/save_kable.R index c8b7185..fccfcbf 100644 --- a/R/save_kable.R +++ b/R/save_kable.R @@ -83,10 +83,10 @@ save_kable_html <- function(x, file, bs_theme, self_contained, } html_header <- htmltools::tags$head(dependencies) - html_table <- htmltools::HTML(as.character(x)) + html_table <- htmltools::HTML(as.character(x), + '') html_result <- htmltools::tagList(html_header, html_table) - # Check if we are generating an image and use webshot to do that if (tools::file_ext(file) %in% c("png", "jpg", "jpeg", "pdf")) { file_temp_html <- tempfile( From 52a261c9af2d151f574ca885abe30909173f91ba Mon Sep 17 00:00:00 2001 From: Charles Zhang Date: Sun, 24 Oct 2021 23:12:48 -0700 Subject: [PATCH 2/4] Update save_kable.R --- R/save_kable.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/save_kable.R b/R/save_kable.R index fccfcbf..555877c 100644 --- a/R/save_kable.R +++ b/R/save_kable.R @@ -84,7 +84,8 @@ save_kable_html <- function(x, file, bs_theme, self_contained, html_header <- htmltools::tags$head(dependencies) html_table <- htmltools::HTML(as.character(x), - '') + ' --- R/save_kable.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/save_kable.R b/R/save_kable.R index 555877c..f6e4855 100644 --- a/R/save_kable.R +++ b/R/save_kable.R @@ -85,7 +85,7 @@ save_kable_html <- function(x, file, bs_theme, self_contained, html_header <- htmltools::tags$head(dependencies) html_table <- htmltools::HTML(as.character(x), '') html_result <- htmltools::tagList(html_header, html_table) # Check if we are generating an image and use webshot to do that From 69877513ad37a8cd0b525d5ffa5dacdc1887fb51 Mon Sep 17 00:00:00 2001 From: Charles Zhang Date: Sun, 24 Oct 2021 23:52:38 -0700 Subject: [PATCH 4/4] Revert to the old MathJax include --- R/save_kable.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/save_kable.R b/R/save_kable.R index f6e4855..fccfcbf 100644 --- a/R/save_kable.R +++ b/R/save_kable.R @@ -84,8 +84,7 @@ save_kable_html <- function(x, file, bs_theme, self_contained, html_header <- htmltools::tags$head(dependencies) html_table <- htmltools::HTML(as.character(x), - '') + '') html_result <- htmltools::tagList(html_header, html_table) # Check if we are generating an image and use webshot to do that