Skip to main content

Eqtb

Struct Eqtb 

Source
pub struct Eqtb {
Show 28 fields pub cs: Vec<Slot<Meaning>>, pub int_par: Vec<Slot<i32>>, pub count: Vec<Slot<i32>>, pub attr: Vec<Slot<i32>>, pub dimen_par: Vec<Slot<i32>>, pub dimen: Vec<Slot<i32>>, pub glue_par: Vec<Slot<Glue>>, pub skip: Vec<Slot<Glue>>, pub muskip: Vec<Slot<Glue>>, pub toks_par: Vec<Slot<TokenList>>, pub toks: Vec<Slot<TokenList>>, pub boxes: Vec<Slot<NodeRef>>, pub cur_font: Slot<u32>, pub math_font: Vec<Slot<u32>>, pub par_shape: Slot<Option<Rc<[i32]>>>, pub etex_shape: Vec<Slot<Option<Rc<[i32]>>>>, pub catcode_tables: HashMap<u32, CodeTable, FastHash>, pub lc: CodeTable, pub uc: CodeTable, pub sf: CodeTable, pub math: CodeTable, pub del: CodeTable, pub math_param: HashMap<u32, Slot<i32>>, pub local_box: [Slot<NodeRef>; 2], pub dir_par: [Slot<i32>; 6], pub local_count: [Slot<i32>; 2], pub attr_generation: u64, pub attrs_in_use: bool,
}
Expand description

The full table of equivalents.

Fields§

§cs: Vec<Slot<Meaning>>

Meanings of control sequences, indexed by CsId.

§int_par: Vec<Slot<i32>>

Integer parameters.

§count: Vec<Slot<i32>>

\count registers.

§attr: Vec<Slot<i32>>

\attribute registers.

§dimen_par: Vec<Slot<i32>>

Dimension parameters.

§dimen: Vec<Slot<i32>>

\dimen registers.

§glue_par: Vec<Slot<Glue>>

Glue and muglue parameters.

§skip: Vec<Slot<Glue>>

\skip registers.

§muskip: Vec<Slot<Glue>>

\muskip registers.

§toks_par: Vec<Slot<TokenList>>

Token-list parameters.

§toks: Vec<Slot<TokenList>>

\toks registers.

§boxes: Vec<Slot<NodeRef>>

\box registers.

§cur_font: Slot<u32>

The current font.

§math_font: Vec<Slot<u32>>

Math fonts, size * NUM_FAMILIES + family.

§par_shape: Slot<Option<Rc<[i32]>>>

\parshape: pairs (indent, length) flattened.

§etex_shape: Vec<Slot<Option<Rc<[i32]>>>>

e-TeX penalty arrays (\interlinepenalties, …).

§catcode_tables: HashMap<u32, CodeTable, FastHash>

Catcode tables, indexed by table number.

§lc: CodeTable

\lccode.

§uc: CodeTable

\uccode.

§sf: CodeTable

\sfcode.

§math: CodeTable

\mathcode.

§del: CodeTable

\delcode.

§math_param: HashMap<u32, Slot<i32>>

\Umath… parameters: param * 8 + style.

§local_box: [Slot<NodeRef>; 2]

\localleftbox, \localrightbox.

§dir_par: [Slot<i32>; 6]

Direction parameters (\pagedir …, as numbers 0–3).

§local_count: [Slot<i32>; 2]

\nolocalwhatsits, \nolocaldirs.

§attr_generation: u64

Incremented whenever an attribute register changes.

§attrs_in_use: bool

Whether any attribute register was ever set.

Implementations§

Source§

impl Eqtb

Source

pub fn initex() -> Self

The initial table of IniTeX: everything undefined or zero, with TeX’s few non-zero defaults.

Source

pub fn ensure_cs(&mut self, cs: CsId)

Makes sure cs has an entry.

Source

pub fn meaning(&self, cs: CsId) -> &Meaning

The meaning of a control sequence.

Source

pub fn int(&self, i: u32) -> i32

The integer parameter with index i.

Source

pub fn dimen(&self, i: u32) -> i32

The dimension parameter with index i.

Source

pub fn glue(&self, i: u32) -> Glue

The glue parameter with index i.

Source

pub fn toks_param(&self, i: u32) -> &TokenList

The token-list parameter with index i.

Source

pub fn cur_cat_table(&self) -> u32

The current catcode table number.

Source

pub fn catcode(&self, c: u32) -> u8

The category code of c in the current catcode table.

Source

pub fn catcode_in(&self, table: u32, c: u32) -> u8

The category code of c in table table. Missing tables read as IniTeX defaults.

Source

pub fn get(&self, loc: Loc) -> Val

Reads the value at loc.

Source

pub fn holds(&self, loc: Loc, val: &Val) -> bool

Whether loc holds val already (TeX’s test for “reassigning”), without cloning the current value.

Source

pub fn level(&self, loc: Loc) -> u16

The level at which the value at loc was defined.

Source

pub fn set(&mut self, loc: Loc, val: Val, level: u16)

Stores val at loc with level level. Mismatched value kinds are ignored (they indicate a bug and are caught in debug builds).

Source

pub fn code_table(&self, kind: CodeKind) -> &CodeTable

The code table of the given kind.

Source

pub fn is_word(loc: Loc) -> bool

Whether the location holds a “word” quantity (TeX regions 5–6: integers and dimensions, which use xeq_level semantics) as opposed to an “equivalent” (regions 1–4).

Trait Implementations§

Source§

impl Clone for Eqtb

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Eqtb

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Eqtb

§

impl !Send for Eqtb

§

impl !Sync for Eqtb

§

impl !UnwindSafe for Eqtb

§

impl Freeze for Eqtb

§

impl Unpin for Eqtb

§

impl UnsafeUnpin for Eqtb

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.