You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started having issues with the pagedown package a little while ago. I traced it to this file which is referencing MathJax sources that seem to no longer exist.
@Mosk915 no thank you. I found out the problem is in Mathjax itself, and unrelated to the line you share in your post. The JS is directly loading some fonts, and not in a way that works currently in our hosted mode.
@jspiewak Do you know where do we retrieved the Mathjax version 2.7.9 for the update ? Did you use same as the one locally added ?
I believe the change is related to the fact we don't use the packed version. If you compare our 2.7.2 and our 2.7.9 version we can see differences. One of them is
MathJax.isPacked=true;
This is commented in 2.7.9 version, but not in 2.7.2 and in the cdn example above.
and this is used in Mathjax for the font directory
fontDir: e+(b.isPacked ? "" : "/..")+"/fonts",
This is why the font url used is probably not right as /.. applies.
So we probably need to use a packed version, and minified
@jspiewak Do you know where do we retrieved the Mathjax version 2.7.9 for the update ? Did you use same as the one locally added ?
I believe the change is related to the fact we don't use the packed version. If you compare our 2.7.2 and our 2.7.9 version we can see differences. One of them is
MathJax.isPacked=true;
This is commented in 2.7.9 version, but not in 2.7.2 and in the cdn example above.
and this is used in Mathjax for the font directory
fontDir: e+(b.isPacked ? "" : "/..")+"/fonts",
This is why the font url used is probably not right as /.. applies.
So we probably need to use a packed version, and minified
Yes, I do. I don't understand "same as the one locally added".
I am looking to switch to the packed version. Stand by.
chrome_print is working. So all good - this is the right version, and seems to be the exact same that we bundle in RStudio IDE
(like the one I have on windows at rstudio-daily\2024.07.0+293-daily\resources\app\resources\mathjax-27\MathJax.js
Great, I will make 2.7.9 the latest again, and get all the steps taken (and the test snippet) captured in the hopes of avoiding relearning all of this again in the future.
The Javascript displayed should be minified (i.e. not the nicely formatted original source code)
Search the page and ensure you find version string 2.7.9 a bunch of times, and not the older version 2.7.2
In RStudio, create an RMarkdown file and paste in the "Sample Code" below
Knit the file to HTML; confirm preview looks correct (see "Preview Screenshot" below)
Go to filesystem and open the generated HTML file in a web browser
Confirm it looks correct (same as preview), open developer tools / Network, and confirm there are successful fetches from mathjax.rstudio.com (see "Web Browser Example" below)
Verified using the above steps (thank you @gtritchie !) in RStudio Desktop 2024.07.0-daily+303 on Windows 11. Also added a few extra examples just to make sure nothing in the math has gone awry.
Activity
gtritchie commentedon Jul 8, 2024
We're still discussing whether this change needs to happen for Cranberry Hibiscus or can wait.
gtritchie commentedon Jul 8, 2024
For reference, this hosted copy of mathjax is used by RMarkdown.
https://github.com/rstudio/rmarkdown/blob/a9497ffa903e124a20e455e9702635ff135d9e9d/R/html_document_base.R#L268-L270
jspiewak commentedon Jul 8, 2024
2.7.9 is uploaded.
Is it possible to test before I make it the default?
gtritchie commentedon Jul 8, 2024
I'm looking into what tests, if any, we can run before going live with this.
gtritchie commentedon Jul 8, 2024
Given the minor version bump (and no obvious way to test this) the RMarkdown team said it should be fine to go live.
jspiewak commentedon Jul 8, 2024
gtritchie commentedon Jul 8, 2024
The version I'm seeing at https://mathjax.rstudio.com/2.7.9/MathJax.js is not minified. Should be replaced with https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js.
Mosk915 commentedon Jul 8, 2024
I started having issues with the pagedown package a little while ago. I traced it to this file which is referencing MathJax sources that seem to no longer exist.
https://github.com/rstudio/pagedown/blob/6763538deb2cd78de05631715ea57085a85b8bd6/inst/resources/css/jss-fonts.css#L24
gtritchie commentedon Jul 9, 2024
Yes, appears we may have broken things. Will get this reverted back to the previous state ASAP.
cderv commentedon Jul 9, 2024
It seems the fonts are not available at the same place as before
This is the url used in pagedown - note no
latestused.> curl -I http://mathjax.rstudio.com/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff HTTP/1.1 404 Not Found Connection: keep-alive x-amz-error-code: NoSuchKey x-amz-error-message: The specified key does not exist. x-amz-error-detail-Key: fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff Date: Tue, 09 Jul 2024 11:59:46 GMT Server: AmazonS3 X-Cache: Error from cloudfront Via: 1.1 a746325e2c0a55fa6c56e06293f59b40.cloudfront.net (CloudFront) X-Amz-Cf-Pop: VIE50-P2 X-Amz-Cf-Id: nKplbmiBeafqgDtJHRQsRr91HExPBo5hU73RxoGzRl0PYYIN58odXQ==It seems url that works is
latestbut which points still to 2.7.2> curl -I http://mathjax.rstudio.com/latest/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff HTTP/1.1 302 Moved Temporarily Content-Length: 0 Connection: keep-alive Date: Mon, 08 Jul 2024 16:46:36 GMT Location: https://mathjax.rstudio.com/2.7.2/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff Server: AmazonS3 X-Cache: Hit from cloudfront Via: 1.1 08f9b351f61685659ad70b790734f9b0.cloudfront.net (CloudFront) X-Amz-Cf-Pop: VIE50-P2 X-Amz-Cf-Id: qfNq0A--rm08owOFqWUSgh5FQceRLg2gcGLs9FT0p9-o6AVNXLQ7GA== Age: 69316So are we missing fonts in the update ?
> curl -I http://mathjax.rstudio.com/2.7.9/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff HTTP/1.1 404 Not Found Connection: keep-alive x-amz-error-code: NoSuchKey x-amz-error-message: The specified key does not exist. x-amz-error-detail-Key: 2.7.9/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff Date: Tue, 09 Jul 2024 12:04:46 GMT Server: AmazonS3 X-Cache: Error from cloudfront Via: 1.1 63b0889adbeadc5106837d12ac6fbc18.cloudfront.net (CloudFront) X-Amz-Cf-Pop: VIE50-P2 X-Amz-Cf-Id: gVaMSmVs5zZgrutllnR_x8zjvraAWfo4PImNw4MDrnhklqj8kChgvA==Note that for mathjax itself it works ok and available at
latest/So it seems to be only a redirect problem with missing content compare what was exposed before.
https://github.com/mathjax/MathJax/tree/legacy-v2/fonts/HTML-CSS
17 remaining items
cderv commentedon Jul 9, 2024
@Mosk915 no thank you. I found out the problem is in Mathjax itself, and unrelated to the line you share in your post. The JS is directly loading some fonts, and not in a way that works currently in our hosted mode.
We'll find a solution before updating again.
cderv commentedon Jul 9, 2024
@jspiewak Do you know where do we retrieved the Mathjax version 2.7.9 for the update ? Did you use same as the one locally added ?
I believe the change is related to the fact we don't use the
packedversion. If you compare our 2.7.2 and our 2.7.9 version we can see differences. One of them isThis is commented in 2.7.9 version, but not in 2.7.2 and in the cdn example above.
and this is used in Mathjax for the font directory
This is why the font url used is probably not right as
/..applies.So we probably need to use a packed version, and minified
gtritchie commentedon Jul 9, 2024
@kevinushey prepared the bundled MathJax update not too long ago. Details on what he did here: #14738
Update: though I see that his steps include deleting the fonts, so presumably we don't want to do that.
jspiewak commentedon Jul 9, 2024
Yes, I do. I don't understand "same as the one locally added".
I am looking to switch to the packed version. Stand by.
jspiewak commentedon Jul 9, 2024
k, in theory packed version uploaded and invalidated
/2.7.9/*, if someone could explicitly test 2.7.9 again?cderv commentedon Jul 9, 2024
This relates to original issue #11535 closed by @ronblum when they updated the version of Mathjax bundled into the IDE directly.
This works fine now !
I'll test
chrome_printtoo.cderv commentedon Jul 9, 2024
chrome_printis working. So all good - this is the right version, and seems to be the exact same that we bundle in RStudio IDE(like the one I have on windows at
rstudio-daily\2024.07.0+293-daily\resources\app\resources\mathjax-27\MathJax.jsSo it seems all good now.
jspiewak commentedon Jul 9, 2024
Great, I will make 2.7.9 the
latestagain, and get all the steps taken (and the test snippet) captured in the hopes of avoiding relearning all of this again in the future.jspiewak commentedon Jul 9, 2024
2.7.9 is
latestagain and invalidation has run:gtritchie commentedon Jul 9, 2024
Testing Suggestions
2.7.9a bunch of times, and not the older version2.7.2Sample Code
Preview Screenshot
Web Browser Example
ronblum commentedon Jul 11, 2024
Verified using the above steps (thank you @gtritchie !) in RStudio Desktop 2024.07.0-daily+303 on Windows 11. Also added a few extra examples just to make sure nothing in the math has gone awry.
Source mode:
Visual mode:
cderv commentedon Jul 11, 2024
Great thank you all !
aja08379 commentedon Aug 15, 2024
@cderv @ronblum am I correct in thinking that this will only appear in Cranberry Hibiscus and the current dailies?
cderv commentedon Aug 15, 2024
@aja08379 the hosted version has been updated. This version is used by rmarkdown itself, independently of the IDE version.
I don't think the IDE uses this version directly, but maybe it does (for mathjax preview of math in notebook maybe ?)