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: boolWhether to render the math in the display mode.
left_equation_numbers: boolIf true, display math has \tags rendered on the left instead of the right.
like \usepackage[leqno]{amsmath} in LaTeX.
flush_left_equations: boolIf true, display math renders flush left with a 2em left margin
like \documentclass[fleqn] in LaTeX with the amsmath package.
throw_on_error: boolWhether to let KaTeX throw a ParseError for invalid LaTeX.
min_rule_thickness: f64Color used for invalid LaTeX. Specifies a minimum thickness, in ems.
max_size: f64Max size for user-specified sizes.
If set to None, users can make elements and spaces arbitrarily large.
max_expand: i32Limit 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: boolstrict mode
trust: boolWhether to trust users’ input.
Cannot be assigned at the same time with [OptsBuilder::trust_callback].
global_group: boolgroup
Implementations§
Source§impl 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
Source§impl 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§
Source§impl Clone for KaTeXOptions
impl Clone for KaTeXOptions
Source§fn clone(&self) -> KaTeXOptions
fn clone(&self) -> KaTeXOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more