Counters are auto-incrementing fields. They can be used to count items such as figures, tables, equations... throughout the project. Counter instances can have an optional caption and identifier. Counters have both global properties (such as caption format) and instance properties (such as caption and unique ID).
Create a counter: overview of the user interface
When creating a new counter to the library, the following dialog is shown.
1. Library item name
Choose a unique name for that library item.
2. Format
The final exported counter's value is based on the format specified:
- Caption format: Specify the format of the exported counter if the counter instance's caption is not empty
- Empty caption format: Specify the format of the exported counter if the counter instance's caption is empty
Some examples of exported counters:
Caption format |
Empty caption format |
Instance's caption |
Exported value |
Figure {A}: {caption} |
Figure {n} |
[Empty] |
Figure 1 |
Figure {A}: {caption} |
Figure {n} |
HelpNDoc |
Figure A: HelpNDoc |
{caption} - Table {R} |
Table {r} |
[Empty] |
Table i |
{caption} - Table {R} |
Table {r} |
HelpNDoc |
HelpNDoc - Table I |
3. Placeholders
Field |
Description |
{caption} |
Replaced by the instance's caption |
{n} |
Counter number as an integer value (e.g. 1, 2, 3, 4...) |
{r} |
Counter number as lowercase roman value (e.g. i, ii, iii, iv...) |
[R} |
Counter number as uppercase roman value (e.g. I, II, III, IV...) |
{a} |
Counter number as lowercase alpha value (e.g. a, b, c, d...) |
{A} |
Counter number as uppercase alpha value (e.g. A, B, C, D...) |
Counter instance: overview of the user interface
By double-clicking a counter in HelpNDoc's topic editor, the counter instance's editor is shown.
1. Library item name
Choose a unique name for that library item. Warning: This is shared between all instances as it is applied to the associated library item.
2. Instance settings
Settings which are specific to this counter's instance.
Setting |
Description |
Caption |
Caption of this instance which will be used to replace the {caption} placeholder when exported. If specified, it will be exported using the "Caption format" value. If empty, it will be exported using the "Empty caption format". |
Id |
Unique identifier of the instance. See: Link to a counter |
3. Global settings
Those settings are shared between all instances as they are applied to the associated library item. See: Create a counter - overview of the user interface.