pub enum Grouping {
Show 15 variants
Normal,
LeftRight(Option<char>, Option<char>),
Array(Box<[ArrayColumn]>),
Matrix {
alignment: ColumnAlignment,
},
Cases {
left: bool,
},
Equation {
eq_numbers: bool,
},
Align {
eq_numbers: bool,
},
Aligned,
SubArray {
alignment: ColumnAlignment,
},
Alignat {
pairs: u16,
eq_numbers: bool,
},
Alignedat {
pairs: u16,
},
Gather {
eq_numbers: bool,
},
Gathered,
Multline,
Split,
}
Expand description
Represents a grouping of elements, which is itself a single logical element.
This can be created by a lot of different LaTeX
commands, such as {}
, \left
, \right
,
\begin{...}
, \end{...}
, etc.
Variants§
Normal
A normal form of grouping, usually induced by {}
or \begingroup
and \endgroup
in LaTeX
.
LeftRight(Option<char>, Option<char>)
A grouping that is induced by \left
and \right
in LaTeX
.
Array(Box<[ArrayColumn]>)
The array environment of LaTeX
.
It’s content is an array of columns, which represents the column specification in LaTeX
.
§Example
Input: \begin{array}{lcr} ... \end{array}
Generates:
Grouping::Array(Box::new([
ArrayColumn::Column(ColumnAlignment::Left),
ArrayColumn::Column(ColumnAlignment::Center),
ArrayColumn::Column(ColumnAlignment::Right),
]));
§Invariant
The content of the Array
variant is guaranteed to be non-empty, and contain at least one
ArrayColumn::Column
.
Matrix
The matrix
environment of LaTeX
.
Fields
alignment: ColumnAlignment
The default alignment is ColumnAlignment::Center
, but it can be specified by in LaTeX
when using the \begin{matrix*}[l] ... \end{matrix*}
syntax.
Cases
The cases
environment of LaTeX
.
Equation
The equation
environment of LaTeX
.
Align
The align
environment of LaTeX
.
Aligned
The aligned
environment of LaTeX
.
SubArray
The subarray
environment of LaTeX
.
Fields
alignment: ColumnAlignment
The alignment of the columns in the subarray.
Alignat
The alignat
environment of LaTeX
.
Fields
Alignedat
The alignedat
environment of LaTeX
.
Gather
The gather
environment of LaTeX
.
Gathered
The gathered
environment of LaTeX
.
Multline
The multline
environment of LaTeX
.
Split
The split
environment of LaTeX
.