MD → ALL

Recognize, preserve and convert any LaTeX equation, across every format

Author :
Guillaume Desvaux · HOPE 'N MIND SASU
Year :
2026

Abstract

A self-contained, offline Rust scientific writing suite where the equation is king. It opens about twenty formats, recognizes LaTeX in every form (inline, display, multiline), normalizes to a Markdown + LaTeX core, then re-exports to 18 formats without ever flattening a formula into an unrecoverable image. mdall is the WYSIWYG editor (live LaTeX); mdall-lite keeps the same core without the WYSIWYG and replaces it with an equation gallery (click, edit the code, instant re-render), plus an MCP server. Extreme proof: the lossless Word round-trip.

Keywords

  • Traceability & control
  • Complex Systems & Metrology
  • Computational methods
  • Neural networks & LLMs
  • Language models

Full article

Write your equations once, export everywhere, recover everything: any format in, LaTeX recognized in every form, any format out, without ever losing an equation.

The extreme proof: your source goes out as .docx, a colleague annotates it in Word, and the import reconstructs the original Markdown and LaTeX exactly. What holds for Word holds for all eighteen output formats: the equation is never lost.

MD -> ALL is a self-contained, Rust scientific writing suite that fits in a single executable with nothing to install. Its core idea: the equation is a first-class citizen from one end of the chain to the other. It opens about twenty input formats (Markdown, LaTeX, DOCX, HTML, EPUB, ODT and more), recognizes LaTeX in every form (inline, display, multiline, whatever the delimiters and the source document format), normalizes everything around a Markdown + LaTeX core, then re-exports to eighteen formats, never flattening a formula into an image you could no longer reopen. Two complementary forms: mdall, the full WYSIWYG editor that renders LaTeX live as you type; and mdall-lite, which keeps the same conversion core but replaces the WYSIWYG with an equation gallery (preview, click, edit the code, instant re-render), paired with an MCP server for agents. Its most extreme proof: a lossless Word round-trip.

Features you will not find elsewhere

Universal LaTeX recognition: inline, display and multiline equations (align, cases, matrices), whatever the delimiters and the source document format, exactly as researchers write them in real papers.

Universal format bridge: about twenty input formats normalized to a Markdown + LaTeX core, re-exported to eighteen formats (PDF, DOCX, HTML, EPUB, ODT, LaTeX, Typst, RTF, SVG, TXT...). The equation is never reduced to an unrecoverable image: its LaTeX source travels with it all the way.

On-the-fly equation editing: every formula is editable directly, inline or multiline, independently of the format it came from; the preview re-renders instantly.

Two forms, one core: mdall is the WYSIWYG editor (three live views, LaTeX rendered in place as you type); mdall-lite drops the WYSIWYG and replaces it with an equation gallery, every formula listed as a card with a preview that you open to edit the raw LaTeX, the image re-rendering at once and the fix flowing straight into the export.

Reversible Word round-trip: the original Markdown and LaTeX are embedded in the .docx (triple redundancy) and survive edits, comments and track-changes; re-import, and the exact source is reconstructed.

One download, no runtime: no Node, no Python, no Pandoc, no LibreOffice. Everything is bundled, everything works offline, and an MCP server exposes the same engine to AI agents.

About 33,000 lines of Rust, an egui/eframe interface, Markdown via pulldown-cmark and LaTeX via KaTeX (run by duktape, no Node). PDF export follows a

Bundled Chromium for maximum fidelity, then Typst (pure Rust), then genpdf as a last resort, so a PDF always comes out, even offline.

that degrades gracefully down to pure Rust with no system dependency.

Reversibility rests on triple redundancy: the original Markdown and LaTeX are written into three independent carriers of the .docx (a dedicated ZIP entry, a PNG tEXt chunk with a hand-rolled CRC-32, and SVG metadata). Each carrier is guarded by an end-to-end test: after a Word round-trip, the exact source is reconstructed. The whole is tested (hundreds of cases), built in CI on Windows, Linux and macOS, and published as downloadable binaries.

Every researcher knows the pain: you write cleanly in Markdown and LaTeX, send the document to a supervisor or reviewer who opens it in Word, and it comes back with the equations turned to mush. More broadly, research lives in a Babel of formats, and at each conversion the equations are the first to die. MD -> ALL closes the loop without losing a single formula, both ways and to every format.

The MCP server extends the idea into the age of agents: document conversion becomes a capability you can hand to an AI while staying in control of your data. It is the HOPE 'N MIND conviction, turning research into concrete, open, usable tools rather than promises.

Read the interactive articleSource code (GitHub)

Cite this work