Struct katex::opts::OptsBuilder[][src]

pub struct OptsBuilder { /* fields omitted */ }
Expand description

Builder for Opts.

Implementations

Whether to render the math in the display mode.

KaTeX output type.

Whether to have \tags rendered on the left instead of the right.

Whether to make display math flush left.

Whether to let KaTeX throw a ParseError for invalid LaTeX.

Color used for invalid LaTeX.

Collection of custom macros. Read https://katex.org/docs/options.html for more information.

Specifies a minimum thickness, in ems. Read https://katex.org/docs/options.html for more information.

Max size for user-specified sizes. If set to None, users can make elements and spaces arbitrarily large. Read https://katex.org/docs/options.html for more information.

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. Read https://katex.org/docs/options.html for more information.

Whether to trust users’ input. Read https://katex.org/docs/options.html for more information.

Builds a new Opts.

Errors

If a required field has not been initialized.

Add an entry to macros.

Examples
let opts = katex::Opts::builder()
    .add_macro(r#"\RR"#.to_owned(), r#"\mathbb{R}"#.to_owned())
    .build()
    .unwrap();
let html = katex::render_with_opts(r#"\RR"#, &opts).unwrap();

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

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.