damianavila / RISE

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

How can I change the style definition for the MathJax_Display DIV _ 2nd try #522

Closed halloleo closed 4 years ago

halloleo commented 4 years ago

I'm commenting on #521 because I cannot re-open it.

Thanks for the reply @parmentelat. I am aware how to add custom CSS. Problem here is that the DIV itself in the HTML seems to have the CSS style as an attribute:

<div class="MathJax_Display" style="text-align: center;">

I don't think I can overwrite this with an external CSS sheet, because, from my understanding, the style attribute in the HTML takes precedence.

So somehow the HTML code RISE emits for the slideshow needs to be customised, right? Is there a way to do this?

Many thanks, Leo

parmentelat commented 4 years ago

Hello, and sorry for having closed too early, I thought it was easy to reopen

The thing is, rise is indeed responsible for the css-injection code, but otoh there is nothing with rise by itself that deals with equations or Mathjax specifically

In other words what you’re seeing is an outcome of the Jupyter notebook as-is I can’t off the top of my head see any reason why the notebook would hard-style an element like this, but there must be a good reason for that

In any case it feels like the solution should be more fruitfully searched with the jupyter notebook, either on discourse or github

halloleo commented 4 years ago

Good point! I didn't think of the fact the Jupyter notebook itself already displays the math stuff - and RISE only pushes the HTML to reveal.js. - Will try my luck with Jupyter!