Repository navigation
Features en
中文 · English
Lineae's scope is limited to what the editor can recognise and handle reliably. This page lists current capabilities by use case, along with common misconceptions.
Available
- Paragraphs, section headings (
\sectionthrough\subsubsection), starred forms, and short titles - Bold, italic, underline, strikethrough, font family, font size, colour, superscript, subscript
- Ordered, unordered, and description lists; block quotes; horizontal rules; code blocks
- Footnotes; document title, author, and date fields
- Section numbering, labels, cross references, table of contents
- Find and replace, context menus, undo/redo
- A fuller font list whose dropdown options preview each font
- Invisible margin marks: headings
H_n, bullet listsL_n, numbered listsE_n, titleT, authorA - Backspace at the start of a centred or right-aligned line first restores left alignment instead of deleting the previous line
- Header/footer editing and page breaks (native workspace and paginated view)
Limits
- The web editor uses JS typesetting (continuous or paginated); line breaking and spacing are not guaranteed to match compiled TeX.
- Page size and margins can be adjusted in the UI, but that only affects the display, not TeX page geometry.
Formulas are provided by MathLive and edited in place; there is no separate source panel.
Available
- Inline and display formulas; new inline formulas default to
\displaystyle - Common math input, command completion, and templates (fractions, roots, matrices, big operators, integrals)
-
<-,<->,=>,<=,<=>auto-replaced by arrows;Tabrotates counter-clockwise - Matrix insertion with row/column operations
- Selected AMS environments;
alignuses MathLive'salignedwhile editing and keeps the original environment on export - Inline
\lim,\sum,\produse TeX's side-set limits; explicit\displaystylestacks above and below -
\tag{...}/\tag*{...}custom numbering;\notag/\nonumbersuppresses it - Formula-local undo/redo (
Shift+Zredo is configurable) - Keyboard movement between formulas and surrounding text
Limits
- This is an editing interface, not a TeX math engine; the set of importable commands and environments is finite.
- Kerning, line breaking in complex formulas, and large-operator layout are still being calibrated.
Math input relies heavily on shortcuts — see Shortcuts.
Available
- Basic
tabularstructure, selected column specs, merged columns,booktabsrules -
tblr(tabularray),tabularx,longtable, and table floats: handled with the PR #26 model — the original table source is kept and edits patch cell source ranges only - In-cell editing, row/column operations, context menus
- Select a whole table with its left handle, then align with
Ctrl+EL/I/R - Tables longer than one page split by row with a repeated header; a "continued table" toggle is on the table toolbar
Limits
- Complex column formats and nested tables fall back to source blocks.
- As an accepted PR #26 trade-off, the old per-edge rule-toggle buttons and rule/margin interactions that depended on the semantic table model are removed; any replacement must be rebuilt on the PR #26 source-range model.
- Cross-page splitting only applies in paginated view; the continuation header is a read-only visual copy edited on the first page.
Theorem, lemma, proposition, corollary, definition, remark, and proof environments are supported. Numbering follows the definitions present at import; custom \newtheorem variants are not guaranteed to be recognised.
Bodies of theorems, lemmas, propositions, and corollaries render in italics per amsthm defaults with upright bold headings; definitions, remarks, and proofs stay upright with italic proof headings.
TikZ. The Insert → TikZ studio combines a code pane with a live preview. It accepts a preamble/library block and a TikZ body, can insert the result into the document, and also renders tikz-general code blocks in the body. The preview runs entirely in the browser through the prebuilt mp-tikz-wasm runtime (jmckalex/mp-tikz-wasm, LGPL-3.0-or-later). The large WASM/TeX bundle is intentionally kept out of the source tree; install the pinned release once with npm run vendor:tikz into apps/web/vendor/mp-tikz-wasm/.
CircuiTikZ. A visual editor provides circuit-specific component libraries, a snap grid, orthogonal wiring, and draggable component and terminal placement. Component values, labels, rotation, and properties are editable; existing circuitikz source can be imported, edited visually, and exported again, and the generated environment is inserted back and previewed through the same TeX runtime. The editor architecture is adapted from Circuit2TikZ/CircuiTikZ-Designer (GPL-3.0). The symbol library is implemented from a frozen spec of 402 components (snap points and adjustment points defined per component; see docs/TIKZ_COMPONENTS_SPEC.md).
- Subfigure grouping, multi-image selection, image cropping, and synchronised resizing
-
wrapfigurefloats wrap text following TeX's wrapfig rules
- Create/open projects: sidebar file tree, new files, directory context menus
- Cross-file navigation for
\include/\input, with project-wide outline jumps - Document / Source / Split modes shared between projects and single documents
- Engine selection and diagnostics resolve per project, with conflicts pinned to source locations
The editor's typesetting is driven by engine profiles. Three engines are supported:
- LuaLaTeX (default) — the global default; the desktop native workspace is built on LuaLaTeX.
- XeLaTeX — the classic JS path, using bundled Latin Modern OTF fonts.
-
pdfLaTeX — uses a Computer Modern font stack; font packages in the preamble (
lmodern,mathpazo,newtxtext,helvet,courier, …) switch the displayed fonts accordingly.
The engine is resolved as follows: explicit choices (document or global) win; otherwise the source is scanned for % !TeX program magic comments, engine primitives (\XeTeX…, \directlua), and characteristic packages (xeCJK implies XeLaTeX, luatexja implies LuaLaTeX). Conflicting evidence falls back to the global default; the Engine panel shows where the conflicts are.
The global default can be changed in Settings → Typesetting. On the web, all three engines share the same pagination pipeline; switching only changes the font stack and metrics.
The desktop app defaults to a native LuaLaTeX workspace (the legacy JS workspace remains selectable in settings, applied after a restart):
- Pages are rendered by the bundled rtex 0.0.8 (a pinned, SHA-256-verified release including its TeX assets); prose, math, and tables are edited directly on the rendered result
- Hybrid editing: ProseMirror owns input, composition, selection, and history for the lifetime of an edit; the native page owns the confirmed glyphs, and obsolete glyphs are masked until the sheet has painted the matching revision
- A separate native trust dialog starts each session: LuaLaTeX can execute Lua with the user's file privileges, and a temporary directory with disabled shell-escape is not a sandbox — only trusted documents and projects are in scope
- Content the glyph painter cannot draw (Type 1/TTC fonts, images, TikZ, …) uses a revision-frozen whole-page PDF rendered by the bundled PDF.js 4.10.38
- "Export clean PDF" is available only for a confirmed current frame, names the source revision, and uses the native save dialog
- A system TeX Live LuaLaTeX is auto-detected (macOS
/Library/TeX/texbin, latest\texlive\<year>on the Windows system drive);RTEX_TEXLIVE_BINandLINEAE_RTEX_PATHcan override - CJK IME input is wired into the native surface; candidate-window placement and other on-device checks are still on the acceptance list
- Insert local images via a file picker or drag-and-drop; cropping and visible-bounds resizing are supported
- Select multiple images and group them as subfigures
- Captions, width, alignment, float placement, and labels are available within the implemented
figuresubset - With an image selected,
Ctrl+EL/I/Raligns it; centring/right alignment writes\centering/\raggedleft - Entries can be read from local
.bibfiles and inserted as citations - Labels and cross references can be inserted and resolved within the document
- Open UTF-8
.texfiles or create projects - Document / Source / Split modes; the source view is an explicit edit of the whole document and rebuilds the editable projection when applied
- Parsing and editing checkpoints preserve untouched LaTeX source byte-for-byte
- Edited supported blocks are re-serialised, so whitespace, comments, and command spelling may change
- "Export project" produces a ZIP containing the project's
.texfiles and loaded local resources
The repository includes a standalone BibTeX/BibLaTeX module, separate from the editor UI. Its public API covers:
- Parsing, validation, entry editing, serialisation
- Diagnostics
- Scanning
.texsources for citations - Pre-compilation checks
An acceptance report records 182 passing automated tests and 19 real compilation combinations (BibTeX/Biber workflows). These results apply to that module and its test scope only, not to full BibTeX/BibLaTeX compatibility.
See the Bib engine API.
- Simplified Chinese, Traditional Chinese, and English interfaces (defaults to the system language)
- Light, dark, and system themes
- Document zoom 50%–300% with
Ctrl+wheeland trackpad pinch - New documents start from the default template preamble
- Ribbon-style toolbar: grouped tabs, collapsible, glass styling; a floating toolbar follows the selection
- Status bar: paginated/continuous toggle, document statistics, zoom controls, and the typesetting engine panel
- Preferences are stored as YAML in browser-local storage and can be imported/exported
See Configuration.
The editor uses the selected engine's font stack (LuaLaTeX by default; XeLaTeX uses bundled Latin Modern; pdfLaTeX uses Computer Modern) and article.cls page geometry: Letter / A4 / A5 / legal paper, 10/11/12 pt sizes with matching baselines. New documents default to Normal Margins (2.2cm); imported documents keep their geometry settings, falling back to article.cls native margins when absent. Paginated mode calibrates page-bottom capacity against real XeLaTeX output; continuous mode removes page gaps for long-document scrolling.
Font and spacing declarations in the preamble are honoured: fontspec's \setmainfont / \setmonofont, \setCJKmainfont, ctex's fontset=fandol|windows|mac|ubuntu|adobe, plus \linespread and \fontsize{...}{...}\selectfont. Declarations affect the display only, never the exported LaTeX. Chinese line breaking applies strict forbidden-character rules; CJK/Latin boundaries keep roughly 1/3em spacing, with ctex column-dependent inter-character stretch.
Pagination is a visual layer: it never touches the ProseMirror document and never writes layout styles onto editable nodes, so selection, undo, and typing behaviour are unchanged. Long paragraphs split at visual line boundaries keeping at least two lines; page-break gaps are non-editable decorations. Tables (including longtable) split by row with repeated headers. Display formulas stay with the paragraph that introduces them (matching TeX's \predisplaypenalty=10000). Images and other unsplittable nodes move as whole blocks.
- Real TeX compilation on the web (the desktop app bundles rtex 0.0.8 with LuaLaTeX)
- Splitting inside images or other unsplittable nodes across pages
- Desktop auto-update
- Full support for arbitrary packages and custom macros