pub enum MathStyle {
Display,
DisplayCramped,
Text,
TextCramped,
Script,
ScriptCramped,
ScriptScript,
ScriptScriptCramped,
}Expand description
TeX math styles, controlling sizes of sub-expressions.
In TeX, the four main styles are D (display), T (text), S (script), SS (scriptscript). Each has a “cramped” variant where superscripts are set lower.
Variants§
Implementations§
Source§impl MathStyle
impl MathStyle
Sourcepub fn denominator(self) -> Self
pub fn denominator(self) -> Self
Style for the denominator of a fraction (always cramped).
Sourcepub fn superscript(self) -> Self
pub fn superscript(self) -> Self
Style for superscripts (preserves crampedness).
Sourcepub fn text(self) -> Self
pub fn text(self) -> Self
Convert to the text-size equivalent (Script/ScriptScript → Text).
Used inside \text{} blocks.
pub fn is_display(self) -> bool
pub fn is_cramped(self) -> bool
Sourcepub fn size_index(self) -> usize
pub fn size_index(self) -> usize
Size index for looking up font metrics (0=text, 1=script, 2=scriptscript).
Sourcepub fn size_multiplier(self) -> f64
pub fn size_multiplier(self) -> f64
Size multiplier relative to base font size (TeX rule).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MathStyle
impl<'de> Deserialize<'de> for MathStyle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for MathStyle
impl Eq for MathStyle
impl StructuralPartialEq for MathStyle
Auto Trait Implementations§
impl Freeze for MathStyle
impl RefUnwindSafe for MathStyle
impl Send for MathStyle
impl Sync for MathStyle
impl Unpin for MathStyle
impl UnsafeUnpin for MathStyle
impl UnwindSafe for MathStyle
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