【文章标题】:Show HN: TexLite – A lightweight self-hosted LaTeX workspace

【文章标题】:Show HN:TexLite——轻量级自托管LaTeX工作区

【文章正文】: 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.

【文章正文】: TexLite是一个轻量级、本地优先的Web工作区,专为共同编写LaTeX的小型可信团队打造。它提供基于浏览器的编辑、编译、预览和源码级讨论功能,同时复用主机上已有的LaTeX安装环境。

Documentation: English (this file) · Operations · Design · 简体中文 Website: TexLite GitHub Pages

文档:English (this file) · Operations · Design · 简体中文 网站:TexLite GitHub Pages

  • 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.

  • 掌控写作环境。使用主机的TeX安装环境,并将源码、历史记录和编译输出统一保存在一个本地数据目录中。

  • 无需庞大技术栈即可协作。默认部署仅需一个Node.js进程、SQLite和本地文件,并为小型可信团队提供实时编辑和源码级评论功能。

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

当Overleaf的托管产品或其更广泛的生态系统恰好契合需求时,它是一个极佳的选择。而TexLite则针对更为聚焦的自托管使用场景:

  • A shared hosted service can queue, slow down, or time out at usage peaks.

  • Overleaf’s open-source Community Edition follows a more involved Docker deployment path, and source comments are a Server Pro feature.

  • TexLite uses the server’s existing TeX environment, runs as a small single-host stack, and includes real-time source comments and replies.

  • 共享托管服务在使用高峰期可能会出现排队、响应变慢或超时的情况。

  • Overleaf的开源社区版采用更为复杂的Docker部署流程,且源码评论属于Server Pro版的专属功能。

  • TexLite利用服务器现有的TeX环境,以轻量级单主机技术栈运行,并内置实时源码评论与回复功能。

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.

自托管并不能让所有文档的编译速度都变快:这仍然取决于主机性能和文档本身。但它确实能让团队自主掌控系统容量、TeX更新、数据位置以及协作工作流。

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.

对于以桌面端为主、个人使用的工作流,建议改用VS Code + LaTeX Workshop或TeXstudio。TexLite专为浏览器端的共享写作而设计,并非个人IDE的替代品。

  • 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-levellatexmkrc .

  • Per-project history and owner-only Git/GitHub backup. Git is optional and is checked only when its integration is used.

  • 项目支持文件夹、ZIP导入/导出、标签、共享、所有权转移、归档,以及每位用户私有的参考文献库。

  • 基于CodeMirror的编辑器,支持LaTeX/BibTeX语法高亮、代码折叠、自动补全、可选Vim模式、格式化、拼写/语法辅助、查找/替换,以及源码/PDF SyncTeX双向导航。

  • 基于Yjs的协同源码编辑、在线状态显示、锚定至源码文本的评论、回复、标记解决,以及允许审阅者在不修改源码的情况下添加评论的权限控制。

  • latexmk编译,支持可选引擎、项目设置、结构化 诊断信息、缓存成功生成的PDF、可下载的构建产物,以及可选的 项目级latexmkrc。

  • 每个项目独立的历史记录,以及仅限所有者的Git/GitHub备份。Git为可选项,仅在启用集成时才会进行检查。

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.

安装Node.js 24或更高版本、latexmk,以及至少一种TeX引擎,如 pdflatex、xelatex或lualatex。仅在使用可选的 Git/GitHub集成时才需要安装Git。

npm install —global texlite texlite init texlite start texlite status

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.

打开 http://127.0.0.1:3000。texlite init 会创建配置文件和 首位管理员;系统故意不提供公开注册功能。

For upgrades and routine management:

如需升级和日常管理:

npm update —global texlite texlite restart texlite logs

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.

texlite serve 在前台运行,适用于调试、Docker或systemd环境。 start、stop、restart、status和logs命令使用npm包中捆绑的PM2运行时。运行 texlite help 可查看完整的命令列表。

NeedRead
Installation, configuration paths, effective defaults, environment overrides, service management, backups, and security boundariesOperations guide
Collaboration, source persistence, compilation isolation, history, and design trade-offsDesign
Testing an npm package before publicationNPM testing guide
Complete configuration starting pointtexlite.config.example.json
需求参阅
安装、配置路径、有效默认值、环境变量覆盖、服务管理、备份及安全边界运维指南
协作、源码持久化、编译隔离、历史记录及设计权衡设计文档
发布前测试npm包NPM测试指南
完整的配置起点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是一款面向可信用户的单主机应用。它并非编译器 沙箱:LaTeX和启用的项目latexmkrc能够执行强大的本地 操作。请保持默认的127.0.0.1绑定,除非您添加了适用于 不可信部署环境的身份验证、网络控制和隔离的编译器环境。

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.

TexLite采用GNU Affero通用公共许可证v3.0授权;详见LICENSE文件。如需进行专有修改或采用不同于AGPL-3.0的商业条款,请联系版权所有者。