M
MercyNews
Home
Back
Tylax: New Rust-Based Tool Converts LaTeX to Typst
Technology

Tylax: New Rust-Based Tool Converts LaTeX to Typst

Hacker News6d ago
3 min read
📋

Key Facts

  • ✓ Tylax parses LaTeX into an AST using mitex-parser.
  • ✓ It supports full document structure, complex math, and experimental TikZ to CeTZ conversion.
  • ✓ The tool runs in the browser via WASM.
  • ✓ It is written in Rust.

In This Article

  1. Quick Summary
  2. The Need for Robust Conversion
  3. Core Capabilities
  4. Availability and Access

Quick Summary#

A new tool named Tylax has been developed to convert documents from LaTeX to Typst. The author created this solution because existing regex-based scripts were too fragile, particularly when dealing with nested environments.

Tylax operates by parsing LaTeX into an Abstract Syntax Tree (AST) using mitex-parser, which ensures a more robust conversion process. It supports the full document structure, complex mathematical formulas, and includes experimental support for converting TikZ graphics to CeTZ. The tool is written in Rust and runs directly in the browser via WASM, offering a web-based demo for immediate use.

The Need for Robust Conversion#

Converting documents between different typesetting systems has historically been a challenge. The author of Tylax identified a specific gap in existing tools while attempting to migrate personal papers from LaTeX to Typst.

Previous solutions often relied on regular expressions (regex) to parse and convert code. While effective for simple cases, these scripts frequently failed when encountering complex, nested structures common in technical documents. This fragility prompted the development of a more structural approach.

By utilizing a proper parser to build an AST, Tylax can understand the hierarchy and context of the source code. This allows for accurate conversion of complex elements that would otherwise break simpler scripts.

Core Capabilities#

Tylax offers a comprehensive set of features designed to handle the complexities of academic and technical documents. It goes beyond simple math snippets to support the full document structure.

Key capabilities include:

  • Full Document Structure: It processes complete documents, not just isolated equations.
  • Complex Math Support: It handles advanced mathematical notation, such as matrices and integrals.
  • Graphics Conversion: It includes experimental support for converting TikZ graphics to CeTZ.

The tool is built using the Rust programming language, known for its performance and safety. Furthermore, it runs entirely in the browser via WebAssembly (WASM), allowing users to convert documents locally without needing a backend server.

Availability and Access#

The project is open source and publicly available. The source code has been published to a repository hosted on GitHub, allowing developers to inspect the code, contribute, or run the tool locally.

For users who wish to test the functionality immediately, a live web demo is hosted at convert.silkyai.cn. This web interface allows users to paste LaTeX code and see the resulting Typst output in real-time.

The author has also invited the community to ask questions regarding the project, indicating an active interest in feedback and user engagement.

Continue scrolling for more

AI Transforms Mathematical Research and Proofs
Technology

AI Transforms Mathematical Research and Proofs

Artificial intelligence is shifting from a promise to a reality in mathematics. Machine learning models are now generating original theorems, forcing a reevaluation of research and teaching methods.

Just now
4 min
169
Read Article
Technology

Meta Pivots to AI, Cuts VR Jobs

Meta has initiated significant layoffs within its Reality Labs division and shuttered multiple VR studios. This strategic move signals a major pivot towards artificial intelligence, redirecting company resources and focus.

1h
4 min
6
Read Article
China Warns of Foreign Mapping Operations Targeting Geodata
Politics

China Warns of Foreign Mapping Operations Targeting Geodata

China's top counter-espionage agency has issued a stark warning regarding overseas entities attempting to steal the country's geographic data through covert mapping operations.

1h
3 min
7
Read Article
Kiefer Sutherland Arrested After Altercation
Entertainment

Kiefer Sutherland Arrested After Altercation

The '24' star was taken into custody by the Los Angeles Police Department following an incident near Sunset Boulevard and Fairfax Avenue. Authorities responded to a call regarding an assault.

1h
3 min
6
Read Article
BTS Announces 2026-2027 World Tour After Military Service
Entertainment

BTS Announces 2026-2027 World Tour After Military Service

After a nearly four-year hiatus, BTS has officially announced a massive 2026-2027 world tour spanning five continents and more than 70 dates. The comeback marks the group's first headline performances since completing mandatory military service.

1h
5 min
7
Read Article
The Hidden Cost of Everyday Deception
Health

The Hidden Cost of Everyday Deception

Small lies may seem harmless, but they can create isolation and anxiety. Discover the psychological impact of bending the truth.

2h
3 min
6
Read Article
Economics

Lotofácil Contest 3586: R$5 Million Jackpot Rolls Over

The latest Lotofácil draw concluded without a grand prize winner, causing the jackpot to accumulate to R$5 million. Discover the winning numbers for Contest 3586 and the full breakdown of prize tiers.

2h
5 min
7
Read Article
Quina Contest 6926: Jackpot Reaches R$8 Million
Economics

Quina Contest 6926: Jackpot Reaches R$8 Million

The Quina contest 6926 concluded without a top winner, causing the jackpot to accumulate to R$8 million for the next drawing.

2h
5 min
6
Read Article
Lionsgate Sells Lionsgate Play Asia to Founder Rohit Jain
Economics

Lionsgate Sells Lionsgate Play Asia to Founder Rohit Jain

Lionsgate has sold its South Asian and Southeast Asian streaming operations to founder Rohit Jain. The deal marks a major shift in the regional streaming landscape.

2h
4 min
6
Read Article
Political Theorist Claims He 'Red Pilled' AI Chatbot
Technology

Political Theorist Claims He 'Red Pilled' AI Chatbot

A political theorist has published a transcript he claims demonstrates the ease with which artificial intelligence can be manipulated to reflect specific ideological viewpoints.

2h
3 min
6
Read Article
🎉

You're all caught up!

Check back later for more stories

Back to Home