工程学硕士生 swimmingbrain 发布了一款名为 TeXbrain 的 LaTeX 编辑器 1。该项目是一个无后端的静态站点,通过 WebAssembly(SwiftLaTeX)在浏览器中运行 pdfTeX 1。该引擎本身仅 1.8 MB 1。借助这一架构,用户无需后端即可实现本地文件夹读写、Git 同步与离线编译,并支持通过 isomorphic-git 进行版本控制 1。
在 LaTeX 包的加载方面,TeXbrain 采用多层缓存策略动态加载 LaTeX 包 1。系统通过 service worker 拦截请求,依次查询 Cache Storage、内置子集、jsDelivr 上的 TeX Live 镜像以及 SwiftLaTeX 样式服务器 1。目前,该编辑器仅支持 pdfTeX,包版本固定于 TeX Live 2020 时代,不支持 XeTeX 或 LuaTeX,且引擎中尚无 bibtex 或 biber 1。在开源协议方面,TeXbrain 项目采用 MIT 许可证,pdfTeX 引擎为 EPL 2.0 / GPL 2.0 1。该项目的代码托管在 GitHub 上,地址为 https://github.com/swimmingbrain/texbrain 1。
An engineering master's student has developed TeXbrain, a static, backend-free LaTeX editor that runs pdfTeX in the browser via WebAssembly 1. The project enables local folder reading and writing, offline compilation, and Git synchronization through the built-in isomorphic-git library 1. By utilizing SwiftLaTeX, the pdfTeX engine itself is remarkably lightweight, weighing in at just 1.8 MB 1.
To handle LaTeX packages dynamically, TeXbrain employs a multi-layer caching strategy 1. A service worker intercepts package requests and sequentially queries the Cache Storage, a built-in subset, a TeX Live mirror on jsDelivr, and the SwiftLaTeX style server 1. Currently, the editor is limited to pdfTeX and does not support XeTeX, LuaTeX, bibtex, or biber 1. Furthermore, the available packages are fixed to the TeX Live 2020 distribution 1.
The TeXbrain project is released under the MIT license, while the underlying pdfTeX engine is licensed under EPL 2.0 and GPL 2.0 1. The source code and project details are available on GitHub at https://github.com/swimmingbrain/texbrain 1.
评论
还没有评论,欢迎留下第一条。