pub struct RusTeXStomach {
pub continuous: bool,
/* private fields */
}Fields§
§continuous: boolTrait Implementations§
Source§impl Stomach<Types> for RusTeXStomach
impl Stomach<Types> for RusTeXStomach
Source§fn new(_aux: &mut EngineAux<Types>, _state: &mut RusTeXState) -> Self
fn new(_aux: &mut EngineAux<Types>, _state: &mut RusTeXState) -> Self
Constructs a new
Stomach.Source§fn afterassignment(&mut self) -> &mut Option<CompactToken>
fn afterassignment(&mut self) -> &mut Option<CompactToken>
Mutable reference to the current
\afterassignment Token.Source§fn data_mut(&mut self) -> &mut StomachData<Types>
fn data_mut(&mut self) -> &mut StomachData<Types>
The current list(s)
Source§fn split_vertical(
engine: &'_ mut EngineReferences<'_, Types>,
nodes: Vec<VNode<Types>>,
target: Dim32,
) -> SplitResult<Types>
fn split_vertical( engine: &'_ mut EngineReferences<'_, Types>, nodes: Vec<VNode<Types>>, target: Dim32, ) -> SplitResult<Types>
Split a vertical list for the provided target height
Source§fn assign_font(
engine: &'_ mut EngineReferences<'_, Types>,
_token: CompactToken,
f: TfmFont<i32, Dim32, InternedCSName<u8>>,
global: bool,
) -> Res<()>
fn assign_font( engine: &'_ mut EngineReferences<'_, Types>, _token: CompactToken, f: TfmFont<i32, Dim32, InternedCSName<u8>>, global: bool, ) -> Res<()>
Execute the provided Font assignment and insert
\afterassignment if necessarySource§fn close_box(engine: &mut EngineReferences<'_, Types>, bt: BoxType) -> Res<()>
fn close_box(engine: &mut EngineReferences<'_, Types>, bt: BoxType) -> Res<()>
Closes a node list belonging to a
TeXBox and adds it to the
corresponding node listSource§fn split_paragraph(
engine: &'_ mut EngineReferences<'_, Types>,
specs: Vec<ParLineSpec<Types>>,
children: Vec<HNode<Types>>,
sourceref: SourceReference<<<Types as EngineTypes>::File as File>::SourceRefID>,
) -> Res<()>
fn split_paragraph( engine: &'_ mut EngineReferences<'_, Types>, specs: Vec<ParLineSpec<Types>>, children: Vec<HNode<Types>>, sourceref: SourceReference<<<Types as EngineTypes>::File as File>::SourceRefID>, ) -> Res<()>
Split a paragraph into lines and add them (as horizontal boxes) to the current vertical list
Source§fn maybe_do_output(
engine: &mut EngineReferences<'_, Types>,
penalty: Option<i32>,
) -> Res<()>
fn maybe_do_output( engine: &mut EngineReferences<'_, Types>, penalty: Option<i32>, ) -> Res<()>
Checks whether the output routine should occur; either because the page is
full enough, or because the provided penalty is
Some
(and assumed to be <= -10000) and the page is not empty.Source§fn open_align(
engine: &'_ mut EngineReferences<'_, Types>,
_inner: BoxType,
between: BoxType,
)
fn open_align( engine: &'_ mut EngineReferences<'_, Types>, _inner: BoxType, between: BoxType, )
Opens an
\halign or \valignSource§fn close_align(engine: &mut EngineReferences<'_, Types>) -> Res<()>
fn close_align(engine: &mut EngineReferences<'_, Types>) -> Res<()>
Closes an
\halign or \valignSource§fn every_top(engine: &mut EngineReferences<'_, ET>)
fn every_top(engine: &mut EngineReferences<'_, ET>)
To be executed at every iteration of the top-level loop - i.e. in between all unexpandable commands
Source§fn flush(engine: &mut EngineReferences<'_, ET>) -> Result<(), TeXError<ET>>
fn flush(engine: &mut EngineReferences<'_, ET>) -> Result<(), TeXError<ET>>
To be executed at the end of a document - flushes the current page
Source§fn do_unexpandable(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
scope: CommandScope,
token: <ET as EngineTypes>::Token,
apply: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token) -> Result<(), TeXError<ET>>,
) -> Result<(), TeXError<ET>>
fn do_unexpandable( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, scope: CommandScope, token: <ET as EngineTypes>::Token, apply: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token) -> Result<(), TeXError<ET>>, ) -> Result<(), TeXError<ET>>
Execute the provided Unexpandable command
Source§fn do_assignment(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
token: <ET as EngineTypes>::Token,
assign: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token, bool) -> Result<(), TeXError<ET>>,
global: bool,
) -> Result<(), TeXError<ET>>
fn do_assignment( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, token: <ET as EngineTypes>::Token, assign: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token, bool) -> Result<(), TeXError<ET>>, global: bool, ) -> Result<(), TeXError<ET>>
Execute the provided Assignment command and insert
\afterassignment if necessarySource§fn assign_int_register(
engine: &mut EngineReferences<'_, ET>,
register: usize,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_int_register( engine: &mut EngineReferences<'_, ET>, register: usize, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a count register and insert
\afterassignment if necessarySource§fn assign_dim_register(
engine: &mut EngineReferences<'_, ET>,
register: usize,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_dim_register( engine: &mut EngineReferences<'_, ET>, register: usize, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a dimen register and insert
\afterassignment if necessarySource§fn assign_skip_register(
engine: &mut EngineReferences<'_, ET>,
register: usize,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_skip_register( engine: &mut EngineReferences<'_, ET>, register: usize, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a skip register and insert
\afterassignment if necessarySource§fn assign_muskip_register(
engine: &mut EngineReferences<'_, ET>,
register: usize,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_muskip_register( engine: &mut EngineReferences<'_, ET>, register: usize, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a muskip register and insert
\afterassignment if necessarySource§fn assign_toks_register(
engine: &mut EngineReferences<'_, ET>,
token: <ET as EngineTypes>::Token,
register: usize,
global: bool,
) -> Result<(), TeXError<ET>>
fn assign_toks_register( engine: &mut EngineReferences<'_, ET>, token: <ET as EngineTypes>::Token, register: usize, global: bool, ) -> Result<(), TeXError<ET>>
Assign a value to a token register and insert
\afterassignment if necessarySource§fn assign_primitive_toks(
engine: &mut EngineReferences<'_, ET>,
token: <ET as EngineTypes>::Token,
name: PrimitiveIdentifier,
global: bool,
) -> Result<(), TeXError<ET>>
fn assign_primitive_toks( engine: &mut EngineReferences<'_, ET>, token: <ET as EngineTypes>::Token, name: PrimitiveIdentifier, global: bool, ) -> Result<(), TeXError<ET>>
Assign a value to a primitive token list and insert
\afterassignment if necessarySource§fn assign_primitive_int(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_primitive_int( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a primitive integer value and insert
\afterassignment if necessarySource§fn assign_primitive_dim(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_primitive_dim( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a primitive dimension value and insert
\afterassignment if necessarySource§fn assign_primitive_skip(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_primitive_skip( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a primitive skip value and insert
\afterassignment if necessarySource§fn assign_primitive_muskip(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
global: bool,
in_token: <ET as EngineTypes>::Token,
) -> Result<(), TeXError<ET>>
fn assign_primitive_muskip( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, global: bool, in_token: <ET as EngineTypes>::Token, ) -> Result<(), TeXError<ET>>
Assign a value to a primitive muskip value and insert
\afterassignment if necessarySource§fn do_whatsit(
engine: &mut EngineReferences<'_, ET>,
name: PrimitiveIdentifier,
token: <ET as EngineTypes>::Token,
read: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token) -> Result<Option<Box<dyn FnOnce(&mut EngineReferences<'_, ET>) -> Result<(), TeXError<ET>> + Send + Sync>>, TeXError<ET>>,
) -> Result<(), TeXError<ET>>
fn do_whatsit( engine: &mut EngineReferences<'_, ET>, name: PrimitiveIdentifier, token: <ET as EngineTypes>::Token, read: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token) -> Result<Option<Box<dyn FnOnce(&mut EngineReferences<'_, ET>) -> Result<(), TeXError<ET>> + Send + Sync>>, TeXError<ET>>, ) -> Result<(), TeXError<ET>>
Executes a Whatsit command
Source§fn do_box(
engine: &mut EngineReferences<'_, ET>,
_name: PrimitiveIdentifier,
token: <ET as EngineTypes>::Token,
bx: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token) -> Result<Either<Option<TeXBox<ET>>, BoxInfo<ET>>, TeXError<ET>>,
) -> Result<(), TeXError<ET>>
fn do_box( engine: &mut EngineReferences<'_, ET>, _name: PrimitiveIdentifier, token: <ET as EngineTypes>::Token, bx: fn(&mut EngineReferences<'_, ET>, <ET as EngineTypes>::Token) -> Result<Either<Option<TeXBox<ET>>, BoxInfo<ET>>, TeXError<ET>>, ) -> Result<(), TeXError<ET>>
Executes a Box command
Source§fn do_char(
engine: &mut EngineReferences<'_, ET>,
token: <ET as EngineTypes>::Token,
char: <ET as EngineTypes>::Char,
code: CommandCode,
) -> Result<(), TeXError<ET>>
fn do_char( engine: &mut EngineReferences<'_, ET>, token: <ET as EngineTypes>::Token, char: <ET as EngineTypes>::Char, code: CommandCode, ) -> Result<(), TeXError<ET>>
Processes a character depending on the current
TeXMode and its CommandCodeSource§fn do_defed_char(
engine: &mut EngineReferences<'_, ET>,
token: <ET as EngineTypes>::Token,
char: <ET as EngineTypes>::Char,
) -> Result<(), TeXError<ET>>
fn do_defed_char( engine: &mut EngineReferences<'_, ET>, token: <ET as EngineTypes>::Token, char: <ET as EngineTypes>::Char, ) -> Result<(), TeXError<ET>>
Processes a character depending on the current
TeXMode and its CommandCodefn do_char_in_math( engine: &mut EngineReferences<'_, ET>, char: <ET as EngineTypes>::Char, ) -> Result<(), TeXError<ET>>
Source§fn do_mathchar(
engine: &mut EngineReferences<'_, ET>,
code: u32,
token: Option<<ET as EngineTypes>::Token>,
)
fn do_mathchar( engine: &mut EngineReferences<'_, ET>, code: u32, token: Option<<ET as EngineTypes>::Token>, )
Processes a mathchar value (assumes we are in math mode)
Source§fn maybe_switch_mode(
engine: &mut EngineReferences<'_, ET>,
scope: CommandScope,
token: <ET as EngineTypes>::Token,
name: PrimitiveIdentifier,
) -> Result<bool, TeXError<ET>>
fn maybe_switch_mode( engine: &mut EngineReferences<'_, ET>, scope: CommandScope, token: <ET as EngineTypes>::Token, name: PrimitiveIdentifier, ) -> Result<bool, TeXError<ET>>
Switches the current
TeXMode (if necessary) by opening/closing a paragraph, or throws an error
if neither action is possible or would not result in a compatible mode.
If a paragraph is opened or closed, the provided token is requeued to be reprocessed afterwards in
horizontal/vertical mode, and false is returned (as to not process the triggering command
further). Otherwise, all is well and true is returned.Source§fn add_node_m(
engine: &mut EngineReferences<'_, ET>,
node: MathNode<ET, UnresolvedMathFontStyle<ET>>,
)
fn add_node_m( engine: &mut EngineReferences<'_, ET>, node: MathNode<ET, UnresolvedMathFontStyle<ET>>, )
Adds a node to the current math list (i.e. assumes we’re in math mode)
Source§fn add_node_h(engine: &mut EngineReferences<'_, ET>, node: HNode<ET>)
fn add_node_h(engine: &mut EngineReferences<'_, ET>, node: HNode<ET>)
Adds a node to the current horizontal list (i.e. assumes we’re in (restricted) horizontal mode)
Source§fn add_node_v(
engine: &mut EngineReferences<'_, ET>,
node: VNode<ET>,
) -> Result<(), TeXError<ET>>
fn add_node_v( engine: &mut EngineReferences<'_, ET>, node: VNode<ET>, ) -> Result<(), TeXError<ET>>
Adds a node to the current vertical list (i.e. assumes we’re in (internal) vertical mode)
Source§fn do_output(
engine: &mut EngineReferences<'_, ET>,
caused_penalty: Option<i32>,
) -> Result<(), TeXError<ET>>
fn do_output( engine: &mut EngineReferences<'_, ET>, caused_penalty: Option<i32>, ) -> Result<(), TeXError<ET>>
Actually calls the output routine
Source§fn open_paragraph(
engine: &mut EngineReferences<'_, ET>,
token: <ET as EngineTypes>::Token,
)
fn open_paragraph( engine: &mut EngineReferences<'_, ET>, token: <ET as EngineTypes>::Token, )
Open a new paragraph; assumed to be called in (internal) vertical mode
Source§fn close_paragraph(
engine: &mut EngineReferences<'_, ET>,
) -> Result<(), TeXError<ET>>
fn close_paragraph( engine: &mut EngineReferences<'_, ET>, ) -> Result<(), TeXError<ET>>
Close a paragraph; assumed to be called in horizontal mode
Auto Trait Implementations§
impl Freeze for RusTeXStomach
impl !RefUnwindSafe for RusTeXStomach
impl !Send for RusTeXStomach
impl !Sync for RusTeXStomach
impl Unpin for RusTeXStomach
impl UnsafeUnpin for RusTeXStomach
impl !UnwindSafe for RusTeXStomach
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
Mutably borrows from an owned value. Read more
§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>
Converts
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>
Converts
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