Struct katex_wasmbind::KaTeXOptions
source · [−]pub struct KaTeXOptions {
pub display_mode: bool,
pub left_equation_numbers: bool,
pub flush_left_equations: bool,
pub throw_on_error: bool,
pub min_rule_thickness: f64,
pub max_size: f64,
pub max_expand: i32,
pub strict: bool,
pub trust: bool,
pub global_group: bool,
/* private fields */
}
Expand description
Read https://katex.org/docs/options.html for more information.
Fields
display_mode: bool
Whether to render the math in the display mode.
left_equation_numbers: bool
If true, display math has \tags
rendered on the left instead of the right.
like \usepackage[leqno]{amsmath}
in LaTeX.
flush_left_equations: bool
If true, display math renders flush left with a 2em
left margin
like \documentclass[fleqn]
in LaTeX with the amsmath package.
throw_on_error: bool
Whether to let KaTeX throw a ParseError for invalid LaTeX.
min_rule_thickness: f64
Color used for invalid LaTeX. Specifies a minimum thickness, in ems.
max_size: f64
Max size for user-specified sizes.
If set to None
, users can make elements and spaces arbitrarily large.
max_expand: i32
Limit the number of macro expansions to the specified number.
If set to None
, the macro expander will try to fully expand as in LaTeX.
strict: bool
strict mode
trust: bool
Whether to trust users’ input.
Cannot be assigned at the same time with [OptsBuilder::trust_callback
].
global_group: bool
group
Implementations
sourceimpl KaTeXOptions
impl KaTeXOptions
sourcepub fn display_mode() -> KaTeXOptions
pub fn display_mode() -> KaTeXOptions
Set output as \displaystyle
sourcepub fn inline_mode() -> KaTeXOptions
pub fn inline_mode() -> KaTeXOptions
Set output as \inlinestyle
sourceimpl KaTeXOptions
impl KaTeXOptions
sourcepub fn set_output_format(&mut self, format: &str) -> bool
pub fn set_output_format(&mut self, format: &str) -> bool
Determines the markup language of the output.
The valid choices are:
html
: Outputs KaTeX in HTML only.mathml
: Outputs KaTeX in MathML only.htmlAndMathml
: Outputs HTML for visual rendering and includes MathML for accessibility. This is the default.
sourcepub fn set_error_color(&mut self) -> bool
pub fn set_error_color(&mut self) -> bool
Set the color of the error message.
sourcepub fn insert_macro_rule(&mut self) -> bool
pub fn insert_macro_rule(&mut self) -> bool
Insert a custom macro.
Trait Implementations
sourceimpl Clone for KaTeXOptions
impl Clone for KaTeXOptions
sourcefn clone(&self) -> KaTeXOptions
fn clone(&self) -> KaTeXOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for KaTeXOptions
impl Debug for KaTeXOptions
sourceimpl Default for KaTeXOptions
impl Default for KaTeXOptions
sourceimpl<'de> Deserialize<'de> for KaTeXOptions
impl<'de> Deserialize<'de> for KaTeXOptions
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for KaTeXOptions
impl Serialize for KaTeXOptions
Auto Trait Implementations
impl RefUnwindSafe for KaTeXOptions
impl Send for KaTeXOptions
impl Sync for KaTeXOptions
impl Unpin for KaTeXOptions
impl UnwindSafe for KaTeXOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more