Struct pulldown_latex::RenderConfig
source · pub struct RenderConfig<'a> {
pub display_mode: DisplayMode,
pub annotation: Option<&'a str>,
pub error_color: (u8, u8, u8),
pub xml: bool,
pub math_style: MathStyle,
}Expand description
Configuration for the mathml renderer.
The default value is: RenderConfig::default.
Fields§
§display_mode: DisplayModeSee DisplayMode.
annotation: Option<&'a str>If Some, the mathml generated includes an <annotation> element that contains the
provided string. It is commonly used to include the LaTeX source code in the generated mathml.
error_color: (u8, u8, u8)A RGB color. This option determines the color in which errors and invalid LaTeX commands are rendered in.
xml: boolIf true, a xml namespace (xmlns="http://www.w3.org/1998/Math/MathML") will be written
into the <math> element.
This namespace is unnecessary for modern browsers but can be helpful for other user agents, such as Microsoft Word.
math_style: MathStyleSee MathStyle.
Implementations§
source§impl<'a> RenderConfig<'a>
impl<'a> RenderConfig<'a>
sourcepub fn with_annotation(annotation: &'a str) -> Self
pub fn with_annotation(annotation: &'a str) -> Self
Create a new RenderConfig with the provided annotation, and default values for other fields.
Trait Implementations§
source§impl<'a> Clone for RenderConfig<'a>
impl<'a> Clone for RenderConfig<'a>
source§fn clone(&self) -> RenderConfig<'a>
fn clone(&self) -> RenderConfig<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'a> Debug for RenderConfig<'a>
impl<'a> Debug for RenderConfig<'a>
source§impl<'a> Default for RenderConfig<'a>
impl<'a> Default for RenderConfig<'a>
source§impl<'a> PartialEq for RenderConfig<'a>
impl<'a> PartialEq for RenderConfig<'a>
impl<'a> Copy for RenderConfig<'a>
impl<'a> StructuralPartialEq for RenderConfig<'a>
Auto Trait Implementations§
impl<'a> Freeze for RenderConfig<'a>
impl<'a> RefUnwindSafe for RenderConfig<'a>
impl<'a> Send for RenderConfig<'a>
impl<'a> Sync for RenderConfig<'a>
impl<'a> Unpin for RenderConfig<'a>
impl<'a> UnwindSafe for RenderConfig<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)