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

param mathjax is useless in function build_reference #785

Closed
BruceZhaoR opened this issue Aug 21, 2018 · 4 comments
Closed

param mathjax is useless in function build_reference #785

BruceZhaoR opened this issue Aug 21, 2018 · 4 comments
Labels
front end 🌷 General HTML, CSS, and JS issues
Milestone

Comments

@BruceZhaoR
Copy link

pkgdown/R/build-reference.R

Lines 205 to 210 in b279865

data_reference_topic <- function(topic,
pkg,
examples = TRUE,
run_dont_run = FALSE,
mathjax = TRUE
) {

pkgdown:::data_reference_topic seems mathjax useless?

<!-- mathjax -->
<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>

The mathjax in head.html template didn't have any condition and apply to all sites.

BTW: https://mathjax.rstudio.com/... is unstable in China, sometimes can't be loaded. Why not use cdnjs ? #314

@jayhesselberth
Copy link
Collaborator

We can use cdnjs to provide mathjax.

The param is a separate issue, it doesn't get propagated the way it should. I think it should be passed in these as_data calls:

out$description <- as_data(tags$tag_description[[1]])

purrr::map(as_data) %>%

@jayhesselberth jayhesselberth added bug an unexpected problem or unintended behavior front end 🌷 General HTML, CSS, and JS issues and removed bug an unexpected problem or unintended behavior labels Aug 21, 2018
jayhesselberth added a commit that referenced this issue Oct 8, 2018
The R Studio mirror is reported to have only intermittent connectivity in China.

Part of #785
@jayhesselberth
Copy link
Collaborator

#833 will change the CDN for Mathjax.

I'm not sure why the mathjax param exists; it may be a vestigial parameter, I'll have to do some more digging.

The mathjax param in rmarkdown::html_document controls whether the Mathjax JS library is bundled with the document or not, but pkgdown loads it regardless. Alternatively it might have been used to control pandoc args.

jayhesselberth added a commit that referenced this issue Oct 9, 2018
The R Studio mirror is reported to have only intermittent connectivity in China.

Part of #785
@jayhesselberth jayhesselberth added this to the pkgdown 1.2.0 milestone Oct 24, 2018
@jayhesselberth
Copy link
Collaborator

@hadley Can you track down why this param exists? AFAICT it leads nowhere. Maybe we just remove it; including mathjax by default doesn't seem to be that much overhead.

@hadley
Copy link
Member

hadley commented Nov 8, 2018

I think it's vestigial and I'll remove it

@hadley hadley closed this as completed in 9cbb675 Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front end 🌷 General HTML, CSS, and JS issues
Projects
None yet
Development

No branches or pull requests

3 participants