0xpapercut / wypst

Typst math typesetting for the web.
https://0xpapercut.github.io/wypst/
MIT License
55 stars 2 forks source link

wypst behind the scenes? #1

Open StrangeGirlMurph opened 7 months ago

StrangeGirlMurph commented 7 months ago

Hey @0xpapercut! I stumbled upon wypst a few days ago and it seems like the perfect fit for a project I have in mind. I am just having problems with properly trusting it because I just don't know how it works internally. HTML export for typst isn't a thing yet and you're not using something like pandoc. Could you please explain the inner workings of the module? It seems like you're using KaTeX so my current guess is that you translate typst to LaTeX and the render it using KaTeX. Idk please enlighten me :)

0xpapercut commented 7 months ago

The idea is that Typst, during the compilation process, produces a syntax tree, which can then be rendered graphically. This is in fact the same process KaTeX uses. My contribution is figuring out how a syntax tree in Typst should look like so that KaTeX understands it correctly.

I plan to continue working on it after my exams (end of this month); I'll write a nice explanation on how it works on the README.

What are you working on? Maybe I could give a hand :).

StrangeGirlMurph commented 7 months ago

So this is rather labor intense right? You have to manually map Typst to KaTeX. One syntax tree to another. But I don't fully understand it yet. Can you be certain that you eventually have all things and edge cases covered?

I am planning to create a fancier version of obsidian-typst and your obsidian-wypst C: Something similar to obsidian-latex-suite But yeah I have exams too :)

0xpapercut commented 7 months ago

I'll specify what are the limitations as well. But most expressions should work (there are currently lots of bugs which I'll fix in the future). You can test out a demo at wypst-demo.

StrangeGirlMurph commented 6 months ago

What is the current status? Can you give a little update. It's been a month. I saw that you worked on a few things.

0xpapercut commented 6 months ago

Hello, still TODO. The biggest holdup is another project of mine that is time sensitive. But it will be done; give me some weeks.

The next steps are refactoring, and some documentation on how it works, and what is supported.

0xpapercut commented 6 months ago

If you just want to understand how it works, I can explain to you in a call I think

pcheng17 commented 6 months ago

Looking forward to the documentation! I would also love to learn more about this and perhaps contribute if I can!