asksForAlignment

Returns whether a LaTeX body asks to be aligned: an & of its own, outside any environment it opens for itself.

@internote/canvas-sdk/reactFunction
On this page
import { asksForAlignment } from '@internote/canvas-sdk/react';

An & inside \begin{cases}, a matrix or an array belongs to that environment's own columns and is no request for alignment, and a literal \& is an ampersand. A body that asks has to be set in display mode, since KaTeX admits align* there alone; pass block to Maths.

#Signature

(latex: string): boolean

#Parameters

latex
The LaTeX source.

Declared in packages/canvas-sdk/src/react/math/Maths.tsx:24.

Last updated