Re: Sans-serif fonts in LaTeX labels for Jupyter widgets?
Jason Grout <[email protected]> Tue, 14 Feb 2017 17:58:50 +0000
| Newsgroups | gmane.comp.python.ipython.devel |
|---|---|
| Message-ID | <CAPDWZHwZrNVxbqGJ-LKGDwwnxM907jWdKtoc9no0iAKhoTRazA@mail.gmail.com> |
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: https://github.com/mathjax/mathjax-docs/wiki/Can-MathJax-use-font-xxxx%3F. He might have an updated answer if you ask on the MathJax mailing list. Thanks, Jason On Tue, Feb 14, 2017 at 9:00 AM Johann Rohwer <[email protected]> wrote: The documentation on layout and styling of Jupyter widgets mentions that Label widget can also render LaTeX equations: http://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Styling.html#Latex 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's? matplotlib.rcPararams['mathtext.fontset'] = 'stixsans' Cheers, Johann _______________________________________________ IPython-dev mailing list [email protected] https://mail.scipy.org/mailman/listinfo/ipython-dev _______________________________________________ IPython-dev mailing list [email protected] https://mail.scipy.org/mailman/listinfo/ipython-dev