[IPython-dev] Sans-serif fonts in LaTeX labels for Jupyter widgets?

Jason Grout jason at jasongrout.org
Tue Feb 14 12:58:50 EST 2017

Good question. In theory, since we use MathJax for the rendering, this
would be possible on a local notebook server by modifying the MathJax
config in a custom.js file (see
http://docs.mathjax.org/en/latest/options/HTML-CSS.html?highlight=stix and
http://docs.mathjax.org/en/latest/font-support.html). You could set the
preferredFont to null, and use one of the web fonts, for example.

It looks like Davide (author of MathJax) has talked about using sans serif
fonts before:
He might have an updated answer if you ask on the MathJax mailing list.



On Tue, Feb 14, 2017 at 9:00 AM Johann Rohwer <jr at sun.ac.za> wrote:

The documentation on layout and styling of Jupyter widgets mentions that
Label widget can also render LaTeX equations:

On my machine, these equations render in a serif font by default. Is it
possible to change the default font set to use sans-serif fonts, similar to
     matplotlib.rcPararams['mathtext.fontset'] = 'stixsans'

IPython-dev mailing list
IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20170214/c299ea2f/attachment.html>

More information about the IPython-dev mailing list