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

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

Recover a Self from Self::Abi. Read more

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary. Read more

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi. Read more

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more

The wasm ABI type references to Self are recovered from.

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don’t persist beyond one function call, and so that they remain anonymous. Read more

Recover a Self::Anchor from Self::Abi. Read more

Same as RefFromWasmAbi::Abi

Same as RefFromWasmAbi::Anchor

Same as RefFromWasmAbi::ref_from_abi

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Same as IntoWasmAbi::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.