pub struct ParseNodeMathChoice {
pub mode: Mode,
pub loc: Option<SourceLocation>,
pub display: Vec<AnyParseNode>,
pub text: Vec<AnyParseNode>,
pub script: Vec<AnyParseNode>,
pub scriptscript: Vec<AnyParseNode>,
}
Expand description
Represents different renderings for various math styles.
This struct handles expressions that display differently depending on the mathematical context (display, text, script, scriptscript sizes).
§Fields
mode
- The parsing mode (Mode::Math
orMode::Text
)loc
- Optional source location for error reportingdisplay
- Display style renderingtext
- Text style renderingscript
- Script style renderingscriptscript
- Scriptscript style rendering
§LaTeX Correspondence
Corresponds to LaTeX math choice command:
\mathchoice{\sum}{\sum}{\sum}{\sum}
§Usage
MathChoice nodes allow different visual representations based on the mathematical context, ensuring optimal readability at different sizes.
Fields§
§mode: Mode
The parsing mode (Mode::Math
or Mode::Text
)
loc: Option<SourceLocation>
Optional source location for error reporting
display: Vec<AnyParseNode>
Display style rendering
text: Vec<AnyParseNode>
Text style rendering
script: Vec<AnyParseNode>
Script style rendering
scriptscript: Vec<AnyParseNode>
Scriptscript style rendering
Trait Implementations§
Source§impl Clone for ParseNodeMathChoice
impl Clone for ParseNodeMathChoice
Source§fn clone(&self) -> ParseNodeMathChoice
fn clone(&self) -> ParseNodeMathChoice
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 ParseNodeMathChoice
impl Debug for ParseNodeMathChoice
Source§impl PartialEq for ParseNodeMathChoice
impl PartialEq for ParseNodeMathChoice
impl StructuralPartialEq for ParseNodeMathChoice
Auto Trait Implementations§
impl Freeze for ParseNodeMathChoice
impl RefUnwindSafe for ParseNodeMathChoice
impl Send for ParseNodeMathChoice
impl Sync for ParseNodeMathChoice
impl Unpin for ParseNodeMathChoice
impl UnwindSafe for ParseNodeMathChoice
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