Skip to content

Development en

AminiamEva edited this page Nov 29, 2026 · 1 revision

Development (English)

中文 · English

Repository layout

apps/web/               Browser editor (Tiptap / ProseMirror / MathLive)
  src/main.js           Assembles the editor, ribbon, work modes, and file flows
  src/editor/           Math nodes, pagination, find, source sync, etc.
  src/editor/native-surface/   Input and selection adapters for the native TeX workspace
  src/typesetting/      Engine profiles, engine resolution, paragraph parameters
  src/ui/               Ribbon, settings panel, native preview panel
  src/project/          Project model and dependency resolution
  latex/                LaTeX parsing and typesetting layout (typeset-layout, etc.)
  config.yaml           Default configuration and all shortcuts
apps/desktop/           Tauri 2 shell, bridge script, rtex packaging config
tests/                  node:test data and UI tests, browser and native regressions
docs/                   Architecture, engine evidence, release notes
.github/workflows/      pages.yml, desktop.yml, macos-release.yml,
                        linux-release.yml, native-tex.yml

Environment

  • Node.js and npm
  • Playwright and Chromium (browser regressions)
  • Rust toolchain (desktop only; installers are built in CI)

Common commands

npm ci                  # install dependencies
npm run build           # bundle apps/web/editor.mjs

Start a local server:

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

Preparing the MathLive assets is described in Getting Started.

Tests

# data, LaTeX, config, compatibility tests
node --test tests/*.test.mjs

# UI unit tests
node --test tests/ui/*.test.mjs

# bibliography engine
node --test "tests/bib/**/*.test.mjs"

Browser and native regressions (require MathLive, Chromium, or CI):

npx playwright install chromium
node tests/editor.cjs
node tests/native-tex-preview-browser.cjs

Native TeX (rtex/LuaLaTeX) baseline and acceptance tests run on the remote runner of native-tex.yml, which has a real TeX environment.

Match validation scope to risk: LaTeX codec changes need at least the matching data tests; interaction or style changes need the browser regressions; docs-only changes usually need no tests.

CI

pages.yml — push to main or manual trigger:

  1. npm ci, npm run build
  2. LaTeX and config tests
  3. Bibliography tests
  4. Vendored MathLive
  5. Browser regressions
  6. Deploy to GitHub Pages

desktop.yml — pull requests, v* tags, manual trigger: after the web build and tests, Windows Tauri packaging; tag builds publish a Release.

macos-release.yml — macOS Apple Silicon packaging (DMG + ZIP, ad-hoc signing); publishes a preview when publish_preview is checked on manual runs.

linux-release.yml — AppImage and Debian package for Linux x86_64.

native-tex.yml — native TeX engine baselines, geometry evidence, and desktop WebView acceptance, on remote runners with a real TeX environment.

After a merge to main, desktop previews (Windows + macOS) publish automatically as desktop-preview-<run ID> prereleases.

Releases

  • Web: deployed automatically after merging to main; nothing else to do.
  • Desktop formal releases: push a v* tag (currently v0.2.3). Windows formal tags require the signing secrets to be configured — see Desktop.
  • Desktop previews: pushing to main publishes desktop-preview-<run ID> prereleases automatically; macos-release.yml can also be triggered manually.

Code conventions

  • Keep the existing module boundaries: editor logic in apps/web/src/editor/, engine profiles in src/typesetting/; don't dump things into main.js.
  • Changes to the LaTeX support scope must come with tests, especially regressions asserting that unsupported constructs are preserved verbatim.
  • Generated artifacts (apps/web/editor.mjs, apps/web/vendor) are never committed.
  • UI strings exist in both Chinese and English through the existing t() and string tables; never hard-code single-language strings.

Contributing and feedback

The project is early-stage and internal interfaces may change. When filing a bug or a LaTeX compatibility issue, a minimal reproducible .tex file is the most useful attachment.

https://github.com/AminiamEva/Lineae/issues

The formal contribution process is in CONTRIBUTING.md.

License

Unless stated otherwise, original Lineae source code is licensed AGPL-3.0-only. Third-party libraries and assets keep their own licenses. See LICENSE.

Clone this wiki locally