After a short thought (and trying to make it with existing stuffs), I think this feature should not concern styles but anchors.
The reasons are:
- I guess adding custom styles is not expected.
- Custom anchors may appear under existing styles / formats (e.g. a header, or a bullet in a list).
- The custom anchor insertion would look more like current anchors.
If I try to rephrase the spec, this would give (for an anchor tag named "Requirement"):
- Define an anchor tag, in config file:
[custom_anchor]
# Tag ID: "Requirement", numbering template: "[Rn]" where "n" is the automatical count.
anchor.tag = Requirement, [(?.)R#]
- Insert an anchor, in a wiki page (say My/Wiki/Page):
[=#Requirement(MyAnchorId)] The product should be able to blah blah blah.
This would display as:
[R1] The product should be able to blah blah blah.
- Insert the custom anchor table:
[[CustomAnchorIndex(Requirement [, My/Wiki/Page])]]
This would display a hyperlink list:
[R1] The product should be able to blah blah blah.
[R2] Another one blah blah blah.
- Referencing an anchor, from a (possibly different) wiki page or a ticket comment:
see [#Requirement(My/Wiki/Page:MyAnchorId)].This would display a hyperlink as:
see [My/Wiki/Page.R1].
Jean