pub struct MathCoreConfig {
pub pretty_print: PrettyPrint,
pub macros: Vec<(String, String)>,
pub xml_namespace: bool,
}Expand description
Configuration object for the LaTeX to MathML conversion.
§Example usage
use math_core::{MathCoreConfig, PrettyPrint};
// Default values
let config = MathCoreConfig::default();
// Specifying pretty-print behavior
let config = MathCoreConfig {
pretty_print: PrettyPrint::Always,
..Default::default()
};
// Specifying pretty-print behavior and custom macros
let macros = vec![
("d".to_string(), r"\mathrm{d}".to_string()),
("bb".to_string(), r"\mathbb{#1}".to_string()), // with argument
];
let config = MathCoreConfig {
pretty_print: PrettyPrint::Auto,
macros,
..Default::default()
};Fields§
§pretty_print: PrettyPrintA configuration for pretty-printing the MathML output. See PrettyPrint for details.
macros: Vec<(String, String)>A list of LaTeX macros; each tuple contains (macro_name, macro_definition).
xml_namespace: boolIf true, include xmlns="http://www.w3.org/1998/Math/MathML" in the <math> tag.
Trait Implementations§
Source§impl Debug for MathCoreConfig
impl Debug for MathCoreConfig
Source§impl Default for MathCoreConfig
impl Default for MathCoreConfig
Source§fn default() -> MathCoreConfig
fn default() -> MathCoreConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MathCoreConfig
impl RefUnwindSafe for MathCoreConfig
impl Send for MathCoreConfig
impl Sync for MathCoreConfig
impl Unpin for MathCoreConfig
impl UnwindSafe for MathCoreConfig
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