Skip to main content

counter_decl

Function counter_decl 

Source
pub fn counter_decl() -> CounterDecl
Expand description

The declaration of the counter COUNTER (flm.math.equation), shown by default in the counter style COUNTER_STYLE and numbered within no other counter.

Numbered within no other counter means that the counter never restarts and that no other counter’s number is written before its own. A document that wants equations numbered within sections, (1.1), (1.2), (2.1), sets that in its numbering options (NumberingOptions).

The Math feature contributes this declaration to the numbering feature’s service slot of counters as a peer contribution, a contribution to a service slot that another feature owns (services): where the numbering feature is not registered, the contribution is dropped with one Note and no equation is numbered.

§Examples

use flm_core::stdlib::features::math;

let decl = math::counter_decl();
assert_eq!(decl.name, math::COUNTER);
assert_eq!(decl.default_style, math::COUNTER_STYLE);
assert!(decl.within.is_none());