glushchenko / fsnotes

Notes manager for macOS/iOS
https://fsnot.es
MIT License
6.36k stars 467 forks source link

Backslashes in Math #1329

Open perfectionist opened 2 years ago

perfectionist commented 2 years ago

Description

I am adding math to my note and the double-\ (\) does not work to get newline. I have to do quad-\ (\\) to get a newline. Below is and example of both and the result.

Text:

image

Result:

image

To Reproduce

  1. load the Text
  2. Make sure Preview Mathjax is checked (in View menu)
  3. Toggle Preview

Expected behavior

In all other markdown editors I have they allow the LaTeX sytnax of a double-\ (\) for specifying a new line.

FSNotes version

5.3.9 (521)

macOS/iOS version

MacOS 12.3.1

Additional context

No response

glushchenko commented 2 years ago

Hi, @perfectionist

Honestly I don use MathJax at all, but you can configure it and make pull request. Code for this part stored here:

https://github.com/glushchenko/fsnotes/blob/e8d300b16c2c4a93231c0bacadd2c0f67e0c7454/FSNotes/View/MPreviewView.swift#L200

perfectionist commented 2 years ago

I will take a look but I will also try to upgrade to MathJax version 3. One request I was going to make was the numbering of certain equations. I use several Markdown editors that support either MathJax or KaTeX.

My grandson had a Discrete Math class in computer science department at Texas A&M University. They had to submit all home done in LaTeX because the professors felt student handwriting was to hard to read. Actually, he could use a Markdown language with either MathJax or KaTeX (KaTeX maybe faster but does support as much math stuff) as long as they could produce a PDF file.

On Apr 19, 2022, at 12:19 PM, glushchenko @.***> wrote:

Hi, @perfectionist https://github.com/perfectionist Honestly I don use MathJax at all, but you can configure it and make pull request. Code for this parthe t stored here:

https://github.com/glushchenko/fsnotes/blob/e8d300b16c2c4a93231c0bacadd2c0f67e0c7454/FSNotes/View/MPreviewView.swift#L200 https://github.com/glushchenko/fsnotes/blob/e8d300b16c2c4a93231c0bacadd2c0f67e0c7454/FSNotes/View/MPreviewView.swift#L200 — Reply to this email directly, view it on GitHub https://github.com/glushchenko/fsnotes/issues/1329#issuecomment-1102898256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADAFBJWCKD6MTRWW57QUCTVF3TILANCNFSM5TWSZKJQ. You are receiving this because you were mentioned.

saf-dmitry commented 2 years ago

Linebreaks are not yet implemented in MathJax version 3. This is one of the significant features from version 2 that has not yet been ported to version 3 (see https://github.com/mathjax/MathJax/issues/2312).