[Debian-science-sagemath] A question about SageMath on Debian and MathJax

Ximin Luo infinity0 at debian.org
Wed Sep 20 09:21:00 UTC 2017


Jan Groenewald:
> Hi
> 
> On 19 September 2017 at 21:18, Jan Groenewald <jan at aims.ac.za> wrote:
> 
>> Thanks
>>
>> On 19 September 2017 at 21:08, Ximin Luo <infinity0 at debian.org> wrote:
>>
>>> Samuel Lelièvre:
>>>> Dear debian-science-sagemath,
>>>>
>>>> There is a question on sage-devel about SageMath
>>>> on Debian and MathJax:
>>>>
>>>> https://groups.google.com/d/topic/sage-devel/sL_iYHfFB2M/discussion
>>>>
>>>> Could anyone on this list answer it?
>>>>
>>>
>>> Hi, (I think) the default is actually controlled by Jupyter Notebook and
>>> not SageMath. You can hack it locally by editing:
>>>
>>> /usr/lib/python2.7/dist-packages/notebook/templates/notebook.html
>>>
>>> I believe you just need to change, near the top:
>>>
>>> {{mathjax_url}}?config=TeX-AMS_HTML-full
>>> to:
>>> {{mathjax_url}}?config=TeX-AMS_SVG-full
>>>
>>> Afterwards, restart the notebook server. You might also need to clear
>>> your cookies / local storage if you've specifically overridden that setting
>>> for particular formulas.
>>>
>>> I'm not sure the best way we could make this configurable across your
>>> whole campus, but perhaps it's best to open an issue and discuss it with
>>> the Jupyter Notebook people.
>>>
>>>
>> Yes, seems to work! Discuss where with jupyter notebook people?  Seems irc
>> and gitter is quiet. On github itself?
>>

Yes I meant on Github. But actually in the latest version of that file they have replaced the hardcoded config with a {{mathjax_config}}:
https://github.com/jupyter/notebook/blob/master/notebook/templates/notebook.html#L8

According to this https://jupyter-notebook.readthedocs.io/en/latest/config.html the user can set it in ~/.jupyter/jupyter_notebook_config.py
NotebookApp.mathjax_config = 'TeX-AMS-MML_HTMLorMML-full,Safe'

(This version is not packaged yet for Debian, but hopefully soon.)

> Okay not sure from user feedback. Will have to check in person tomorrow.
> whether it is working.
> 

Did they reset their cookies / local storage? I'm not sure of the easiest way to selectively do that, but ctrl-shift-delete in Chrome and Firefox will get rid of a whole chunk of stuff.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Debian-science-sagemath mailing list