Mhhh, I've been thinking about, experimenting with and actually working on this quite a bit. My goal is to make it all work as sections, footnotes as well as these kinds of references and respective indexes. So if you could hold off and not jump at a quick implementation that would perhaps be good, since eventually we will need permalinking for all this and a whole lot more. So, to have two people try and figure all of this out at the same time with different semantics and features... well, we can try, but it might be quite messy in the end.
For now, let me leave you pondering the last command in my widget:
exports[""] =
exports["section"] =
exports["sections"] =
exports["ref"] =
exports["reference"] =
exports["references"] =
exports["fn"] =
exports["footnote"] =
exports["footnotes"] =
exports["$"] =
exports["context"] = ContextWidget;
Having revealed that, I guess the most important bit for me at this point would be that under any circumstances, leave the <$/> widget signature untouched, ideally all of them :D.
Here's what every widget instance will mean:
- $ or $section
- a section
- with <$ ref="ref-id"/> being a pointer to a reference, e.g. for "see (1)" or "see [TW2016]"
- $sections
- a section index for a context
- $ref or $reference
- a reference definition, e.g. what eventually is (1)
- $references
- a reference index for a context
- $fn or $footnote
- $footnotes
- a footnote index for a context
- $$ or $context
- a context encapsulating all of the above
So, if you can, please don't try to rush into building (any of) what the above suggests.
Best wishes,
Tobias.