pub enum ParseNode {
Show 57 variants
Internal {
mode: Mode,
},
Raw {
mode: Mode,
string: String,
},
ColorToken {
mode: Mode,
color: String,
},
Size {
mode: Mode,
value: Measurement,
is_blank: bool,
},
Url {
mode: Mode,
url: String,
},
Styling {
mode: Mode,
body: Vec<ParseNode>,
style: StyleLevel,
reset_font: bool,
},
Sqrt {
mode: Mode,
body: Box<ParseNode>,
index: Option<Box<ParseNode>>,
},
Infix {
mode: Mode,
replace_with: String,
size: Option<Measurement>,
loc: Option<SourceLocation>,
},
GenFrac {
mode: Mode,
numer: Box<ParseNode>,
denom: Box<ParseNode>,
continued: bool,
has_bar_line: bool,
bar_size: Option<Measurement>,
left_delim: Option<String>,
right_delim: Option<String>,
},
Text {
mode: Mode,
body: Vec<ParseNode>,
font: String,
},
Font {
mode: Mode,
font: String,
body: Box<ParseNode>,
},
MClass {
mode: Mode,
mclass: AtomFamily,
body: Vec<ParseNode>,
is_character_box: bool,
},
Op {
mode: Mode,
limits: bool,
always_handle_sup_sub: bool,
parent_is_sup_sub: bool,
suppress_base_shift: bool,
content: OperatorContent,
},
OperatorName {
mode: Mode,
body: Vec<ParseNode>,
always_handle_sup_sub: bool,
limits: bool,
parent_is_sup_sub: bool,
},
Overline {
mode: Mode,
body: Box<ParseNode>,
},
Underline {
mode: Mode,
body: Box<ParseNode>,
},
Smash {
mode: Mode,
body: Box<ParseNode>,
smash_height: bool,
smash_depth: bool,
},
Phantom {
mode: Mode,
body: Vec<ParseNode>,
},
VPhantom {
mode: Mode,
body: Box<ParseNode>,
},
Pmb {
mode: Mode,
mclass: AtomFamily,
body: Vec<ParseNode>,
},
VCenter {
mode: Mode,
body: Box<ParseNode>,
},
Rule {
mode: Mode,
shift: Option<Measurement>,
width: Measurement,
height: Measurement,
},
RaiseBox {
mode: Mode,
dy: Measurement,
body: Box<ParseNode>,
},
HBox {
mode: Mode,
body: Vec<ParseNode>,
},
Lap {
mode: Mode,
alignment: LapAlignment,
body: Box<ParseNode>,
},
MathChoice {
mode: Mode,
display: Vec<ParseNode>,
text: Vec<ParseNode>,
script: Vec<ParseNode>,
scriptscript: Vec<ParseNode>,
},
Sizing {
mode: Mode,
size: usize,
body: Vec<ParseNode>,
},
HorizBrace {
mode: Mode,
label: String,
is_over: bool,
base: Box<ParseNode>,
},
XArrow {
mode: Mode,
label: String,
body: Box<ParseNode>,
below: Option<Box<ParseNode>>,
},
AccentUnder {
mode: Mode,
label: String,
base: Box<ParseNode>,
},
DelimSizing {
mode: Mode,
size: usize,
mclass: AtomFamily,
delim: String,
},
LeftRightRight {
mode: Mode,
delim: String,
color: Option<String>,
},
LeftRight {
mode: Mode,
body: Vec<ParseNode>,
left: String,
right: String,
right_color: Option<String>,
},
Middle {
mode: Mode,
delim: String,
},
Kern {
mode: Mode,
dimension: Measurement,
},
Enclose {
mode: Mode,
body: Box<ParseNode>,
label: String,
background_color: Option<String>,
border_color: Option<String>,
},
Href {
mode: Mode,
href: String,
body: Vec<ParseNode>,
},
Html {
mode: Mode,
attributes: HashMap<String, String>,
body: Vec<ParseNode>,
},
IncludeGraphics {
mode: Mode,
alt: String,
width: Measurement,
height: Measurement,
totalheight: Measurement,
src: String,
},
Tag {
mode: Mode,
body: Vec<ParseNode>,
tag: Vec<ParseNode>,
},
Array {
mode: Mode,
body: Vec<Vec<ParseNode>>,
add_jot: bool,
array_stretch: f64,
columns: Option<Vec<ArrayColumn>>,
row_gaps: Vec<Option<Measurement>>,
hskip_before_and_after: bool,
hlines_before_row: Vec<Vec<bool>>,
column_separation_type: Option<ColumnSeparationType>,
tags: Option<Vec<Option<Vec<ParseNode>>>>,
auto_tags: Option<Vec<bool>>,
leqno: bool,
},
EnvironmentEnd {
mode: Mode,
name: String,
},
CdLabel {
mode: Mode,
side: String,
label: Box<ParseNode>,
},
CdParent {
mode: Mode,
fragment: Box<ParseNode>,
},
Cr {
mode: Mode,
new_line: bool,
size: Option<Measurement>,
},
HtmlMathML {
mode: Mode,
html: Vec<ParseNode>,
mathml: Vec<ParseNode>,
},
OrdGroup {
mode: Mode,
loc: Option<SourceLocation>,
body: Vec<ParseNode>,
semisimple: bool,
},
SupSub {
mode: Mode,
base: Option<Box<ParseNode>>,
sup: Option<Box<ParseNode>>,
sub: Option<Box<ParseNode>>,
},
TextOrd {
mode: Mode,
loc: Option<SourceLocation>,
text: String,
},
MathOrd {
mode: Mode,
loc: Option<SourceLocation>,
text: String,
},
Spacing {
mode: Mode,
loc: Option<SourceLocation>,
text: String,
},
AccentToken {
mode: Mode,
loc: Option<SourceLocation>,
text: String,
},
OperatorToken {
mode: Mode,
loc: Option<SourceLocation>,
text: String,
},
Accent {
mode: Mode,
loc: Option<SourceLocation>,
label: String,
is_stretchy: bool,
is_shifty: bool,
base: Box<ParseNode>,
},
Verb {
mode: Mode,
loc: Option<SourceLocation>,
body: String,
star: bool,
},
Atom {
mode: Mode,
loc: Option<SourceLocation>,
family: AtomFamily,
text: String,
},
Color {
mode: Mode,
color: String,
body: Vec<ParseNode>,
},
}Expand description
A parsed node in the LaTeX AST.
Variants§
Internal
Raw
ColorToken
Size
Url
Styling
Sqrt
Infix
GenFrac
Fields
§
bar_size: Option<Measurement>Text
Font
MClass
Op
Fields
§
content: OperatorContentOperatorName
Fields
Overline
Underline
Smash
Phantom
VPhantom
Pmb
VCenter
Rule
RaiseBox
HBox
Lap
MathChoice
Fields
Sizing
HorizBrace
XArrow
AccentUnder
DelimSizing
LeftRightRight
LeftRight
Middle
Kern
Enclose
Fields
Href
Html
IncludeGraphics
Tag
Array
Fields
§
columns: Option<Vec<ArrayColumn>>§
row_gaps: Vec<Option<Measurement>>§
column_separation_type: Option<ColumnSeparationType>EnvironmentEnd
CdLabel
CdParent
Cr
HtmlMathML
OrdGroup
SupSub
Fields
TextOrd
MathOrd
Spacing
AccentToken
OperatorToken
Accent
Fields
§
loc: Option<SourceLocation>Verb
Atom
Color
Implementations§
Trait Implementations§
impl StructuralPartialEq for ParseNode
Auto Trait Implementations§
impl Freeze for ParseNode
impl RefUnwindSafe for ParseNode
impl Send for ParseNode
impl Sync for ParseNode
impl Unpin for ParseNode
impl UnsafeUnpin for ParseNode
impl UnwindSafe for ParseNode
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