Show HN: TexLite – 轻量级自托管 LaTeX 工作区
Show HN: TexLite – A lightweight self-hosted LaTeX workspace

原始链接: https://github.com/SWUFE-DB-Group/TexLite

TexLite 是一款轻量级的自托管 Web 工作区,专为小型受信任团队协作 LaTeX 项目而设计。与 Overleaf 等云端替代方案不同,TexLite 在本地运行,利用宿主机的 LaTeX 环境,同时提供精简的浏览器端界面,用于编辑、实时协作和文档编译。 主要功能包括: * **协作工具**:通过 Yjs 实现实时源代码编辑、源码级批注,以及稳健的项目管理功能(标签管理、ZIP 导入/导出、所有权转移)。 * **编辑器体验**:基于 CodeMirror 的界面,支持 LaTeX/BibTeX 语法、Vim 模式、拼写检查和 SyncTeX 导航。 * **自定义**:通过 `latexmk` 全面掌控容量、TeX 引擎及项目设置。 * **简易部署**:基于极简技术栈(Node.js、SQLite 和本地文件),可通过命令行轻松安装和管理,并提供可选的 Git 集成以进行备份。 TexLite 专为基于浏览器的共享写作需求而打造,而非个人 IDE 工作流。由于它并非编译器沙盒,因此仅适用于受信任的团队,并应在安全的环境下托管。本项目采用 GNU Affero General Public License v3.0 开源协议。

抱歉。
相关文章

原文

TexLite is a lightweight, local-first web workspace for a small, trusted team writing LaTeX together. It provides browser-based editing, compilation, previewing, and source-level discussion while reusing the LaTeX installation already present on the host.

CI npm version

Documentation: English (this file) · Operations · Design · 简体中文

Website: TexLite GitHub Pages

TexLite preview

  • Own the writing environment. Use the host's TeX installation and keep sources, history, and compiled output in one local data directory.
  • Collaborate without a large stack. The default deployment is one Node.js process, SQLite, and local files—plus real-time editing and source-level comments for a small trusted team.

A practical distinction from Overleaf

Overleaf is a strong choice when its hosted product or broader ecosystem is the right fit. TexLite addresses a narrower self-hosted use case:

Self-hosting does not make every document compile faster: that still depends on the host and the document. It does give the team control over capacity, TeX updates, data location, and the collaboration workflow.

For a desktop-first, individual workflow, start with VS Code + LaTeX Workshop or TeXstudio instead. TexLite is purpose-built for shared browser writing, not a replacement for a personal IDE.

What the writing workflow includes

  • Projects with folders, ZIP import/export, tags, sharing, ownership transfer, archiving, and a private per-user citation library.
  • CodeMirror editing with LaTeX/BibTeX highlighting, folding, completion, optional Vim mode, formatting, spelling/grammar assistance, search/replace, and source/PDF SyncTeX navigation.
  • Yjs-based collaborative source editing, active-session presence, comments anchored to source text, replies, resolution, and permissions that let reviewers comment without changing source.
  • latexmk compilation with selectable engines, project settings, structured diagnostics, cached successful PDFs, downloadable artifacts, and optional project-level latexmkrc.
  • Per-project history and owner-only Git/GitHub backup. Git is optional and is checked only when its integration is used.

Install Node.js 24 or newer, latexmk, and at least one TeX engine such as pdflatex, xelatex, or lualatex. Git is needed only for the optional Git/GitHub integration.

npm install --global texlite
texlite init
texlite start
texlite status

Open http://127.0.0.1:3000. texlite init creates the configuration and the first administrator; public registration is deliberately unavailable.

For upgrades and routine management:

npm update --global texlite
texlite restart
texlite logs

texlite serve runs in the foreground for debugging, Docker, or systemd. start, stop, restart, status, and logs use the PM2 runtime bundled with the npm package. Run texlite help for the complete command list.

Need Read
Installation, configuration paths, effective defaults, environment overrides, service management, backups, and security boundaries Operations guide
Collaboration, source persistence, compilation isolation, history, and design trade-offs Design
Testing an npm package before publication NPM testing guide
Complete configuration starting point texlite.config.example.json

TexLite is a single-host application for trusted users. It is not a compiler sandbox: LaTeX and an enabled project latexmkrc can execute powerful local behaviour. Keep the default 127.0.0.1 bind unless you add the authentication, network controls, and isolated compiler environment appropriate for an untrusted deployment.

TexLite is licensed under the GNU Affero General Public License v3.0; see LICENSE. For proprietary modifications or commercial terms that differ from AGPL-3.0, contact the copyright holder.

联系我们 contact @ memedata.com