Repository navigation
Releases: HenryXiaoYang/realtime-tex
Release list
v0.0.4
Two live-editing fixes, both reported with excellent reproductions by @SDDKKK.
Fixed
- Two-column documents are live again (IEEEtran,
\documentclass[twocolumn]{…}). When a column break fell inside a paragraph, rtex recorded the whole page as part of that paragraph, and most of the document lost live editing. In a 12-page IEEEtran paper almost no body text was live. The two-page example from the report now has 61 of 61 paragraphs live, identical to LuaLaTeX's output. (#2) - Comment lines no longer break paragraphs. Two
%lines in a row, or one inside a paragraph, made rtex think the paragraph ended there, so its edits waited for the background compile. rtex now treats comments like TeX does. (#3) - Paragraphs with
\marginparupdate live. The margin note follows after the next background compile, like footnote text. - Full LaTeX error messages. Errors and warnings now include all of LaTeX's continuation lines. For example, "Mismatched LaTeX support files detected" now shows which versions don't match. (#1)
Other
scripts/install-texlive.shonly contacts the TeX Live repository when packages are missing, and updatestlmgrfirst. Re-running it over an existing installation no longer fails with "tlmgr itself needs to be updated".
Upgrading
- VS Code extension: run Realtime TeX: Update rtex Engine from the command palette.
- Prebuilt binaries: download the archive for your platform below and check it with
bin/rtex doctor.
Full changelog: CHANGELOG.md
v0.0.3
Fixed
- Live typing on Windows with MiKTeX. On every MiKTeX installation the live engine exited at startup ("lualatex server exited during startup with exit code: 1"), so the preview only updated after each full compile (realtime-tex-vsc-plugin#1). MiKTeX does not let LuaTeX write outside its output directory by default, and on Windows the live engine answers through a named pipe. rtex now allows that for the LuaLaTeX processes it starts (
MIKTEX_ALLOWUNSAFEOUTPUTFILES=1, MiKTeX's counterpart of theopenout_any=ait already sets for TeX Live). TeX Live users were not affected. - When the live engine cannot start, the error now quotes the first TeX or Lua error from its log instead of only the exit code.
New
- Prebuilt binaries for Linux (x86_64, arm64), macOS (Apple silicon, Intel) and Windows (x86_64) below. Each archive has the
rtexcommand, the C library and header, and rtex's TeX support files; unpack it anywhere and runbin/rtex doctorto check your setup. rtex doctorreports where rtex found its support files and LuaLaTeX.
CI
- A new job runs a live-editing session on Windows with MiKTeX, in paths with spaces and non-ASCII characters and on a CRLF document.
VS Code extension users: run Realtime TeX: Update rtex Engine (or wait for the daily update check) to get this version.
v0.0.2
New
-
Windows support. rtex runs on Linux, macOS and Windows. CI tests all three against a real
TeX Live. -
Much more goes live. Not just plain paragraphs any more, but:
- paragraphs with display math, footnote marks, references and citations (natbib and
biblatex); - lists, quotes, theorems and proofs, figures and tables with images and captions, verbatim
and listings; - headings, the title block, manual bibliographies;
- your own macros and environments, and text in
\input/\included files.
Counters,
\the<counter>formats and macros the body redefines are restored per unit, so
numbers come out right. - paragraphs with display math, footnote marks, references and citations (natbib and
-
Probe mode (the default). A paragraph that uses commands rtex does not know is no longer
sent to the background automatically. rtex compiles it once as the last pass saw it and
compares the result with the page. If it matches exactly, edits go live. Definitions that
leak out of a paragraph are detected. -
New paragraphs and splits stay live. A paragraph you split or type fresh borrows its
neighbour's settings until the next pass. -
Faster background passes.
- A standby LuaLaTeX with the preamble already loaded typesets only the body (3–4× faster for
short documents). - Unchanged TikZ/pgfplots pictures are reused from the previous pass (on a 111-page document
with 120 pictures, 45 s → 18 s per pass). - Slow multi-pass runs show each finished pass right away.
- A standby LuaLaTeX with the preamble already loaded typesets only the body (3–4× faster for
-
Bibliographies and indexes run automatically. biber, bibtex, makeindex, and imakeidx's
own program and options. -
Configurable time budget per live compile (
fast_budget_ms, default 50 ms). -
Diagnostics for engine failures. Set
debug_dirand every failure leaves a bundle: what
was sent, the TeX log, and a stage-by-stage trace. -
New
rtexsubcommands.rtex probeshows where a document's live latency goes, and
rtex verify --permissive/--pic-cachecheck probe mode and the picture cache.
Faster
- About 0.5 ms per keystroke for a one-line paragraph, 1.1 ms for four lines, independent of
document length. That is down from 0.8 and 1.5 ms in 0.0.1. The engine is driven by raw
frames, the editor's thread writes straight to an idle engine, and LaTeX work that cannot be
seen in a paragraph (running-head marks, repeated math font setup, file probes) is skipped in
the live engine.
Fixed
Most of these were found by running real documents (a 111-page TikZ-heavy set of notes and a
58-page document with luatexja, biblatex, imakeidx, glossaries and tcolorbox):
- The response channel is read by a dedicated thread. On macOS a large result could block the
engine until the watchdog killed it. - A Lua error inside the live engine is reported at once instead of hanging until the watchdog.
- Projects with subfolders, and figures that are PDFs, now work in background passes.
- Layouts stopped converging when bookmarks recorded the pass directory, or the index was
missing. Both are fixed. \begin{document}inside comments or verbatim no longer confuses rtex.- biblatex citations are live in a session opened without an earlier build.
- glossaries' first-use forms are right in live updates.
- Running heads no longer count as part of the paragraph at the top of a page, and appendix
numbering is right. - Paragraphs that start inside a group (
{\em …}) now have their lines. - Fixed a deadlock when an edit arrived while a layout was being installed.
- A paragraph that crashes the engine is kept off the live path instead of crashing it on
every keystroke. - PDFs of earlier layouts stay valid while the host reads them. Two engines could write the
same file, which produced blank pages.
Changed
- The library, C ABI, display-list format and engine protocol are versioned together as 0.0.x.
Nothing is frozen before 0.1. - The C ABI takes more configuration keys:
fast_budget_ms,eligibility,picture_cache,
debug_dir,unit_envsandwarm_background.
Getting started
- Easiest: the Realtime TeX Live Preview VS Code extension installs and runs rtex for you.
- Build from source: see the README (Rust + TeX Live with LuaLaTeX).
- Embedding in your own editor: docs/embedding.md.
Benchmarks for this release: docs/benchmarks.md. The API, C ABI and display-list format may still change before 0.1.