#[derive(Debug, Clone)]
pub enum LatexNode {
Document {
preamble: Vec<LatexNode>,
body: Vec<LatexNode>,
},
Section(String),
Subsection(String),
Subsubsection(String),
Paragraph(String),
Subparagraph(String),
Text(String),
Bold(String),
Italic(String),
Underline(String),
Emphasized(String),
Colored { color: String, content: String },
FontSize { size: String, content: String },
InlineMath(String),
DisplayMath(String),
MathEnvironment {
name: String,
content: String,
},
Itemize(Vec<LatexNode>),
Enumerate(Vec<LatexNode>),
Description(Vec<(String, String)>),
ListItem(String),
Table {
alignment: Vec<String>,
rows: Vec<Vec<String>>,
caption: Option<String>,
},
Image {
path: String,
width: Option<String>,
height: Option<String>,
caption: Option<String>,
},
Figure {
content: Vec<LatexNode>,
caption: Option<String>,
},
Hyperlink {
url: String,
text: String,
},
Footnote(String),
Label(String),
Ref(String),
Cite(String),
Bibliography {
style: Option<String>,
items: Vec<LatexNode>,
},
BibItem {
key: String,
content: Vec<LatexNode>,
},
NewCommand {
name: String,
args: usize,
definition: String,
},
RenewCommand {
name: String,
args: usize,
definition: String,
},
Environment {
name: String,
content: Vec<LatexNode>,
},
HorizontalRule,
PageBreak,
TableOfContents,
RawLatex(String),
}