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

Support for rendering equations #12927

Closed
mehmetf opened this issue Nov 8, 2017 · 11 comments
Closed

Support for rendering equations #12927

mehmetf opened this issue Nov 8, 2017 · 11 comments

Comments

@mehmetf
Copy link
Contributor

mehmetf commented Nov 8, 2017

We heard this requirement from an internal team; creating an issue here to start a discussion on the best way to support this.

They would like to use Latex(like) markup to render equations in a Flutter app.

They considered using WebView support which will be coming up however they are concerned about having multiple webviews active in the app at the same time. Their UI contains several tiles as a preview list for articles, each tile having some text snippet which might contain formulae.

@eseidelGoogle
Copy link
Contributor

Latex equations are typically static. This feels like something that could be done well from some sort of shared library (C++, etc.) which took latex as a source and spit out rendered images. One could pretty easily write a Flutter plugin around such a library.

@eseidelGoogle
Copy link
Contributor

eseidelGoogle commented Nov 8, 2017

I would love to learn more about the desires/requirements here (privately or otherwise), as I'm not aware of any blockers from producing a latex-rendering plugin for Flutter today, even one which integrates into layout with other Flutter widgets. Having #7053 resolved would likely remove some boilerplate from doing so, but shouldn't be a blocker.

I do not believe that someone will want to write a new Latex renderer in Dart/Flutter, since Latex is somewhat complex and thus a new latex renderer would be non-trivial to write/maintain. It would be possible, but would not be the first way I would attempt to solve the problem.

@mehmetf
Copy link
Contributor Author

mehmetf commented Nov 8, 2017

Sample Libraries that can be used for a plugin provided that conversion to images is good enough:

Java Library for converting Latex to SVG: https://github.com/opencollab/jlatexmath
For iOS: https://github.com/kostub/iosMath

@Hixie
Copy link
Contributor

Hixie commented May 21, 2018

I don't expect the Flutter team to provide a LaTeX rendering package. I don't think anything is in the way of someone doing that, though, just like a charting library was created for Flutter or how an SVG library is being written.

I'm going to close this issue on the basis that it doesn't represent something we need to do, but if anyone ever tries to do this and runs into any trouble, please don't hesitate to reach out or file specific bugs.

@Hixie Hixie closed this as completed May 21, 2018
@wxlpp
Copy link

wxlpp commented Apr 18, 2019

@shah-xad
Copy link

shah-xad commented May 18, 2019

Please check this flutter package https://github.com/shah-xad/flutter_tex

@yarcowang
Copy link

plus Markdown (js: marked)
plus Latex(js: katex)
At least, they have javascript versions...
(I'm sorry, I can only make request...)

@takdw
Copy link

takdw commented Jul 8, 2019

@shahxadakram That is a pretty neat package. Doesn't play well with complex layouts though. I have to figure out another way of integrating it in my app. Thanks for the share.

@shah-xad
Copy link

@shahxadakram That is a pretty neat package. Doesn't play well with complex layouts though. I have to figure out another way of integrating it in my app. Thanks for the share.

Would you like to mention the issues, I made some amendments in the latest version, Please check that , https://pub.dev/packages/flutter_tex, You can create issue regarding any problem in package.

@mikeroneer
Copy link

@shahxadakram That is a pretty neat package. Doesn't play well with complex layouts though. I have to figure out another way of integrating it in my app. Thanks for the share.

Hi @takdw! Do you have any updates on that? Could you find a way to address this issue?

@lock
Copy link

lock bot commented Apr 15, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@lock lock bot locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants