pub struct ParseNodeArray {Show 13 fields
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub col_separation_type: Option<ColSeparationType>,
pub hskip_before_and_after: Option<bool>,
pub add_jot: Option<bool>,
pub cols: Option<Vec<AlignSpec>>,
pub arraystretch: f64,
pub body: Vec<Vec<AnyParseNode>>,
pub row_gaps: Vec<Option<MeasurementOwned>>,
pub h_lines_before_row: Vec<Vec<bool>>,
pub tags: Option<Vec<ParseNodeArrayTag>>,
pub leqno: Option<bool>,
pub is_cd: Option<bool>,
}
Expand description
Represents array and matrix environments in mathematical expressions.
This struct handles the parsing and representation of array-like structures such as matrices, tables, and aligned equations in LaTeX/KaTeX. It supports various column alignments, spacing, and formatting options.
§LaTeX Correspondence
Corresponds to LaTeX environments like:
\begin{pmatrix} a & b \\ c & d \end{pmatrix} % Matrix
\begin{array}{cc} a & b \\ c & d \end{array} % General array
\begin{align} x &= 1 \\ y &= 2 \end{align} % Aligned equations
§Usage
Arrays are fundamental for representing matrices, systems of equations, and tabular data in mathematical typesetting. The parser creates these nodes when encountering array environments.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
col_separation_type: Option<ColSeparationType>
Type of column separation (ColSeparationType
)
hskip_before_and_after: Option<bool>
Whether to add horizontal skip before/after the array
add_jot: Option<bool>
Whether to add extra vertical spacing between rows
cols: Option<Vec<AlignSpec>>
Column alignment specifications (AlignSpec
)
arraystretch: f64
Vertical stretching factor for the array
body: Vec<Vec<AnyParseNode>>
The array content as a vector of rows, each containing cells
row_gaps: Vec<Option<MeasurementOwned>>
Vertical gaps between rows
h_lines_before_row: Vec<Vec<bool>>
Horizontal lines to draw before each row
Optional equation tags/numbers for each row
leqno: Option<bool>
Whether to place equation numbers on the left
is_cd: Option<bool>
Whether this is a commutative diagram array
Trait Implementations§
Source§impl Clone for ParseNodeArray
impl Clone for ParseNodeArray
Source§fn clone(&self) -> ParseNodeArray
fn clone(&self) -> ParseNodeArray
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more