summaryrefslogtreecommitdiff
path: root/src/library/math/script.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/math/script.rs')
-rw-r--r--src/library/math/script.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/library/math/script.rs b/src/library/math/script.rs
deleted file mode 100644
index 09f52164..00000000
--- a/src/library/math/script.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-use std::fmt::Write;
-
-use super::*;
-use crate::library::prelude::*;
-
-/// A sub- and/or superscript in a mathematical formula.
-#[derive(Debug, Hash)]
-pub struct ScriptNode {
- /// The base.
- pub base: MathNode,
- /// The subscript.
- pub sub: Option<MathNode>,
- /// The superscript.
- pub sup: Option<MathNode>,
-}
-
-impl Texify for ScriptNode {
- fn texify(&self) -> EcoString {
- let mut tex = self.base.texify();
-
- if let Some(sub) = &self.sub {
- write!(tex, "_{{{}}}", sub.texify()).unwrap();
- }
-
- if let Some(sup) = &self.sup {
- write!(tex, "^{{{}}}", sup.texify()).unwrap();
- }
-
- tex
- }
-}