djade007 / latext

A flutter package to efficiently display scientific LaTeX equations using the flutter_math library, without relying on WebView or JavaScript.
European Union Public License 1.2
12 stars 5 forks source link

\ne, \neq, \not = to; fail to parse in latext 0.4.0 #20

Open greatsam4sure opened 2 months ago

greatsam4sure commented 2 months ago

Thanks for the great work

$ \ne \cr \neq \cr \not = $

All give the not equal to math sign in version 0.3.0 but all fail in 0.4.0 due to \n is interpreted as a newline. so \ne gives e, \neq gives eq while \not = gives ot=.

This issue that causes these breaking changes $\left{\begin{array}{l}3 x-4 y=1 \ -3 x+7 y=5\end{array}\right.$ that fail v 0.3.0 could be made to parse by replace \ with \cr as shown below $\left{\begin{array}{l}3 x-4 y=1 \cr -3 x+7 y=5\end{array}\right.$

Besides \n works within $ $ but fails with array inside $ $

How do we make \ne, \neq or \not = to work in version 0.4.0

djade007 commented 2 months ago

I'll recommend specifying a breakDelimiter as temp fix while it's going to be fixed in the next release.

LaTexT(
  breakDelimiter: r'\nl', // custom new line delimiter
  laTeXCode: Text(
    r'$\neq$',
  ),
),
greatsam4sure commented 2 months ago

Thanks for this prompt response. Thanks a million times for the great package you brought our dreams to light.

For now I make a local copy of the package and change the breakdelimiter to \\ which work fine for me