NanoMichael / MicroTeX

A dynamic, cross-platform, and embeddable LaTeX rendering library
MIT License
399 stars 66 forks source link

TikZ support #4

Open grant-roy opened 4 years ago

grant-roy commented 4 years ago

Hi, this project looks great!

Does this support Latex packages like tikz or working with types?

NanoMichael commented 4 years ago

Currently, I don't have plans to support tikz, one reason is this project aims to be a sub-package of the standard TeX language and another reason is, the tikz works in a very different way, maybe I'll change the implementation of the parsing algorithm in the future to support external packages.

grant-roy commented 4 years ago

Would something like bussproofs.sty be possible? I see at the bottom of the repo you are planning to support the def command. I guess what I am really looking for is a way to do latex typesetting on the web for things like proof and type theory (for a web forum). Katex and MathJax are not really good enough for this. Another question, have you every tried compiling this to WebAssembly? I could envision this working as a WebAssembly module when you pass it latex strings and it sends you SVG's, which would be really cool. I'm not sure this would work though, just a thought.

NanoMichael commented 4 years ago

It is possible to make custom macros until the def command is supported, actually, I've planning to implement it for a very long time, but it is such a huge project and I don't have much time to back it. And my answer to your second question is, I'm not familiar with WebAssembly, but this is a very cool idea, maybe I should shift the focus of my work on this repo to WebAssembly.

grant-roy commented 4 years ago

I see, I will attempt to play around with it in the coming days. With respect to WebAssembly, as I was googling around I found this, which looks to be an approach where they are compiling tex straight away to WebAssembly. This looks to be a fairly new project on Github. It seems like these are the first attempts trying to bring full tex/latex functionality to the web natively (everything running completely in the browser--no network calls to a tex server etc). For my purposes, I don't really need TikZ stuff (doing some category theory style diagramming would be nice), just having a really performant implementation of basic latex with proof tree macros would be I think a huge improvement over the subset of MathJax and Katex available.