Skip to content

Getting Started

AminiamEva edited this page Nov 29, 2026 · 4 revisions

快速开始

中文 · Getting-Started-en

直接在线使用

打开 http://lineae.aminiam.com/ 即可。这是 main 分支每次通过 CI 后自动部署的版本,不需要安装任何东西,也不需要本地 TeX 发行版。

桌面版(Windows / macOS / Linux)

从 Releases 下载最新版本(当前 v0.2.3):

平台 文件
Windows x64 离线安装包 / 便携 ZIP
macOS Apple Silicon DMG / 应用 ZIP(ad-hoc 签名)
Linux x86_64 AppImage / Debian 包

桌面版捆绑 rtex 0.0.8(LuaLaTeX),默认在原生排版工作区打开文档:页面由真实 LuaLaTeX 渲染,直接在渲染结果上编辑文字、公式和表格。详见 桌面版。

本地运行(网页版)

环境要求

  • Node.js 与 npm
  • 现代浏览器(Chromium 系或 Firefox 最新版)
  • Python 3 或其他任意静态 HTTP 服务器

构建

git clone https://github.com/AminiamEva/Lineae.git
cd Lineae
npm ci
npm run build

npm run build 用 esbuild 把 apps/web/src/main.js 打包为 apps/web/editor.mjs。这个文件是生成物,不纳入版本控制。

准备 MathLive

MathLive 作为独立的浏览器资源分发,需要手动放到 apps/web/vendor/mathlive:

archive="$(npm pack mathlive@0.108.0 --silent)"
mkdir -p apps/web/vendor/mathlive
tar -xzf "$archive" -C apps/web/vendor/mathlive --strip-components=1 package/mathlive.min.js package/fonts
rm "$archive"

Windows PowerShell 等价写法:

$archive = npm pack mathlive@0.108.0 --silent
New-Item -ItemType Directory -Force apps/web/vendor/mathlive | Out-Null
tar -xzf $archive -C apps/web/vendor/mathlive --strip-components=1 package/mathlive.min.js package/fonts
Remove-Item $archive

启动本地服务器

python3 -m http.server 8000 --directory apps/web

然后访问 http://localhost:8000。

不要直接双击 apps/web/index.html。页面使用 ES module 和 fetch 加载资源,file:// 协议下会被浏览器的同源策略拦截。

第一次使用

  1. 打开应用后即可编辑:新建文档使用默认模板前导区,也可以打开已有 .tex 文件或工程。
  2. 直接在正文、公式和表格里编辑;网页版不支持的构造会作为源码块保留,可在「源码」模式中查看和修改。
  3. Ctrl+S(macOS 为 Cmd+S)保存。浏览器支持 File System Access API 时写回原文件,否则退回下载。
  4. 新建或打开工程可以管理多文件文档:侧栏文件树、\include/\input 导航、大纲跳转都在其中,见 功能概览。
  5. 用「导出 YAML / 导入 YAML」备份或迁移界面与快捷键配置,见 配置。

下一步

Clone this wiki locally