xushengs / flutter_markdown_latex

A flutter markdown latex extension
Apache License 2.0
12 stars 8 forks source link

Inline latex doesn't work for long texts. #7

Open kamalbanga opened 9 months ago

kamalbanga commented 9 months ago

This is inline latex: $f(x) = \\sum_{i=0}^{n} \\frac{a_i}{1+x}$ works fine but Extra words for testing. This is inline latex: $f(x) = \\sum_{i=0}^{n} \\frac{a_i}{1+x}$ doesn't. The 2nd one breaks the formula into the next line unnecessarily.

image

kamalbanga commented 9 months ago

BTW @xushengs, thanks for creating this library :)

xushengs commented 8 months ago

breaks the formula into the next line

This looks like a bug in flutter_markdown: https://github.com/flutter/flutter/issues/123195

xushengs commented 8 months ago

Fixed with PR https://github.com/xushengs/flutter_markdown_latex/pull/8

Murmurl912 commented 8 months ago

single dollar inline latex format: $e = mc^2$ is not supported by most markdown libs. because they treat $$ e = mc^ 2 $$ as inline too. If you can use $$ $$ just used it for compatibility.

kamalbanga commented 7 months ago

BTW, I just tested this and this didn't get fixed!

iamshivkumar commented 2 months ago

I am waiting for this fix. long text after latex equation comes to next line.

acrowfliedover commented 1 month ago

also sometimes the latex is not rendered, if it's at the end of line