Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update save_kable.R to include MathJax #663

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

zhangchuck
Copy link

Fix for #578?

This commit makes the HTML table save_kable_html() function mirror this:

kableExtra/R/print.R

Lines 12 to 15 in 4c93f1a

htmltools::HTML(
as.character(x),
'<script type="text/x-mathjax-config">MathJax.Hub.Config({tex2jax: {inlineMath: [["$","$"]]}})</script><script async src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>'
)

Otherwise, MathJax is not included in the HTML file (which affects the image outputs).

@zhangchuck
Copy link
Author

This work if you invoke with self_contained=F:

save_kable('test.png', self_contained = F, delay=1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant