pub struct StyleCtx {
pub style: Style,
pub cramped: bool,
}Expand description
A style with its cramping state: the full layout context TeX threads top-down.
Fields§
§style: StyleThe current style.
cramped: boolCramped: superscripts are lowered (interiors of denominators, subscripts, radicands, accent bases, …).
Implementations§
Source§impl StyleCtx
impl StyleCtx
Sourcepub const fn sup(self) -> Self
pub const fn sup(self) -> Self
The context of a superscript: style goes up one script level, cramping is preserved.
Sourcepub const fn num(self) -> Self
pub const fn num(self) -> Self
The context of a fraction numerator: style goes down one fraction level, cramping preserved.
Sourcepub const fn den(self) -> Self
pub const fn den(self) -> Self
The context of a fraction denominator: like Self::num but always
cramped.
Sourcepub const fn size_factor(self) -> f64
pub const fn size_factor(self) -> f64
Glyph-size factor of the current style.
Trait Implementations§
impl Copy for StyleCtx
impl Eq for StyleCtx
impl StructuralPartialEq for StyleCtx
Auto Trait Implementations§
impl Freeze for StyleCtx
impl RefUnwindSafe for StyleCtx
impl Send for StyleCtx
impl Sync for StyleCtx
impl Unpin for StyleCtx
impl UnsafeUnpin for StyleCtx
impl UnwindSafe for StyleCtx
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