Skip to content

Getting Started

AminiamEva edited this page Nov 13, 2026 · 4 revisions

快速开始

直接在线使用

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

桌面版(Windows)

到 Releases 下载最新的 v0.1.0-preview.*:

  • Lineae_0.1.0_x64-setup.exe —— 离线安装包,内置 WebView2 运行时,体积较大。
  • Lineae-portable.zip —— 免安装,解压后运行,前提是系统已有 WebView2。

详细说明见 桌面版。

本地运行

环境要求

  • 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. 用工具栏「打开」选择一个 UTF-8 编码的 .tex 文件。
  2. 直接在正文、公式和表格里编辑;不支持的构造会作为源码块保留,可在「源码」视图中查看和修改。
  3. Ctrl+S(macOS 为 Cmd+S)保存。浏览器支持 File System Access API 时写回原文件,否则退回下载。
  4. 用「导出 YAML / 导入 YAML」备份或迁移界面与快捷键配置,见 配置。
  5. 「导出项目」生成包含当前 .tex 和已加载本地资源的 ZIP。

下一步

Clone this wiki locally