Expand description
§Counters
This is modelled on LaTeX’s counter mechanisms, but since it also provides support for ID’s, even where there is no visible reference number, it is defined in general. These id’s should be both unique, and parallel the visible reference numbers (as much as possible). Also, for consistency, we add id’s to unnumbered document elements (eg from \section*); this requires an additional counter (eg. UNsection) and mechanisms to track it.
Structs§
- Begin
Itemize Options - configuration for begin_itemize
- NewCounter
Options - configuration for new_counter
Functions§
- add_
to_ counter - increments a named counter by a
Number - begin_
itemize - Prepare for an list (itemize/enumerate/description/etc) by determining the right counter (level) and binding the right \item ( $type@item, if $type is defined)
- counter_
value - Fetches the value associated with the counter C<$ctr>.
- maybe_
note_ label - Use to note a discovered label to support label-derived refererence numbers Can by used by \label, among others. Note we only record the label if it hasn’t already been peeked, and consumed.
- maybe_
peek_ label - Use to peek for FOLLOWING \label{…} to support label-derived reference numbers (Perl: MaybePeekLabel)
- new_
counter - Defines a new counter named $ctr.
If
withinis defined,ctrwill be reset wheneverwithinis incremented. - ref_
current_ id - Recycle the last ID without incrementing (Perl: RefCurrentID) Useful if the last ID-ed box got pruned.
- ref_
step_ counter - Analog of
\refstepcounter, steps the counter and returns a hash containing the keysrefnumandid. - ref_
step_ id - For UN-numbered units.
Like
RefStepCounter, but only steps the “uncounter”, and returns only the id; This is useful for unnumbered cases of objects that normally get both a refnum and id. - ref_
step_ item_ counter - Create id, and tags for an itemize type \item
- rescue_
caption_ counters - Copies the current id, tags, and inlist counter values into whatsit properties Perl: RescueCaptionCounters (latex_constructs.pool.ltxml L3260-3271)
- reset_
counter - Resets the counter
ctrto zero. - set_
enumeration_ style - Set the enumeration style for a given level. Perl: setEnumerationStyle($stuff, $level) Parses the style tokens to detect A/a/I/i/1 patterns and defines \theenum$level and \labelenum$level accordingly.
- set_
itemization_ style - Set the itemization style for a given level. Perl: setItemizationStyle($stuff, $level) If $level is not given, uses the current @itemlevel. Defines \labelitem$level to $stuff.
- step_
counter - Analog of
\stepcounter, steps the counter and returns the expansion of\the$ctrUsually you should useref_step_counter(ctr)instead.