Struct katex::Opts[][src]

#[non_exhaustive]pub struct Opts { /* fields omitted */ }

Options to be passed to KaTeX.

Read https://katex.org/docs/options.html for more information.

Implementations

impl Opts[src]

pub fn builder() -> OptsBuilder[src]

Return OptsBuilder.

pub fn set_display_mode(&mut self, flag: bool)[src]

Set whether to render the math in the display mode.

pub fn set_output_type(&mut self, output_type: OutputType)[src]

Set KaTeX output type.

pub fn set_leqno(&mut self, flag: bool)[src]

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

pub fn set_fleqn(&mut self, flag: bool)[src]

Set whether to make display math flush left.

pub fn set_throw_on_error(&mut self, flag: bool)[src]

Set whether to let KaTeX throw a ParseError for invalid LaTeX.

pub fn set_error_color(&mut self, color: String)[src]

Set the color used for invalid LaTeX.

pub fn add_macro(&mut self, entry_name: String, entry_data: String)[src]

Add a custom macro. Read https://katex.org/docs/options.html for more information.

pub fn set_min_rule_thickness(&mut self, value: f64)[src]

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

pub fn set_max_size(&mut self, value: Option<f64>)[src]

Set the 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.

pub fn set_max_expand(&mut self, value: Option<i32>)[src]

Set the limit for the number of macro expansions. 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.

pub fn set_trust(&mut self, flag: bool)[src]

Set whether to trust users' input. Cannot be used at the same time with [set_trust_callback]. Read https://katex.org/docs/options.html for more information.

Panic

Panic if trust_callback is also set.

pub fn set_trust_callback(&mut self, callback: TrustCallback)[src]

Set the callback function to determine whether to trust users' input. Cannot be used at the same time with [set_trust]. Read https://katex.org/docs/options.html for more information.

Panic

Panic if trust is also set.

Trait Implementations

impl AsRef<Opts> for Opts[src]

impl Clone for Opts[src]

impl Debug for Opts[src]

impl Default for Opts[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.