pub struct AlignData<T: Token, D: TeXDimen> {
pub token: T,
pub ingroups: u8,
pub currindex: usize,
pub repeat_index: Option<usize>,
pub columns: Box<[AlignColumn<T, D>]>,
pub omit: bool,
pub span: bool,
pub inner_mode: BoxType,
pub outer_mode: BoxType,
}Expand description
Data structure for a currently open \halign (or \valign)
Fields§
§token: T§ingroups: u8The number of braces that are currently open
currindex: usizeThe index of the current column (or row)
repeat_index: Option<usize>The index of the column (or row) to be repeated, if the number of columns (or rows) in a particular row exceeds the number of columns (or rows) in the template
columns: Box<[AlignColumn<T, D>]>The columns (or rows) of the template
omit: boolWhether the current column (or row) should omit the template
span: boolWhether the current column (or row) spans across the next column (or rows)
inner_mode: BoxTypeThe mode of the current column (or row); this is either BoxType::Horizontal for an \halign
or BoxType::Vertical for a \valign
outer_mode: BoxTypeThe mode between rows (or columns); this is either BoxType::Vertical for an \halign
or BoxType::Horizontal for a \valign
Implementations§
Source§impl<T: Token, D: TeXDimen> AlignData<T, D>
impl<T: Token, D: TeXDimen> AlignData<T, D>
Sourcepub fn groupval(&self) -> u8
pub fn groupval(&self) -> u8
the number of open braces at which an AlignmentTab
Token (or a \cr) should cause the template tokens to be inserted into the input stream
pub fn check_token(&mut self, t: &T) -> Option<bool>
Sourcepub fn dummy() -> Self
pub fn dummy() -> Self
A dummy AlignData that makes sure that AlignmentTab
Tokens (and \crs) are not replaced by a template; can be pushed to the Gullet at the begin
of an \halign (or \valign) before the template is fully processed to avoid already open
AlignDatas to be used.
Sourcepub fn on_alignment_tab<ET: EngineTypes<Token = T, Dim = D>>(
&self,
mouth: &mut ET::Mouth,
aux: &mut EngineAux<ET>,
) -> T
pub fn on_alignment_tab<ET: EngineTypes<Token = T, Dim = D>>( &self, mouth: &mut ET::Mouth, aux: &mut EngineAux<ET>, ) -> T
Push the end-template tokens of the current column (or row) to the Mouth;
this is called when an AlignmentTab
Token (or a \span) is encountered and the number of currently open braces matches the current column’s
inbraces value.
Sourcepub fn on_cr<ET: EngineTypes<Token = T, Dim = D>>(
&self,
mouth: &mut ET::Mouth,
aux: &mut EngineAux<ET>,
state: &ET::State,
) -> T
pub fn on_cr<ET: EngineTypes<Token = T, Dim = D>>( &self, mouth: &mut ET::Mouth, aux: &mut EngineAux<ET>, state: &ET::State, ) -> T
Push the end-template tokens of the current column (or row) to the Mouth
and insert \everycr;
this is called when a \cr or \crcr is encountered and the number of currently open braces matches the current column’s
inbraces value.
Auto Trait Implementations§
impl<T, D> Freeze for AlignData<T, D>where
T: Freeze,
impl<T, D> RefUnwindSafe for AlignData<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Send for AlignData<T, D>
impl<T, D> Sync for AlignData<T, D>
impl<T, D> Unpin for AlignData<T, D>where
T: Unpin,
impl<T, D> UnsafeUnpin for AlignData<T, D>where
T: UnsafeUnpin,
impl<T, D> UnwindSafe for AlignData<T, D>where
T: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more