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: DisplayMode
See 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: bool
If 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: MathStyle
See 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 duplicate 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