lainsce / quilter

[DEPRECATED] Focus on your writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error converting equation in latex to markdown

anhkhoado93 opened this issue · comments

Latex inline equation and equation block get mixed up with markdown syntax.
Example: The following line: \(\sum_{n=1}^{\infty} 2^n\) . This prints:
![math equation](https://drive.google.com/file/d/1Ad4L7aBulg8PA8I28jiFnAAxDL3TZmSw/view?usp=sharing)
The ^{\infty} 2^ was superscripted rather than printing the math equation (in latex). I'm using version 2.5.1. Sorry if I am mistaken, I am new to markdown.

commented

Always encase your LaTeX code in $$...$$ for an equation block, and \(...\) for inline. Check also that the LaTeX extension is on in the settings.

Sorry, I dont think I described it clearly. The latex code was encased in \(...\), and LaTeX extension is on in Setting. The problem is that Quilter would take this line of code: ( \sum_{n=1}^{\infty} 2^n ) , where the "\sum_{subscript}^{superscript}" syntax would print the summation notation and 2^n would superscript the letter 'n' (in LaTeX).
However, Quilter mistook this notation and superscripted the text between two caret symbol '^'.

commented

Oh, I see. Well, collisions like this are common when mixing Markdown and LaTeX, and I think the solution is to use a function in LaTeX that looks like a superscript for now.

I'm going to fix this on 3.0 however for it to get to AppCenter will take a while because everything's delayed...

This issue should remain open because the problem is not resolved. Other LaTeX expressions fail to render properly, for example with Quilter 3.3.0:

Screenshot from 2021-02-12 19-01-17