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

Implement a remark plugin to embed typst in markdown documents #505

Open
quank123wip opened this issue Mar 24, 2024 · 4 comments
Open

Implement a remark plugin to embed typst in markdown documents #505

quank123wip opened this issue Mar 24, 2024 · 4 comments

Comments

@quank123wip
Copy link

Since several markdown renders supports using MathJax or KaTeX to render math contents, it's a good idea to make typst an alternative option.

And, of course, markdown-it is a good option too, but I'm not going to work on it.๐Ÿ˜ฎโ€๐Ÿ’จ

I'm going to work on this months later, just regard this issue as a reminder here. Of course, volunteers are welcomed.

@Myriad-Dreamin
Copy link
Owner

You can check it https://github.com/Myriad-Dreamin/typst.ts/tree/main/projects/rehype-typst, which renders typst math block in HTML.

@Enter-tainer
Copy link
Collaborator

combine remark-math and rehype-typst you can already do that. Demo here https://github.com/Myriad-Dreamin/typst.ts/blob/main/projects/rehype-typst/test.js#L28

@Loosetooth
Copy link

Loosetooth commented Mar 25, 2024

I was going to try the rehype-typst package, but I can't install it.

https://github.com/Myriad-Dreamin/typst.ts/blob/main/projects/rehype-typst/README.md?plain=1#L37

Is it published on npm?

I was also trying to install it directly from the git repo, but I couldn't immediately figure out how to install a package from a subfolder of a git repo.

EDIT:
I used this app to install rehype-typst from a subfolder of this git repo: https://gitpkg.vercel.app/about
Add the following url in the app: https://github.com/Myriad-Dreamin/typst.ts/tree/main/projects/rehype-typst

@Myriad-Dreamin
Copy link
Owner

I was going to try the rehype-typst package, but I can't install it.

https://github.com/Myriad-Dreamin/typst.ts/blob/main/projects/rehype-typst/README.md?plain=1#L37

Is it published on npm?

I was also trying to install it directly from the git repo, but I couldn't immediately figure out how to install a package from a subfolder of a git repo.

EDIT: I used this app to install rehype-typst from a subfolder of this git repo: https://gitpkg.vercel.app/about Add the following url in the app: https://github.com/Myriad-Dreamin/typst.ts/tree/main/projects/rehype-typst

It's my missing that it is not published. I'll test it again and publish it then in this week.

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

4 participants