本帖使用社区开源推广,符合推广要求。我申明并遵循社区要求的以下内容:
- 我的帖子已经打上 开源推广 标签: 是
- 我的开源项目完整开源,无未开源部分: 是
- 我的开源项目已链接认可 LINUX DO 社区: 是
- 我帖子内的项目介绍,AI生成、润色内容部分已截图发出: 是
- 以上选择我承诺是永久有效的,接受社区和佬友监督: 是
以下为项目介绍正文内容,AI生成、润色内容已使用截图方式发出
Abstract
一直羡慕 Typst 的那种即时预览,但论文还是得用 LaTeX。
然后偶然看到了 TUG 26 发布的这篇论文 https://www.tug.org/tug2026/preprints/lode-realtime.pdf
可惜论文中的texlode没有开源,没办法咯,自己写 Fable+Opus启动咯。
Methodology
Github Repo
github.com
Realtime TeX: re-typesets only the paragraph you edit in ~1 ms with an unmodified LuaTeX. Exact, embeddable.
VSCode Plugin
github.com
通过在 GitHub 上创建帐户来为 HenryXiaoYang/realtime-tex-vsc-plugin 开发做出贡献。
Fig 1: Gif Demonstration of rtex
How it work???
Doc:realtime-tex/docs/how-it-works.md at main · HenryXiaoYang/realtime-tex · GitHub
Benchmark
基于原论文开源的Bench
| Pages |
rtex, per edit (P95) |
Typst 0.15.1, typst watch |
Typst, one page exported |
Full pdfLaTeX run |
Full LuaLaTeX run |
| 10 |
1.6 ms (2.4) |
18 ms |
9 ms |
0.12 s |
0.52 s |
| 100 |
1.3 ms (1.7) |
146 ms |
47 ms |
0.25 s |
0.91 s |
| 300 |
1.3 ms (1.7) |
414 ms |
121 ms |
0.51 s |
1.69 s |
github.com/HenryXiaoYang/realtime-tex
main
# Benchmarks
All numbers on this page were measured on **2026-10-10** with rtex 0.0.2. The machine was a
4-vCPU cloud VM (Intel Xeon @ 2.10 GHz) running Linux with TeX Live 2026. A typical laptop is
faster. Raw results are in [`bench/results/`](../bench/results/).
## Typing latency
This is the time from `apply_edit` to the `ParagraphUpdate` in the host's hands, with the
display list decoded. That is everything except drawing. Each figure is the median of 300
separate single-character edits, 2 ms apart, in a warm session. The documents are generated
books in the `book` class with Latin Modern, microtype and amsmath.
| Paragraph | 10-page book | 100-page book | 300-page book |
|---|---|---|---|
| 1 line | 0.50 ms | 0.48 ms | 0.61 ms |
| 4 lines | 1.04 ms | 1.10 ms | 1.18 ms |
|