pub struct MathPrimitiveOptions {Show 40 fields
pub bounded: bool,
pub mode: Option<String>,
pub before_digest: Vec<BeforeDigestClosure>,
pub after_digest: Vec<DigestionClosure>,
pub before_construct: Vec<ConstructionClosure>,
pub after_construct: Vec<ConstructionClosure>,
pub is_prefix: bool,
pub scope: Option<Scope>,
pub font: Option<FontDirective>,
pub require_math: bool,
pub forbid_math: bool,
pub locked: bool,
pub alias: Option<String>,
pub decl_id: Option<String>,
pub replace: Option<String>,
pub protected: bool,
pub robust: bool,
pub name: Option<String>,
pub meaning: Option<String>,
pub omcd: Option<String>,
pub reversion: Option<Reversion>,
pub sizer: Option<SizingClosure>,
pub role: Option<String>,
pub operator_role: Option<String>,
pub reorder: bool,
pub dual: bool,
pub mathstyle: Option<String>,
pub variablesize_op: bool,
pub scriptpos: Option<String>,
pub dynamic_scriptpos: bool,
pub operator_scriptpos: Option<usize>,
pub stretchy: Option<bool>,
pub operator_stretchy: Option<bool>,
pub nogroup: bool,
pub hide_content_reversion: bool,
pub revert_as: Option<Cow<'static, str>>,
pub lpadding: Option<usize>,
pub rpadding: Option<usize>,
pub letters_class: Option<LettersClass>,
pub absorb_warning: Option<Stored>,
}Fields§
§bounded: bool§mode: Option<String>§before_digest: Vec<BeforeDigestClosure>§after_digest: Vec<DigestionClosure>§before_construct: Vec<ConstructionClosure>§after_construct: Vec<ConstructionClosure>§is_prefix: bool§scope: Option<Scope>§font: Option<FontDirective>§require_math: bool§forbid_math: bool§locked: bool§alias: Option<String>§decl_id: Option<String>§replace: Option<String>§protected: bool§robust: bool§name: Option<String>§meaning: Option<String>§omcd: Option<String>§reversion: Option<Reversion>§sizer: Option<SizingClosure>§role: Option<String>§operator_role: Option<String>§reorder: bool§dual: bool§mathstyle: Option<String>§variablesize_op: boolA variable-size operator: Perl’s mathstyle => \&doVariablesizeOp
(TeX_Math.pool.ltxml:353) — the mathstyle is computed at construction
from the current style (display in display style, else text) instead
of being a fixed value (\int, \sum, amsmath’s \iint family).
scriptpos: Option<String>§dynamic_scriptpos: boolDynamic scriptpos: compute “mid”/“post” based on current font mathstyle at invocation time Perl: scriptpos => &doScriptpos
operator_scriptpos: Option<usize>§stretchy: Option<bool>§operator_stretchy: Option<bool>§nogroup: bool§hide_content_reversion: bool§revert_as: Option<Cow<'static, str>>§lpadding: Option<usize>§rpadding: Option<usize>§letters_class: Option<LettersClass>A glyph \DeclareMathSymbol’d from the math italic symbol font (letters), with its math class: the token’s
font is specialized by Font::specialize_letters (a capital Greek letter italic as the class says).
absorb_warning: Option<Stored>A Warning that belongs to the symbol’s print, not its digestion: carried as the box’s
ABSORB_WARNING_PROPERTY (on the simple primitive’s box and on a
constructor’s whatsit alike) and raised once per key when the document absorbs it
(absorb_warning) — an undecodable glyph’s once-per-font Warning
(\DeclareMathSymbol, OXIDIZED_DESIGN_DIVERGENCES #27). A property, so a simple symbol stays on the primitive
path with a simple symbol’s box and sizing.
Implementations§
Source§impl MathPrimitiveOptions
impl MathPrimitiveOptions
pub fn to_hash_stored(&self) -> HashMap<Stored>
Sourcepub fn to_hash_stored_with_overrides(
&self,
mode_override: Option<&'static str>,
mathstyle_override: Option<&'static str>,
scriptpos_override: Option<&'static str>,
) -> HashMap<Stored>
pub fn to_hash_stored_with_overrides( &self, mode_override: Option<&'static str>, mathstyle_override: Option<&'static str>, scriptpos_override: Option<&'static str>, ) -> HashMap<Stored>
Like to_hash_stored but applies per-invocation overrides without
cloning the whole options. Used in DefMath closures (hot path —
one call per math token invocation).
Sourcepub fn has_complex_option(&self) -> bool
pub fn has_complex_option(&self) -> bool
Whether an option outside Perl’s $simpletoken_options is present (Package.pm:1603-1607:
name, meaning, omcd, role, mathstyle, stretchy, protected, robust, alias, lpadding,
rpadding, font, scriptpos, scope, locked), which makes a parameterless DefMath a constructor
rather than a box (Package.pm:1665). alias and stretchy are simple: counted complex, the
eighteen stretchy delimiters (\langle, \{, \lceil, amsmath’s \lvert, …) became
constructors whose font is read at construction, so \big\langle lost its size and
\boldmath its bold. variablesize_op and dynamic_scriptpos are Perl’s code-valued
mathstyle and scriptpos; the construct hooks are complex, as in Perl.