realtime-tex

Henry Yang·HenryXiaoYang.realtime-tex

Re-typesets only the LaTeX paragraph you are editing in about a millisecond with an unmodified LuaTeX.

rtex is a typesetting engine for editors. When you type, it re-typesets only the paragraph being edited through a LuaLaTeX process that has already loaded your preamble, and hands the editor the new lines to draw. A full background compile takes care of what really is global: page breaks, floats, the table of contents, references and bibliographies. The result is exactly what LuaLaTeX produces — the same line breaks and the same glyphs at the same positions to 1/65536 pt — because rtex uses an unmodified LuaTeX from TeX Live and exported PDFs are identical to a normal LuaLaTeX build. Time from keystroke to updated paragraph is about a millisecond and does not depend on document length. The archive contains the `rtex` command, the C library and header, and rtex TeX support files.

winget install --id HenryXiaoYang.realtime-tex --exact --source winget

Latest 0.0.8·November 22, 2026

Release Notes

Thank you @SunXin121 for the image fix, and @leo1oel and @Asianfleet for the reports! Fixed

  • Float captions keep their class's style. Floats compiled live now run their own \begin{figure}…\end{figure}, so Elsevier cas-sc captions, setspace's single spacing in floats and float.sty styles look the same live as in the PDF. Before, such a caption came back in the body font. (#49, #51)
  • Two-column documents. A paragraph that runs from one column into the next gets live updates again, drawn in the right column. (#47)
  • No more stray LuaLaTeX processes. Closing rtex while a document's preamble was still loading left a LuaLaTeX server running forever. A server that fails or times out at start is stopped too.
  • Images in the live preview. An \includegraphics image after cached pictures no longer shows another graphic of the document. (#41, #42)
  • Main file in a subfolder. \input{name} reads the file next to the main file, even when the project's top folder has one with the same name, as latexmk -cd does. (#40)
  • Bibliographies. biblatex with backend=bibtex works in background passes, and an entry whose note cites another entry is resolved in the same run.
  • C API: DisplayList::to_binary no longer drops the item after a save or restore, so scaled and rotated boxes are drawn transformed. rtex serve was not affected. Faster
  • Background passes write page lists in the binary format as each page ships: on a 300-page book they take 0.25 s of a pass instead of 0.98 s, and a layout after a one-character edit 1.6 s instead of 2.4 s. The pass directory now holds .rtex-page.bin; rtex dl2json prints one as JSON.
  • A missing citation no longer costs five passes per layout. While a \cite key is being typed, or Biber/BibTeX fails, a layout is one pass (about 2 s instead of 9–11 s on a 100-page book).

Installer type: zip

x64—B36A2E5ABC6216301D180D7B800B1DBBB34672B04946D0B25D227CE6F9590E54

Details

Homepage
https://github.com/HenryXiaoYang/realtime-tex
License
MIT
Publisher
Henry Yang
Support
https://github.com/HenryXiaoYang/realtime-tex/issues
Copyright
Copyright (c) 2026 Henry Yang and the realtime-tex contributors

Tags

latexlualatexluatextextexlivetypesetting

Older versions (1)

0.0.7
x64—3F461D021057CD262EB654907001D012ECD50967FB2B8D74CD708F4B9080134D