ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 20 Feb 2020 13:50:16 +0100Can I make MathJax output centered in the notebook?https://ask.sagemath.org/question/50002/can-i-make-mathjax-output-centered-in-the-notebook/ My problem is the same one described here:
[Equations in notebook jump from centered to L aligned upon rendering](https://github.com/ipython/ipython/issues/7827)
and
[Centered equations become left aligned if displayed through the markdown display hook](https://github.com/ipython/ipython/issues/11159)
When I use @interact on something that outputs latex in the notebook, the constant jumping to the left is very annoying and distracting.
E.g.:
@interact
def myfunc(n = slider(1,10)):
P = matrix([[1,2,n], [2,2,3]])
show(P)
Is there any way I can control the MathJax rendering in the notebook? Can I perhaps set it to render in the center so I don't have to deal with the jumping?
ThanksThu, 20 Feb 2020 13:40:07 +0100https://ask.sagemath.org/question/50002/can-i-make-mathjax-output-centered-in-the-notebook/Answer by eod for <p>My problem is the same one described here:</p>
<p><a href="https://github.com/ipython/ipython/issues/7827">Equations in notebook jump from centered to L aligned upon rendering</a></p>
<p>and</p>
<p><a href="https://github.com/ipython/ipython/issues/11159">Centered equations become left aligned if displayed through the markdown display hook</a></p>
<p>When I use @interact on something that outputs latex in the notebook, the constant jumping to the left is very annoying and distracting.</p>
<p>E.g.:</p>
<pre><code>@interact
def myfunc(n = slider(1,10)):
P = matrix([[1,2,n], [2,2,3]])
show(P)
</code></pre>
<p>Is there any way I can control the MathJax rendering in the notebook? Can I perhaps set it to render in the center so I don't have to deal with the jumping? </p>
<p>Thanks</p>
https://ask.sagemath.org/question/50002/can-i-make-mathjax-output-centered-in-the-notebook/?answer=50003#post-id-50003I searched for style.min.css in folder where I have Sagemath 9.0 v 0.6.0 installed. I opened the file and removed '!important' from the following line (10967):
div.output_area .MathJax_Display {
text-align: left !important;
}
The mathjax output is now centered for me.Thu, 20 Feb 2020 13:50:16 +0100https://ask.sagemath.org/question/50002/can-i-make-mathjax-output-centered-in-the-notebook/?answer=50003#post-id-50003