{"id":25319429,"url":"https://github.com/qwinsi/tex2typst","last_synced_at":"2025-12-24T18:27:09.812Z","repository":{"id":248445207,"uuid":"828703238","full_name":"qwinsi/tex2typst","owner":"qwinsi","description":"JavaScript library for conversion between TeX/LaTeX and Typst math formula code.","archived":false,"fork":false,"pushed_at":"2025-01-28T16:43:58.000Z","size":410,"stargazers_count":15,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T12:12:29.388Z","etag":null,"topics":["latex","math-formula","tex","typst"],"latest_commit_sha":null,"homepage":"https://qwinsi.github.io/tex2typst-webapp/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qwinsi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-15T00:08:06.000Z","updated_at":"2025-02-06T10:22:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"773f8e21-67b6-483c-b422-e3c94c059459","html_url":"https://github.com/qwinsi/tex2typst","commit_stats":null,"previous_names":["qwinsi/tex2typst"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwinsi%2Ftex2typst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwinsi%2Ftex2typst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwinsi%2Ftex2typst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwinsi%2Ftex2typst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qwinsi","download_url":"https://codeload.github.com/qwinsi/tex2typst/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238726204,"owners_count":19520166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["latex","math-formula","tex","typst"],"created_at":"2025-02-13T20:21:03.810Z","updated_at":"2025-12-24T18:27:09.806Z","avatar_url":"https://github.com/qwinsi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tex2typst.js\n\nJavaScript library for conversion between TeX/LaTeX and Typst math code.\n\nDespite the name `tex2typst` due to the initial goal of converting TeX to Typst, the library can also convert Typst to TeX since version 0.3.0.\n\n## Try it online\n\nA Web UI wrapper is available at [https://qwinsi.github.io/tex2typst-webapp/](https://qwinsi.github.io/tex2typst-webapp/).\n\n## Installation\n\n## Installing it in a Node.js project\n\n```bash\nnpm install tex2typst\n```\n\n## Or just loading it in a web page\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/tex2typst@0.3.0/dist/tex2typst.min.js\"\u003e\u003c/script\u003e\n\u003c!-- or  --\u003e\n\u003cscript src=\"https://unpkg.com/tex2typst@0.3.0/dist/tex2typst.min.js\"\u003e\u003c/script\u003e\n```\n\nReplace `0.3.0` with the latest version number in case this README is outdated.\n\n\n## Usage\n\n```javascript\nimport { tex2typst, typst2tex } from 'tex2typst';\n\nlet tex = \"e \\\\overset{\\\\text{def}}{=} \\\\lim_{{n \\\\to \\\\infty}} \\left(1 + \\\\frac{1}{n}\\\\right)^n\";\nlet typst = tex2typst(tex);\nconsole.log(typst);\n// e eq.def lim_(n -\u003e infinity) (1 + 1/n)^n\n\nlet tex_recovered = typst2tex(typst);\nconsole.log(tex_recovered);\n// e \\overset{\\text{def}}{=} \\lim_{n \\rightarrow \\infty} \\left(1 + \\frac{1}{n} \\right)^n\n```\n\nIf you are using the library in a web page via a `\u003cscript\u003e` tag, you don't need the line of `import`, function `tex2typst` and `typst2tex` should be available in the global scope.\n\ntex2typst.js supports some advanced options to customize the conversion. For details, please refer to the [API Reference](docs/api-reference.md).\n\n## Open-source license\n\nApache License 2.0. See [LICENSE](LICENSE) for details.\n\nHistorical note: This project originally used GPL-3.0 license, and the license has been changed to Apache License 2.0 since version 0.3.15.\n\n## Contributing\n\nFeel free to open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwinsi%2Ftex2typst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwinsi%2Ftex2typst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwinsi%2Ftex2typst/lists"}