Skip to main content

RusTeXStomach

Struct RusTeXStomach 

Source
pub struct RusTeXStomach {
    pub continuous: bool,
    /* private fields */
}

Fields§

§continuous: bool

Trait Implementations§

Source§

impl Stomach<Types> for RusTeXStomach

Source§

fn new(_aux: &mut EngineAux<Types>, _state: &mut RusTeXState) -> Self

Constructs a new Stomach.
Source§

fn afterassignment(&mut self) -> &mut Option<CompactToken>

Mutable reference to the current \afterassignment Token.
Source§

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>

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<()>

Execute the provided Font assignment and insert \afterassignment if necessary
Source§

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 list
Source§

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<()>

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, )

Opens an \halign or \valign
Source§

fn close_align(engine: &mut EngineReferences<'_, Types>) -> Res<()>

Closes an \halign or \valign
Source§

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>>

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>>

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>>

Execute the provided Assignment command and insert \afterassignment if necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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 necessary
Source§

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>>

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>>

Processes a character depending on the current TeXMode and its CommandCode
Source§

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 CommandCode
Source§

fn 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>, )

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>>

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>>, )

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>)

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>>

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>>

Actually calls the output routine
Source§

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>>

Close a paragraph; assumed to be called in horizontal mode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<ET, Err, A> IntoErr<ET, Err> for A
where ET: EngineTypes, Err: From<A>,

Source§

fn into_err( self, _aux: &EngineAux<ET>, _state: &<ET as EngineTypes>::State, ) -> Err

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more