pub struct ParseNodeFont {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub font: String,
pub body: Box<AnyParseNode>,
}
Expand description
Represents font changes applied to mathematical expressions.
This struct handles font family changes for mathematical content, allowing different typefaces within expressions.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingfont
- The font family namebody
- The expression in the specified font
§LaTeX Correspondence
Corresponds to LaTeX font commands:
\mathrm{dx} % Roman/upright
\mathbf{v} % Bold
\mathit{f} % Italic
\mathsf{S} % Sans-serif
§Usage
Font nodes control the typeface of mathematical symbols, essential for distinguishing different types of mathematical objects (scalars, vectors, etc.).
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
font: String
The font family name
body: Box<AnyParseNode>
The expression in the specified font
Trait Implementations§
Source§impl Clone for ParseNodeFont
impl Clone for ParseNodeFont
Source§fn clone(&self) -> ParseNodeFont
fn clone(&self) -> ParseNodeFont
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ParseNodeFont
impl Debug for ParseNodeFont
Source§impl PartialEq for ParseNodeFont
impl PartialEq for ParseNodeFont
impl StructuralPartialEq for ParseNodeFont
Auto Trait Implementations§
impl Freeze for ParseNodeFont
impl RefUnwindSafe for ParseNodeFont
impl Send for ParseNodeFont
impl Sync for ParseNodeFont
impl Unpin for ParseNodeFont
impl UnwindSafe for ParseNodeFont
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