What is Realtime TeX and how does it work?
Realtime TeX is an innovative library designed to re-typeset only the specific paragraph you edit in about one millisecond using an unmodified LuaTeX process. Based on the research by Clemens Lode presented at TUG 2026, the tool maintains exact precision so that exported documents match standard LuaTeX builds down to the glyph position.
While you type, rtex handles the active paragraph instantly while a background pass takes care of global elements such as page breaks, the table of contents, and bibliographies. This architecture bridges the gap between traditional batch compilers and instant document preview workflows.
What are the performance metrics and embedding options?
Performance benchmarks show that document length does not impact editing latency, as only the target paragraph is processed live. Updates typically range from 0.5 ms to over 1 ms depending on paragraph length and font shaping configurations.
The library can be integrated into custom editors as a Rust crate, a C library via its C ABI, or as a subprocess using JSON lines communication. A complete host implementation is available through its Visual Studio Code extension.
How do I install and configure the library?
The fastest way to get started is by installing the Realtime TeX Live Preview extension for VS Code, which automatically sets up the environment and provides a live preview alongside your editor. Alternatively, you can download prebuilt binaries or build the project from source using Rust and a TeX Live distribution.
Make sure you have a TeX Live environment with LuaLaTeX installed. You can check your setup and verify engine dependencies by running the doctor command on your target platform.
- Ensure you have Rust and a TeX Live distribution with LuaLaTeX installed on your system.
- Download the latest prebuilt release archive for your operating system from the repository.
- Unpack the archive and run the diagnostic tool to ensure files and dependencies are correctly located.
- Run the doctor command in your terminal to verify the configuration.