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

Pure native android support #1840

Closed
manoj-madanmohan-toppr opened this issue Jan 30, 2019 · 4 comments
Closed

Pure native android support #1840

manoj-madanmohan-toppr opened this issue Jan 30, 2019 · 4 comments
Labels

Comments

@manoj-madanmohan-toppr
Copy link

Is there any plan to build a port of this for native android? We were hoping to render Katex directly on an android customview, without any kind of webview in between

Has any thought gone onto this? Is this feasible?

@edemaine
Copy link
Member

This is related to alternate output mechanisms, in particular, Canvas (#251) and SVG (#375) which require explicit layout (whereas current rendering definitely relies on an HTML rendering engine for layout). We haven't implemented any such alternative output mechanisms; they are possible in principle, but it's a rather large effort.

If you wanted to avoid a V8 engine too, this would involve porting a ton of JavaScript code into Android Java -- I'm not aware of such an effort, and this is less likely to happen, as it would fork the code.

@kevinbarabash
Copy link
Member

In order to do this we really need to hammer out an intermediate representation and then migrate existing code to use this representation. Once we have that we can work on separate backends. Echoing what @edemaine said, this is a rather large effort. I wonder if it would be easier to adapt an existing Java-based TeX rendered for use on Android.

@karino2
Copy link

karino2 commented Apr 10, 2019

We are doing somewhat similar thing. (though not exactly the same as this issue).

https://github.com/karino2/kotlitex/

This is basically

  • port KaTeX to kotlin
  • port canvas-latex to android native canvas

Of course kotlin is different language and sometime it's impossible to map 1 by 1 from node code to kotlin code.
But we try to keep code as equal as possible.

We are not yet even in alpha stage, but basic structure of code is determined and current code base already show some feasibility of our idea.

@ylemkimon
Copy link
Member

Closing in favor of existing issues.

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

No branches or pull requests

5 participants