damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 414 forks source link

Cannot render certain LaTeX symbols after changing notebook's font using CSS #576

Closed angela-zhao closed 3 years ago

angela-zhao commented 3 years ago

I'm having trouble rending certain LaTeX symbols in the newest version of Jupyter Notebook when I change the notebook's font using CSS.

Current versions: jupyter core : 4.7.0 jupyter-notebook : 6.1.5

The same code works fine on the following version of Jupyter: jupyter core : 4.6.3 jupyter-notebook : 6.0.3

Here is the minimum code to reproduce the issue:

Cell 1 (Code)

%%HTML
<!-- execute this cell before continue -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
<style>
    .reveal * { font-family: "Lato" !important; } 
    .reveal .code_cell * { font-family: monospace !important; }    
    ul.sublist li {list-style-type: circle;}
    tbody.center-text tr td { text-align: center; }
</style>

Cell 2 (Markdown)

Math here: $\mathcal{N}$
Figure math:
$$\mathcal{N}$$

The symbols show up correctly in the Jupyter Notebook, but it's not rendering in the RISE slideshow.

This is what it shows up as in the slideshow: Screen Shot 2020-11-20 at 12 21 37 PM

It works as expected when I do not execute the first cell: Screen Shot 2020-11-20 at 12 23 47 PM

UPDATE: I have found the solution here: https://stackoverflow.com/a/58866858