c-w / mathquill4quill

Power-up Quill's formula editing via the MathQuill editor
https://justamouse.com/mathquill4quill
Apache License 2.0
139 stars 33 forks source link

Is this deliberate Or a bug? #85

Closed ultrainstinct1987 closed 2 years ago

ultrainstinct1987 commented 2 years ago

Hi, I manage to figure out quite abit of stuff on this mathquill4quill.

i have the last question to ask if anyone can answer. When typing \displaystyle\sum it was displaying summation with text above and below the summation in the mini textbook.

However, when I click save, the text appear next to summation sign instead. Is there anyway which I can fixed it?

c-w commented 2 years ago

So the preview uses katex for rendering but the editor uses mathquill to display the math after it's been entered. Could you check if the formula you're writing renders differently on these two libraries? There are preview widgets on each of the linked project pages.

ultrainstinct1987 commented 2 years ago

I think the main issue is that the preview uses \displaystyle\sum where as once it get input into the editor, it become \sum or \textstyle\sum

c-w commented 2 years ago

So it looks like MathQuill doesn't support \displaystyle, see https://github.com/mathquill/mathquill/issues/589. As such, there's not much we can do in this project as QuillJS depends on MathQuill.

ultrainstinct1987 commented 2 years ago

So it looks like MathQuill doesn't support \displaystyle, see mathquill/mathquill#589. As such, there's not much we can do in this project as QuillJS depends on MathQuill.

MathQuill does support display style for summation. but when it is save into QuillJS, it become textstyle

I managed to fix it by checking if latex contain \sum and replace the latex by \displaystyle\sum.

![Uploading A987AB20-7AF7-4804-96F7-B413493E51F6.jpeg…]()

ultrainstinct1987 commented 2 years ago

0879DE06-1DF6-4F1B-866D-10BB1762EF09 56556654-9083-4708-9039-68FD663CA895