From Markdown to PDF : Building MarkTex
Every developer has experienced the friction of trying to write mathematical equations in a simple markdown file, only to realize the parser doesn't support LaTeX.
MarkTex was born out of my own frustration with existing editors. I wanted the simplicity of Markdown, the power of LaTeX, and the ability to annotate directly on the document before exporting to PDF.
The Solution Architecture
Building an editor requires managing complex state. You have the raw text, the parsed Abstract Syntax Tree (AST), the rendered HTML, and the overlay canvas for annotations.
WebAssembly Magic with Wasmer
To handle heavy PDF rendering entirely client-side without relying on a backend server, I leveraged WebAssembly. Using Wasmer, we can compile native rendering engines to run directly in the browser, providing a blazingly fast, privacy-first export experience.