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

Package support #126

Open
WeetHet opened this issue Feb 11, 2024 · 6 comments
Open

Package support #126

WeetHet opened this issue Feb 11, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@WeetHet
Copy link

WeetHet commented Feb 11, 2024

Mitex cli should be able to support ctan, as most latex documents use a lot of packages. The initial possible implementation could include just outputting packages.typ file alongside the converted user file.

@OrangeX4
Copy link
Member

I don't quite understand what you mean, it would be nice if I could add more details.

@WeetHet
Copy link
Author

WeetHet commented Feb 16, 2024

I don't quite understand what you mean, it would be nice if I could add more details.

Right now, I can't use mitex with tex documents that use \usepackage in some way. This is unfortunate, as I can't convert basically any of my latex documents to Typst right now

@OrangeX4
Copy link
Member

MiTeX doesn't support many packages yet, and we still need a lot of effort to implement some common packages. So at the moment you can only hack many features manually using the \iftypst command.

@Enivex
Copy link

Enivex commented Feb 19, 2024

Mitex cli should be able to support ctan, as most latex documents use a lot of packages

Supporting all of CTAN would mean essentially creating a full tex -> typst transpiler. The most you could hope for is reimplementation of some of the more simple packages.

The purpose of MiTeX as I understand it is primarily embedding LaTeX snippets in typst documents, not conversion of full documents.

This is unfortunate, as I can't convert basically any of my latex documents to Typst right now

You may want to check out Pandoc. It's definitely not going to be as good for math, but it might support a larger subset of latex.

@Myriad-Dreamin
Copy link
Collaborator

Supporting all of CTAN would mean essentially creating a full tex -> typst transpiler. The most you could hope for is reimplementation of some of the more simple packages.

We actually want to reimplement some packages. Then CTAN support should mean that we import commands of packages by \usepackage.

PS: If typst could export some font metadata, we may implement plain tex commands to support translate package code. It is hard and crazy but may come in future.

@Enivex
Copy link

Enivex commented Feb 23, 2024

Supporting all of CTAN would mean essentially creating a full tex -> typst transpiler. The most you could hope for is reimplementation of some of the more simple packages.

We actually want to reimplement some packages. Then CTAN support should mean that we import commands of packages by \usepackage.

PS: If typst could export some font metadata, we may implement plain tex commands to support translate package code. It is hard and crazy but may come in future.

The package functionality reimplemented by mathjax and (to a lesser extent) katex might be a good starting point to look at.

@Myriad-Dreamin Myriad-Dreamin changed the title CTAN support Package support Mar 5, 2024
@Myriad-Dreamin Myriad-Dreamin added the enhancement New feature or request label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants