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

Comments

Projects
None yet
3 participants
@BruceZhaoR
Copy link

BruceZhaoR commented Aug 21, 2018

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

This comment has been minimized.

Copy link
Collaborator

jayhesselberth commented Aug 21, 2018

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 front end 🌷 and removed bug labels Aug 21, 2018

jayhesselberth added a commit that referenced this issue Oct 8, 2018

Use higher availability CDN for Mathjax
The R Studio mirror is reported to have only intermittent connectivity in China.

Part of #785
@jayhesselberth

This comment has been minimized.

Copy link
Collaborator

jayhesselberth commented Oct 8, 2018

#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

Use higher availability CDN for Mathjax (#833)
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

This comment has been minimized.

Copy link
Collaborator

jayhesselberth commented Oct 24, 2018

@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

This comment has been minimized.

Copy link
Member

hadley commented Nov 8, 2018

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

@hadley hadley closed this in 9cbb675 Nov 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment