Skip to content

Out ​

<Out> -- read-only typeset rendering of a compute-engine expression. Accepts LaTeX (the default: it renders an encoding it is handed, and the cell hands it the editor's LaTeX), MathJSON or Epsil; optionally evaluates first. Renders in light DOM so the host page's MathLive static stylesheet applies. compute-engine is loaded only when the input is MathJSON or Epsil, or evaluation or an assertion is requested.

Set expect to a JSON MathJSON value to turn the element into a live snapshot assertion: the evaluated result is compared to expect and any mismatch or error diagnostic is shown inline.

Demos·packages/components/src/notatio-out.ts

Props

PropTypeDefaultNotes
valuestring""The expression to render, in the encoding format names.
formatFormat"latex"How to read value: latex, mathjson or epsil.
inlinebooleanfalseSit inline in a sentence: the rendering alone, no label, no menu, no status.reflects
displaybooleanfalseSet as a centred display equation (\displaystyle), for $$…$$.reflects
evaluatebooleanfalseEvaluate before rendering, rather than rendering the input as given.
boxbooleanfalseBox without evaluating, so the source and AST forms populate.
rawbooleanfalseBox without canonicalising, so the expression shows as authored -- a - b stays a Subtract, a > b is not flipped into a Less. For a definition, whose spelling is the point. Ignored when evaluate is set.
expectstring""A MathJSON value to assert the result against; a mismatch is reported inline.
plannedbooleanfalseMark an expect mismatch as a known gap — shown as a note rather than a failure.
formForm"standard"The representation to show, e.g. standard, traditional, fullform, numpy.reflects
labelstring""Row label, e.g. In or Out.reflects
envstring""A preset to reduce the picture for (print, pipe, …); by default the page's own, as it changes.
elideAbove
attribute elide-above
number0Above this many operands, describe a List result rather than typeset it (0, the default, never elides). A long numeric result costs real time to serialize and typeset for an output line that exists to be *drawn*, not read -- see elideResult. General: any cell over a control that can grow a long result can set this, not only a worksheet's.
plotbooleanfalseAlso report the substituted-but-unevaluated form of the input, in the notatio-result event's plot detail, for a consumer that draws the INPUT rather than the fully-evaluated output -- so a complex portrait or plot doesn't collapse at a pole a bound parameter crosses (substitutedForm). Only meaningful for a cell inside a <DynamicModule> (evaluate and a shared scope); ignored otherwise.
busybooleanfalseRead-only: set while the value is being evaluated or typeset (the engine loads lazily, so the first one can take a moment). Styled as a pending state; a script can wait for :not([busy]).reflects
labelMenu
attribute label-menu
booleanfalsePut the form menu on the label instead of a selector at the right: click In/Out to open it. Leaves the right of the row free.

As a web component

Plain custom elements, no framework required: import @enumeratio/frontend for the side effect and write <notatio-out> in any HTML. Attributes are kebab-case and always strings; the props table above names each one's attribute where it differs from its prop.

Settable only as a JS property, not an attribute -- resolveHead, prerendered, provisional: bind with :resolveHead.prop="…" directly on the tag.