Struct katex::opts::Opts[][src]

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

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

Trait Implementations

impl AsRef<Opts> for Opts[src]

fn as_ref(&self) -> &Opts[src]

Performs the conversion.

impl Clone for Opts[src]

fn clone(&self) -> Opts[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Opts[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for Opts[src]

fn default() -> Opts[src]

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

Auto Trait Implementations

impl RefUnwindSafe for Opts

impl Send for Opts

impl Sync for Opts

impl Unpin for Opts

impl UnwindSafe for Opts

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.