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

Display delimiter doesn't work #6

Closed prok155 closed 7 months ago

prok155 commented 7 months ago

I would like to center some part of my latex, for example:

LaTexT( displayDelimiter: r'$$', laTeXCode: Text( r'Here is the fraction: $$\frac{3}{4}$$', style: Theme.of(context).textTheme.bodyMedium, ), ),

The fraction 3/4 should be displayed in the center of the screen, currently it is displayed on a new line and it's not centered. Seems like displayDelimiter doesn't work at all.

djade007 commented 7 months ago

A single $ works fine.

LaTexT(laTeXCode: Text( r'Here is the fraction: $\frac{3}{4}$', style: Theme.of(context).textTheme.bodyMedium, ), ),

prok155 commented 7 months ago

You can paste Here is the fraction: $$\frac{3}{4}$$ and Here is the fraction: $\frac{3}{4}$ to overleaf or any LaTeX editor and you will see what I'm talking about. Look at following screens which will explain this bug:

Current state: Screenshot_1701190416

Expected result Screenshot_1701189847

When you use double $$, Math expression should be started form a new line and sohuld be centered. With your package it is started from a new line, but it's not centered and it looks ugly.

djade007 commented 7 months ago

Fixed in version: 0.2.0