MathJax3 support

34 views
Skip to first unread message

ekwa...@gmail.com

unread,
Mar 15, 2021, 12:11:31 AM3/15/21
to sage-cell
Hi Andrey,

I uploaded a PR to support MathJax3 (as well as MathJax 2) sites. It works well with my site. But perhaps it would need more extensive tests before deploying to the main sagemath site. 

Please check it out. Thanks.

Kwankyu

Andrey Novoseltsev

unread,
Mar 15, 2021, 7:19:55 PM3/15/21
to sage-cell
I have deployed it to http://cosmos.mat.uam.es:8888/ and it does not work for me for a non-obvious yet reason. Can you please take a look? Otherwise I'll try to get to it next weekend.

ekwa...@gmail.com

unread,
Mar 15, 2021, 8:12:11 PM3/15/21
to sage-cell
It seems working fine. What is your example that is not working?

Andrey Novoseltsev

unread,
Mar 15, 2021, 8:53:04 PM3/15/21
to sage-cell
On Monday, 15 March 2021 at 18:12:11 UTC-6 ekwa...@gmail.com wrote:
It seems working fine. What is your example that is not working?

show(x) shows nothing for me both in Firefox and Chrome on Debian!

ekwa...@gmail.com

unread,
Mar 15, 2021, 9:33:44 PM3/15/21
to sage-cell
On Tuesday, March 16, 2021 at 9:53:04 AM UTC+9 novo...@gmail.com wrote:
On Monday, 15 March 2021 at 18:12:11 UTC-6 ekwa...@gmail.com wrote:
It seems working fine. What is your example that is not working?

show(x) shows nothing for me both in Firefox and Chrome on Debian!

The reason is that show(x) outputs the math in a format recognized only by MathJax2. 

There is a workaround to convert the old format to the normal format recognized by MathJax3. I will upload a PR for this soon.

But a proper way to deal with this issue is to fix sage itself to work with MathJax3. If all frontends (Jupyter and sagecell?) support MathJax3, then we could fix sage and drop the workaround. 

 

Andrey Novoseltsev

unread,
Mar 15, 2021, 10:45:19 PM3/15/21
to sage-cell
Then perhaps SageMath should start supporting MathJax3 and then we need to adapt frontends to support it as well? I prefer to stay in sync with SageMath as much as possible.

 

ekwa...@gmail.com

unread,
Mar 16, 2021, 1:36:08 AM3/16/21
to sage-cell
On Tuesday, March 16, 2021 at 11:45:19 AM UTC+9 novo...@gmail.com wrote:

Then perhaps SageMath should start supporting MathJax3 and then we need to adapt frontends to support it as well? I prefer to stay in sync with SageMath as much as possible.

 With the second PR, sagecell will support both MathJax2 and MathJax3 and hence the current SageMath. So sagecell may go ahead and wait for SageMath to catch up.

Andrey Novoseltsev

unread,
Mar 16, 2021, 12:14:14 PM3/16/21
to sage-cell
Deployed on the test server, works for me now, thank you! I'll let others test as well in case someone want to do it, will roll it out to public servers in a few days.

ekwa...@gmail.com

unread,
Mar 16, 2021, 7:49:11 PM3/16/21
to sage-cell
On Wednesday, March 17, 2021 at 1:14:14 AM UTC+9 novo...@gmail.com wrote:
Deployed on the test server, works for me now, thank you! I'll let others test as well in case someone want to do it, will roll it out to public servers in a few days.

Thanks. I will start fixing sage for mathjax3 soon, hoping it is an easy work.
 

ekwa...@gmail.com

unread,
Mar 18, 2021, 10:23:16 PM3/18/21
to sage-cell
Reply all
Reply to author
Forward
0 new messages