Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to put Arabic or Kurdish text inside TeXView #163

Open
evan8133 opened this issue Oct 8, 2023 · 2 comments
Open

Try to put Arabic or Kurdish text inside TeXView #163

evan8133 opened this issue Oct 8, 2023 · 2 comments

Comments

@evan8133
Copy link

evan8133 commented Oct 8, 2023

Im trying to show math equations inside a TeXView but the problem is when i try to add some texts in between the equations that is either arabic or kurdish the last number will shift it place and it will useless and i was wondering is there a work around to this problem this is what im trying to show:

  TeXView(
                                  style: TeXViewStyle(
                                    textAlign: TeXViewTextAlign.right,
                                  ),
                                  child: TeXViewDocument(
                                    r"""کاتێک \(a \ne 0 \), چۆنی باشی \(ax^2 + bx + c = 0\) دەکاتە؟""",
                                  ),
                                ) 

But the 0 shits it place to the start of the equation.

@mohamedaminehnioua
Copy link

Since the package does not provide to specify the local property like in Text widget, use this instead it'll solve your problem :

          Directionality(
            textDirection: TextDirection.ltr,
            child: TeXView(
              style: TeXViewStyle(
                textAlign: TeXViewTextAlign.right,
                contentColor: Colors.white,
              ),
              child: TeXViewDocument(
                r"""کاتێک \(a \ne 0 \), چۆنی باشی \(ax^2 + bx + c = 0\) دەکاتە؟""",
                style: TeXViewStyle(contentColor: Colors.red),
              ),
            ),
          ),

@evan8133
Copy link
Author

evan8133 commented Oct 9, 2023

I hoped that would work for me but still was the same issue didn't fix the problem as showing in the image below i will attach, and i'm using Easy Localization but I don't think that would be a problem for it

https://drive.google.com/file/d/1yoNXCsA4_a8hSplJHOhEHqbPuSal0Xe7/view?usp=drivesdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants