pub struct RenderProfile { /* private fields */ }Expand description
A configured renderer profile: which renderer, which packages it has loaded, and which user-declared macros are in scope.
Implementations§
Source§impl RenderProfile
impl RenderProfile
Sourcepub fn mathjax_v3() -> Self
pub fn mathjax_v3() -> Self
MathJax v3 with the default autoload set (base, ams, newcommand,
noundefined, require, configmacros, boldsymbol).
Sourcepub fn katex() -> Self
pub fn katex() -> Self
KaTeX with its always-available core (KaTeX core covers what MathJax
splits between base and ams, so both bits are set). Extensions
(mhchem, physics, cancel, color, mathtools) are opt-in via
with_package.
Sourcepub fn with_package(self, package: &str) -> Self
pub fn with_package(self, package: &str) -> Self
Load a package/extension by name (e.g. "mhchem", "physics").
Unknown names are silently ignored; users learn about missing packages
through check diagnostics, not the profile builder.
Sourcepub fn with_macro(self, name: impl Into<String>, arity: u8) -> Self
pub fn with_macro(self, name: impl Into<String>, arity: u8) -> Self
Declare a user-defined macro known to be available at render time. The arity is informational only; the checker treats the name as defined and does not validate argument counts.
Trait Implementations§
Source§impl Clone for RenderProfile
impl Clone for RenderProfile
Source§fn clone(&self) -> RenderProfile
fn clone(&self) -> RenderProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more