<div dir="ltr">Hi<br><div class="gmail_extra"><br><div class="gmail_quote">On 20 September 2017 at 11:21, Ximin Luo <span dir="ltr"><<a href="mailto:infinity0@debian.org" target="_blank">infinity0@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Jan Groenewald:<br>
<div><div class="gmail-h5">> Hi<br>
><br>
> On 19 September 2017 at 21:18, Jan Groenewald <<a href="mailto:jan@aims.ac.za">jan@aims.ac.za</a>> wrote:<br>
><br>
>> Thanks<br>
>><br>
>> On 19 September 2017 at 21:08, Ximin Luo <<a href="mailto:infinity0@debian.org">infinity0@debian.org</a>> wrote:<br>
>><br>
>>> Samuel Lelièvre:<br>
>>>> Dear debian-science-sagemath,<br>
>>>><br>
>>>> There is a question on sage-devel about SageMath<br>
>>>> on Debian and MathJax:<br>
>>>><br>
>>>> <a href="https://groups.google.com/d/topic/sage-devel/sL_iYHfFB2M/discussion" rel="noreferrer" target="_blank">https://groups.google.com/d/<wbr>topic/sage-devel/sL_iYHfFB2M/<wbr>discussion</a><br>
>>>><br>
>>>> Could anyone on this list answer it?<br>
>>>><br>
>>><br>
>>> Hi, (I think) the default is actually controlled by Jupyter Notebook and<br>
>>> not SageMath. You can hack it locally by editing:<br>
>>><br>
>>> /usr/lib/python2.7/dist-<wbr>packages/notebook/templates/<wbr>notebook.html<br>
>>><br>
>>> I believe you just need to change, near the top:<br>
>>><br>
>>> {{mathjax_url}}?config=TeX-<wbr>AMS_HTML-full<br>
>>> to:<br>
>>> {{mathjax_url}}?config=TeX-<wbr>AMS_SVG-full<br>
>>><br>
>>> Afterwards, restart the notebook server. You might also need to clear<br>
>>> your cookies / local storage if you've specifically overridden that setting<br>
>>> for particular formulas.<br>
>>><br>
>>> I'm not sure the best way we could make this configurable across your<br>
>>> whole campus, but perhaps it's best to open an issue and discuss it with<br>
>>> the Jupyter Notebook people.<br>
>>><br>
>>><br>
>> Yes, seems to work! Discuss where with jupyter notebook people?  Seems irc<br>
>> and gitter is quiet. On github itself?<br>
>><br>
<br>
</div></div>Yes I meant on Github. But actually in the latest version of that file they have replaced the hardcoded config with a {{mathjax_config}}:<br>
<a href="https://github.com/jupyter/notebook/blob/master/notebook/templates/notebook.html#L8" rel="noreferrer" target="_blank">https://github.com/jupyter/<wbr>notebook/blob/master/notebook/<wbr>templates/notebook.html#L8</a><br>
<br>
According to this <a href="https://jupyter-notebook.readthedocs.io/en/latest/config.html" rel="noreferrer" target="_blank">https://jupyter-notebook.<wbr>readthedocs.io/en/latest/<wbr>config.html</a> the user can set it in ~/.jupyter/jupyter_notebook_<wbr>config.py<br>
NotebookApp.mathjax_config = 'TeX-AMS-MML_HTMLorMML-full,<wbr>Safe'<br>
<br>
(This version is not packaged yet for Debian, but hopefully soon.)<br>
<span class="gmail-"><br>
> Okay not sure from user feedback. Will have to check in person tomorrow.<br>
> whether it is working.<br>
><br>
<br>
</span>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.<br></blockquote><div><br></div><div>Yes, I completely removed ~/.mozilla, it still does not work to edit /usr/lib/python2.7/dist-packages/notebook/templates/notebook.html.<br></div><div>Maybe {{mathjax_url}} is not set and so that if statement is never entered?<br><br></div><div>Anyway, this worked for now, it seems. I will deploy this:<br><br></div><div>cd /usr/share/javascript/mathjax/config<br></div><div>mv TeX-AMS_HTML-full.js{,.orig}<br></div><div>ln -s TeX-AMS_CHTML-full.js tex-AIMS_HTML-full.js<br><br>so I get a symlink to use Common HTML instead of HTML-CSS:<br><br>root@muizenberg:/usr/share/javascript/mathjax/config#ls -l TeX-AMS_HTML-full.js                        <br>lrwxrwxrwx 1 root root 21 Sep 20 12:16 TeX-AMS_HTML-full.js -> TeX-AMS_CHTML-full.js<br><br></div><div>Regards,<br></div><div>Jan<br></div><div><br clear="all"></div></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="font-family:courier new,monospace">  .~. <br>  /V\     <span style="font-family:arial,helvetica,sans-serif">Jan Groenewald</span><br> /( )\    <a style="font-family:arial,helvetica,sans-serif" href="http://www.aims.ac.za" target="_blank">www.aims.ac.za</a><br> ^^-^^ </span><br></div></div></div></div></div></div>
</div></div>