Ask Your Question
0

Can I make MathJax output centered in the notebook?

asked 2020-02-20 13:40:07 +0100

eod gravatar image

My problem is the same one described here:

Equations in notebook jump from centered to L aligned upon rendering

and

Centered equations become left aligned if displayed through the markdown display hook

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?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-20 13:50:16 +0100

eod gravatar image

I 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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-02-20 13:40:07 +0100

Seen: 359 times

Last updated: Feb 20 '20