pub enum MathMethod {
Plain,
MathJax(String),
Katex(String),
}Expand description
How math is presented by a format that offers a choice of renderers (the HTML family). The
method decides both the inline markup inside a span.math and which loader a standalone document
pulls in to typeset it: a MathJax (or plain) document carries the source TeX wrapped in \(…\) /
\[…\], whereas a KaTeX document carries the bare TeX, which its in-browser loader reads from the
span directly.
Variants§
Plain
No renderer: the \(…\) / \[…\] markup is left for the reader to typeset (or read as
source). The default.
MathJax(String)
MathJax, loaded from the given script URL. The markup keeps the \(…\) / \[…\] delimiters.
Katex(String)
KaTeX, loaded from the given asset base URL (the directory holding katex.min.js and its
stylesheet). The span carries bare TeX without delimiters.
Trait Implementations§
Source§impl Clone for MathMethod
impl Clone for MathMethod
Source§fn clone(&self) -> MathMethod
fn clone(&self) -> MathMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MathMethod
impl Debug for MathMethod
Source§impl Default for MathMethod
impl Default for MathMethod
Source§fn default() -> MathMethod
fn default() -> MathMethod
Returns the “default value” for a type. Read more
impl Eq for MathMethod
Source§impl PartialEq for MathMethod
impl PartialEq for MathMethod
Source§fn eq(&self, other: &MathMethod) -> bool
fn eq(&self, other: &MathMethod) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MathMethod
Auto Trait Implementations§
impl Freeze for MathMethod
impl RefUnwindSafe for MathMethod
impl Send for MathMethod
impl Sync for MathMethod
impl Unpin for MathMethod
impl UnsafeUnpin for MathMethod
impl UnwindSafe for MathMethod
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