Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
JavaScript library for conversion between TeX/LaTeX and Typst math formula code.
Despite 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.
A Web UI wrapper is available at https://qwinsi.github.io/tex2typst-webapp/.
npm install tex2typst
<script src="https://cdn.jsdelivr.net/npm/tex2typst@0.3.0-beta-5/dist/tex2typst.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/tex2typst@0.3.0-beta-5/dist/tex2typst.min.js"></script>
Replace 0.3.0-beta-5
with the latest version number in case this README is outdated.
import { tex2typst, typst2tex } from 'tex2typst';
let tex = "e \overset{\text{def}}{=} \lim_{{n \to \infty}} \left(1 + \frac{1}{n}\right)^n";
let typst = tex2typst(tex);
console.log(typst);
// e eq.def lim_(n arrow.r infinity)(1 + frac(1, n))^n
let tex_recovered = typst2tex(typst);
console.log(tex_recovered);
// e \overset{\text{def}}{=} \lim_{n \rightarrow \infty} \left(1 + \frac{1}{n} \right)^n
If you are using the library in a web page via a <script>
tag, you don't need the line of import
, function tex2typst
and typst2tex
should be available in the global scope.
GPL v3. See LICENSE for details.
Feel free to open an issue or submit a pull request.
FAQs
JavaScript library for converting TeX code to Typst
The npm package tex2typst receives a total of 26 weekly downloads. As such, tex2typst popularity was classified as not popular.
We found that tex2typst demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.