On Thu, Feb 15, 2024 at 11:56 PM Nils Bruin <nbr...@sfu.ca> 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, the text in the tip looks more like config file content than > javascript, so whoever wrote the tip probably didn't propose to change > javascript. Supposedly, they had a config file in mind somewhere, which > would not be minified. I have very limited knowledge of the configuration > mechanics of jupyter. > > The snippet looks like this: > ------------------------------------ > sphinx: > config: > mathjax_path: > https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js > ----------------------------------- > (that's the URL that should change to mathjax 3. Supposedly one might be > able to change that to a local resource) >
but that's sphinx (Python), not jupyter. jupyter is javascript, and its MathJax config is essentially a js script which one puts into html files inside <script></script> tags. Generation of this html happens whenever a notebook is rendered, so there should be a template somewhere with this js script. In https://github.com/jupyter/notebook/blob/main/notebook/app.py#L89 one has mathjax_url = self.settings.get(...) being defaulted to a CDN, if an env.var. "mathjax_url" is not set. And after that line you see code which looks like generation of an html page. I believe the answer is somewhere in https://github.com/jupyterlab/jupyterlab/issues/9911 (but now it's 1am here, and I'm lost there :-)) > Hopefully jupyter can provide a more obvious way to tweak this option, but > even knowing where one can change this option effectively might already be > useful (especially in cases where the default doesn't do what one wants). > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/d4823c77-7dba-4210-9192-e286d4f109abn%40googlegroups.com > <https://groups.google.com/d/msgid/sage-devel/d4823c77-7dba-4210-9192-e286d4f109abn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq0q7g3TEg_5ytEUkU_gGnXXhhWtbxN6yRN8NxVC%2B36Bow%40mail.gmail.com.