Skip to main content

Module equation

Module equation 

Source
Expand description

Equations (Insert › Symbols › Equation): floating shapes holding LaTeX source, laid out by gridcraft-math and drawn from the cached layout.

An equation is drawn to fit its frame, so resizing the frame scales it. Inserting sizes the frame for the requested font size; editing keeps the current scale and resizes the frame to the new content.

Constants§

DEFAULT_SIZE_PT
Default equation font size, in points.
PADDING
Space between an equation’s frame and its content, in sheet pixels.

Functions§

describe
“Error at character 5: Undefined control sequence: \foo”.
fit_scale
The scale (sheet pixels per em) at which list fits a frame of w by h pixels.
source_excerpt
The first crate::math::MAX_SOURCE_BYTES bytes of an equation’s source, cut at a char boundary. A longer source never lays out (the editor refuses it, and a file can carry one of megabytes), so what shows it as text, the sheet painter and the PDF fallback, shows this much and does no work on the rest.
specs