Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-23 Thread Dima Pasechnik
My experiments with a pure upstream jupyterlab show that this is not reproducible there. Namely: 1) clean up cache of your browser 2) create a fresh venv and pip install jupyterlab there, and the corresponding mathjax package: $ python3 -m venv foo $. foo/bin/activate (foo) $ pip install jupyter

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-16 Thread Eric Gourgoulhon
Hi Nils, Le vendredi 16 février 2024 à 04:37:28 UTC+1, Nils Bruin a écrit : On Thursday 15 February 2024 at 17:02:14 UTC-8 Dima Pasechnik wrote: but that's sphinx (Python), not jupyter. I see. The page I linked to is from Jupyter{book} which is, despite the similarity in name, not the jupyter

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Nils Bruin
On Thursday 15 February 2024 at 17:02:14 UTC-8 Dima Pasechnik wrote: but that's sphinx (Python), not jupyter. I see. The page I linked to is from Jupyter{book} which is, despite the similarity in name, not the jupyter notebook server. -- You received this message because you are subscribed to

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Dima Pasechnik
On Thu, Feb 15, 2024 at 11:56 PM Nils Bruin wrote: > On Thursday 15 February 2024 at 13:19:47 UTC-8 Michael Orlitzky wrote: > > > The notebook release process minifies all of its javascript code. The > bit that sets the MathJax options is in there somewhere but good luck > finding it. > > Well, t

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Nils Bruin
On Thursday 15 February 2024 at 13:19:47 UTC-8 Michael Orlitzky wrote: The notebook release process minifies all of its javascript code. The bit that sets the MathJax options is in there somewhere but good luck finding it. Well, the text in the tip looks more like config file content than ja

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Dima Pasechnik
https://discourse.jupyter.org/t/notebook-with-mathjax-without-internet-connection/23958 On Thursday, February 15, 2024 at 5:37:31 PM UTC Matthias Koeppe wrote: > I would suggest to raise the question what the best practices for offline > deployment are with the Jupyter project. > > On Thursday,

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Michael Orlitzky
On Thu, 2024-02-15 at 13:13 -0800, Nils Bruin wrote: > According to the jupyter notebook documentation: > > https://jupyterbook.org/en/stable/content/math.html > > it should be possible to switch jupyter from using mathjax 2 to mathjax 3 > by some configuration option (no clue where those config

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Nils Bruin
According to the jupyter notebook documentation: https://jupyterbook.org/en/stable/content/math.html it should be possible to switch jupyter from using mathjax 2 to mathjax 3 by some configuration option (no clue where those configuration options would go, and no indication is given in the tip

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Matthias Koeppe
I would suggest to raise the question what the best practices for offline deployment are with the Jupyter project. On Thursday, February 15, 2024 at 9:30:10 AM UTC-8 Eric Gourgoulhon wrote: > Le jeudi 15 février 2024 à 13:36:46 UTC+1, Dima Pasechnik a écrit : > > A possible solution does not inv

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Eric Gourgoulhon
Le jeudi 15 février 2024 à 13:36:46 UTC+1, Dima Pasechnik a écrit : A possible solution does not involve changing Sage/Jupyter config. It's by capturing http requests to CDN and replacing them with the local resources. Thank you Dima! Could you indicate how to do this? (looks quite technical

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Dima Pasechnik
A possible solution does not involve changing Sage/Jupyter config. It's by capturing http requests to CDN and replacing them with the local resources. See e.g. https://discourse.jupyter.org/t/running-voila-without-internet/13823/3 where this is proposed for another MathJax-dependent project.

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Eric Gourgoulhon
Le jeudi 15 février 2024 à 11:20:40 UTC+1, Kwankyu Lee a écrit : With the previous version of Jupyterlab shipped with Sage 10.2, the system's MathJax was used. Can't we tweak the new Jupyterlab shipped with Sage 10.3 to use the system's MathJax as well? We don't do that. Perhaps tweaking is

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Dima Pasechnik
On 15 February 2024 10:20:39 GMT, Kwankyu Lee wrote: > > >With the previous version of Jupyterlab shipped with Sage 10.2, the >system's MathJax was used. > >Can't we tweak the new Jupyterlab shipped with Sage 10.3 to use the >system's MathJax as well? > > >We don't do that. Perhaps tweaking

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Kwankyu Lee
I guess that before notebook 7, jupyter vendored mathjax with it, but after notebook 7, jupyter only uses cdn. This sounds a strange policy from Jupyter, since it prevents people from using notebooks offline. Are you sure about this? No. I would be happy if it is configurable as Dima said.

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Kwankyu Lee
With the previous version of Jupyterlab shipped with Sage 10.2, the system's MathJax was used. Can't we tweak the new Jupyterlab shipped with Sage 10.3 to use the system's MathJax as well? We don't do that. Perhaps tweaking is more severe sin than sage vendoring jupyter, from Dima's viewpo

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Dima Pasechnik
On 15 February 2024 09:18:06 GMT, Eric Gourgoulhon wrote: >Le jeudi 15 février 2024 à 04:54:42 UTC+1, Kwankyu Lee a écrit : > > >I checked again on mac. Yes, jupyterlab (and notebook 7 as well) of Sage >10.3.beta8 fails in loading mathjax 2.7.7. (Before it worked because of the >cache, I gue

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-15 Thread Eric Gourgoulhon
Le jeudi 15 février 2024 à 04:54:42 UTC+1, Kwankyu Lee a écrit : I checked again on mac. Yes, jupyterlab (and notebook 7 as well) of Sage 10.3.beta8 fails in loading mathjax 2.7.7. (Before it worked because of the cache, I guess) OK, thanks for the feedback! Hence this is not a Ubuntu-specif

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Kwankyu Lee
On Thursday, February 15, 2024 at 3:18:06 AM UTC+9 Eric Gourgoulhon wrote: Le mercredi 14 février 2024 à 18:21:04 UTC+1, Matthias Koeppe a écrit : You may recall that we use jupyterlab_mathjax2 because of the discussion in https://github.com/sagemath/sage/pull/36129#issuecomment-1729218062

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 18:21:04 UTC+1, Matthias Koeppe a écrit : You may recall that we use jupyterlab_mathjax2 because of the discussion in https://github.com/sagemath/sage/pull/36129#issuecomment-1729218062 Thanks for reminding me about this. Then I guess the question is: why Jupyter

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Matthias Koeppe
You may recall that we use jupyterlab_mathjax2 because of the discussion in https://github.com/sagemath/sage/pull/36129#issuecomment-1729218062 On Wednesday, February 14, 2024 at 8:04:30 AM UTC-8 Eric Gourgoulhon wrote: > Le mercredi 14 février 2024 à 15:09:27 UTC+1, Eric Gourgoulhon a écrit

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 15:09:27 UTC+1, Eric Gourgoulhon a écrit : The partial conclusion is thus: - Sage 10.2 uses Ubuntu 22.04's MathJax (v2.7.9), so there is no issue when the computer is offline. - for some reason, Sage 10.3.beta* refuses to use Ubuntu 22.04's MathJax and the MathJax

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 15:39:05 UTC+1, Kwankyu Lee a écrit : On Wednesday, February 14, 2024 at 10:55:41 PM UTC+9 Eric Gourgoulhon wrote: Le mercredi 14 février 2024 à 14:51:01 UTC+1, Eric Gourgoulhon a écrit : What is puzzling is that MathJax 3.2.0 seems to have been successfully instal

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Dima Pasechnik
That's why we should just stop shipping jupyterlab, and instead use one offered by the OS or some other standard Jupyter way. Here we are trying to solve already solved problems, what's the point of it? On 14 February 2024 14:39:05 GMT, Kwankyu Lee wrote: > > >On Wednesday, February 14, 2024

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Kwankyu Lee
On Wednesday, February 14, 2024 at 10:55:41 PM UTC+9 Eric Gourgoulhon wrote: Le mercredi 14 février 2024 à 14:51:01 UTC+1, Eric Gourgoulhon a écrit : What is puzzling is that MathJax 3.2.0 seems to have been successfully installed in the Sage tree during the install of Sage 10.3.beta*, cf. the

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 14:51:01 UTC+1, Eric Gourgoulhon a écrit : More precisely, the Ubuntu 22.04's libjs-mathjax is version 2.7.9. When the computer is online and I right-click on "About MathJax" in a displayed cell, I get "MathJax v2.7.7", which is not the system version... If I do

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 14:51:01 UTC+1, Eric Gourgoulhon a écrit : What is puzzling is that MathJax 3.2.0 seems to have been successfully installed in the Sage tree during the install of Sage 10.3.beta*, cf. the attached log (SAGE_ROOT/logs/pkgs/mathjax-3.2.0.log), Well, maybe not: th

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 14:18:20 UTC+1, Eric Gourgoulhon a écrit : Le mercredi 14 février 2024 à 14:13:04 UTC+1, Dima Pasechnik a écrit : For off the grid working with MathJax, you need it locally installed. It might be that by default it doesn't happen, and MathJax is dynamically loade

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Le mercredi 14 février 2024 à 14:13:04 UTC+1, Dima Pasechnik a écrit : For off the grid working with MathJax, you need it locally installed. It might be that by default it doesn't happen, and MathJax is dynamically loaded from the net. The Ubuntu packages libjs-mathjax and fonts-mathjax are

Re: [sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Dima Pasechnik
For off the grid working with MathJax, you need it locally installed. It might be that by default it doesn't happen, and MathJax is dynamically loaded from the net. On 14 February 2024 12:47:52 GMT, Eric Gourgoulhon wrote: >Hi, > >While working on a Sage 10.3.beta notebook in a train withou

[sage-devel] No MathJax display in Sage 10.3.beta notebooks when offline

2024-02-14 Thread Eric Gourgoulhon
Hi, While working on a Sage 10.3.beta notebook in a train without any internet connection, I've noticed that there is no LaTeX rendering via MathJax, neither in the markdown cells nor in the output cells within the scope of %display latex. There is no such issue with Sage 10.2 and I've opened