pub struct MathRenderer { /* private fields */ }Expand description
Math renderer that converts LaTeX/MathML to Unicode terminal output
Implementations§
Source§impl MathRenderer
impl MathRenderer
pub fn new() -> Self
Sourcepub fn use_unicode_scripts(self, use_unicode: bool) -> Self
pub fn use_unicode_scripts(self, use_unicode: bool) -> Self
Set whether to use Unicode superscript/subscript characters when possible
Sourcepub fn render_latex(&self, latex: &str) -> Result<String, RenderError>
pub fn render_latex(&self, latex: &str) -> Result<String, RenderError>
Render LaTeX math to Unicode string
Sourcepub fn render_mathml(&self, mathml: &str) -> Result<String, RenderError>
pub fn render_mathml(&self, mathml: &str) -> Result<String, RenderError>
Render MathML to Unicode string
Sourcepub fn render_to_box(&self, latex: &str) -> Result<MathBox, RenderError>
pub fn render_to_box(&self, latex: &str) -> Result<MathBox, RenderError>
Render to MathBox (for advanced usage)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MathRenderer
impl RefUnwindSafe for MathRenderer
impl Send for MathRenderer
impl Sync for MathRenderer
impl Unpin for MathRenderer
impl UnwindSafe for MathRenderer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more