pub struct MathConfig {
pub numbered_equations: bool,
}Expand description
The configuration of the math feature: whether the lines of the
unstarred display-math environments are numbered.
A feature’s configuration is the plain Rust value the feature is
constructed from; it is fixed when the registry is built (settings,
options and
configuration).
This setting must be fixed when the registry is built, because the
reference points that an environment declares depend on it, and the code
that declares them (the element’s Referenceable aspect; see elements
and aspects) cannot
read an option set per document or per render. The feature adds
digest_bytes to the registry digest, so that
two registries built with different configurations have different
digests.
§Examples
use flm_core::stdlib::features::math::MathConfig;
assert!(MathConfig::new().numbered_equations);
let unnumbered = MathConfig::new().numbered_equations(false);
assert!(!unnumbered.numbered_equations);Fields§
§numbered_equations: boolWhether the lines of equation, align and gather that carry no
\nonumber and no \tag are numbered. true by default. The lines
of equation*, align* and gather* are never numbered.
Implementations§
Source§impl MathConfig
impl MathConfig
Sourcepub fn new() -> MathConfig
pub fn new() -> MathConfig
The default configuration: the lines of the unstarred environments are numbered.
Sourcepub fn numbered_equations(self, numbered: bool) -> MathConfig
pub fn numbered_equations(self, numbered: bool) -> MathConfig
Builder: sets numbered_equations.
Sourcepub fn digest_bytes(&self) -> Vec<u8> ⓘ
pub fn digest_bytes(&self) -> Vec<u8> ⓘ
The bytes this configuration adds to the registry digest, one per field.
Trait Implementations§
Source§impl Clone for MathConfig
impl Clone for MathConfig
impl Copy for MathConfig
Source§impl Debug for MathConfig
impl Debug for MathConfig
Source§impl Default for MathConfig
impl Default for MathConfig
Source§fn default() -> MathConfig
fn default() -> MathConfig
Source§impl<'de> Deserialize<'de> for MathConfigwhere
MathConfig: Default,
impl<'de> Deserialize<'de> for MathConfigwhere
MathConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for MathConfig
Source§impl Hash for MathConfig
impl Hash for MathConfig
Source§impl JsonSchema for MathConfig
impl JsonSchema for MathConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for MathConfig
impl PartialEq for MathConfig
impl StructuralPartialEq for MathConfig
Auto Trait Implementations§
impl Forget for MathConfig
impl Freeze for MathConfig
impl Move for MathConfig
impl RefUnwindSafe for MathConfig
impl Send for MathConfig
impl Sync for MathConfig
impl Unpin for MathConfig
impl UnsafeUnpin for MathConfig
impl UnwindSafe for MathConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more