Formula

A formula on its own line, written in LaTeX and drawn as MathML by temml (browsers show MathML natively; it also renders on the server). It lives in its own entry point, @atom-forge/brickee/math, with temml as an optional peer dependency: bun add temml.

usage.ts
import { Editor, Preview } from '@atom-forge/brickee';
import { math } from '@atom-forge/brickee/math';

const plugins = [math];
// <Editor bind:value {plugins} />  ·  <Preview blocks={value} {plugins} />

Markdown form: a $$ … $$ block (GitHub and Obsidian read it the same way); a pasted one becomes a formula block.


Live

The roots of a quadratic equation:

x=−b±b2−4ac2a

Open the formula’s fields to edit its LaTeX, or paste a $$…$$ block.

Inside the text

inlineMath is an inline plugin: a formula in a block's text, stored as $…$ (no space just inside the dollars, no digit after the closing one, so prices stay text). Typing $a^2$ and a space makes one, the toolbar's Σ turns the selected text into one, and a click opens it for editing.

Einstein wrote E=mc2, and the area of a circle is πr2. Type $a^2$ and a space, or click a formula to edit it.