pub struct ParseNodeText {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub body: Vec<AnyParseNode>,
pub font: Option<String>,
}
Expand description
Represents text content within mathematical expressions.
This struct handles text that appears in math mode, with optional font specifications for proper rendering of textual elements in mathematical contexts.
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingbody
- The text content as parse nodesfont
- Optional font family specification
§LaTeX Correspondence
Corresponds to LaTeX text commands in math:
\text{if} % Text in math
\mathrm{dx} % Roman font
\mathbf{v} % Bold font
§Usage
Text nodes allow mixing of textual and mathematical content, ensuring proper font rendering for words and phrases within mathematical expressions.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
body: Vec<AnyParseNode>
The text content as parse nodes
font: Option<String>
Optional font family specification
Trait Implementations§
Source§impl Clone for ParseNodeText
impl Clone for ParseNodeText
Source§fn clone(&self) -> ParseNodeText
fn clone(&self) -> ParseNodeText
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 ParseNodeText
impl Debug for ParseNodeText
Source§impl PartialEq for ParseNodeText
impl PartialEq for ParseNodeText
impl StructuralPartialEq for ParseNodeText
Auto Trait Implementations§
impl Freeze for ParseNodeText
impl RefUnwindSafe for ParseNodeText
impl Send for ParseNodeText
impl Sync for ParseNodeText
impl Unpin for ParseNodeText
impl UnwindSafe for ParseNodeText
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