MathJax formatting issue
tryonkus opened this issue · comments
Description
I was just playing with the MathJax example note and changed the last bit to this (double dollar signs around the first equation):
## MathJax example
Documentation: https://www.mathjax.org
> Please choose: View > Preview MathJax
When $$((a \ne 0))$$, there are two solutions to $$ax^2 + bx + c = 0$$ and they are
$$x = \{-b \pm \sqrt{b^2-4ac} \over 2a\}.$$
When it rendered, the 2a at the bottom was partially cut off (see screen grab below):
![MathJax formatting bug](https://private-user-images.githubusercontent.com/167592851/324206789-6b1b6399-9d0d-4013-988b-930a54256ea9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA2NjYyNDgsIm5iZiI6MTcyMDY2NTk0OCwicGF0aCI6Ii8xNjc1OTI4NTEvMzI0MjA2Nzg5LTZiMWI2Mzk5LTlkMGQtNDAxMy05ODhiLTkzMGE1NDI1NmVhOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxMVQwMjQ1NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jOGRjNmI4YjM4NjQzMGQxNDA0N2Y5NzVkNzMyYjg5ZDRlMjI5MjMzODc3YzBhYWFmMzg2ZWE3OWU0M2M5NjNiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3dtSWAoT7dQwLCl-z5Jomw4St56Luqd3OzYKgAIofKE)
When I entered just the equation text into a new note, it rendered correctly.
To Reproduce
Edit text as described above
Expected behavior
Full equation should be rendered
FSNotes version
6
macOS/iOS version
14.4.1
Additional context
No response
The entire note renders correctly here:
6. Mermaid and MathJax
Mermaid example
Documentation: https://mermaidjs.github.io
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
MathJax example
Documentation: https://www.mathjax.org
Please choose: View > Preview MathJax
When
Curiouser and curiouser . . .
From the MathJax documentation:
The default math delimiters are $$...$$ and \[...\] for displayed mathematics, and \(...\) for
in-line mathematics. Note in particular that the $...$ in-line delimiters are not used by default.
Yet, FSNotes uses $ as an in-line delimiter and doesn't recognize the standards. Is this a GitHub flavored MathJax? I'm a bit of a newbie. The GitHub renderer seems to recognize $ and \$ both as a dollar sign character.
https://docs.mathjax.org/en/latest/input/tex/delimiters.html#tex-delimiters
Also, this page seems to say that MathJax does support $...$
in some cases:
https://docs.mathjax.org/en/latest/input/tex/differences.html
Not any criticism here—I just like playing with new software, and I'm good at breaking stuff. My nephew is a software tester, and I may have missed my calling (I'm in IT support and admin).
If I were a programmer, I’d be happy to dive in and debug. Sadly, I’m better at finding bugs than fixing them. I think it’s a great app, and I’m pushing some of the more obscure features.
If I were a programmer, I’d be happy to dive in and debug. Sadly, I’m better at finding bugs than fixing them. I think it’s a great app, and I’m pushing some of the more obscure features.
I am aircraft engines engineer, but occasionally i write the code. If you have ideas on how to improve the code, welcome to pull requests.
Thanks for the feedback, but i can't devote any more time to this task, sorry.