Open metaist opened 11 months ago
So... mostly I'll borrow the naming and meaning from the Predefined Counter Styles.
When registering a Style
, I should probably raise an exception if it's already been registered. (And then I need an override=True
to let me do it anyway.)
So .up()
increments the current level. What if there are no levels? Should that raise an exception?
Probably not for now, but something to consider.
So it looks like I have two different kinds of "styles": numeral systems and formatting. And for "formatting" there are two kinds of display: the full citation (when making a reference) and the definition format.
After much back-and-forth, I think I finally have it in a basic form I like. Levels and References are both Ref
objects with slightly different purposes. The former manages which kind of section we're in an how things get formatted (via .push()
) while the latter controls how we reference this specific location (via .up()
).
This is definitely different that the CSS 3 Counter Styles in many ways.
I'm reading the W3C spec for Counters to see if there's anything from there worth implementing.
I generally like the way that CSS Counter Styles 3 works, but I don't think I need most of that functionality.
name
: yessystem
: no; just give me a.render
function insteadnegative
: no; I only have non-zero positive numberingprefix
/suffix
: maybe; for now I just need.value
or(value)
pad
: no; just change your.render
range
/fallback
: no; I don't have limited rangesymbols
/additive-symbols
: no; I don't support this stylespeak-as
: interesting, but not relevant for my use case