mitex-rs/mitex

Package support

WeetHet opened this issue · 6 comments

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.

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

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

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.

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.

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.

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.