Well, this is fun! I’ll put my cards on the table: I like footnotes. But in the march from paper to screen some of the arcane parts of typesetting got overlooked. My last ACM paper (for HT’24) completely broke the ACM publishing system and the tech bros running it were lost as to the cause. Why? I’d simply used a footnote that itself had a footnote. But it’s perfectly valid, works in LaTeX (used for the article) and—the article being about hypertext—intentional. The bug was that the ACM’s ingest for authors’ drafts assumes† a footnote can only be involved in body text (wrong!). No foul, per se, but it shows how lazy assumptions go sideways fast when presented with real data. TL;DR, footnote use is likely more complex than imagined.
Markdown starts from a completely different place: single plain text document. Recall, it was created for trying to blog from press conferences, on an early smart phone. The web and Markdown have moved on a bit. But pertinently, Markdown export starts from a different design intent from Tinderbox’s‡ original export design.
But can Tinderbox do this magic? Yes, but (q.v. logic errors above) with some explicit assumptions:
- footnote texts are in discrete, linked-to, notes
- footnotes do not use the built-in Tinderbox footnote method
- footnotes are only called once in the parent document§
- footnotes do not reference other footnotes (so my usage as at start above is not possible!)
I don’t like the last two restrictions, but resolving that makes the process more complex and we’re trying to get a solution for people who don’t want to dabble in the arcana of action/export code.
My solution is here: footnote-poc5.tbx (614.4 KB).
I think I may have posted an earlier version in the forum (indeed if a same-named older doc exists, ignore it), but this fixes a few edge cases/assumptions I’d missed in past versions.
There are two test notes in the ‘Home’ folder. Export these or view in Preview mode to get an idea of the outcome. The detail of the process is in the ‘NOTES’ container. For ease of reading, you can view ‘NOTES’ in preview mode and read all the implementation notes as a single piece.
Clearly, we could to more (q.v. assumptions above) but I think this covers the basic case. If people want this without inline code in their $Text, then I think the path is to make a feature request for the magic to happen behind the curtain. However, as I suspect those of use who like footnotes are in the minority, the ROI for the work involved may not be there. Remember too, once the code works and is triggered properly, who care how it then works.
†. Yay, footnote opportunity! Probably the programmer who made the system hadn’t read more widely than tech docs and hadn’t encountered full use of footnotes. Fair enough, but that’s why sensible people use the ‘adult supervision’ of proof-reading both (and separately) for sense and pure software/code logic and so spot such silly process errors: the human sense-check would catch the erroneous error flagged by the code-perspective check.
‡. I have zero personal interest in making Tinderbox more like Markdown-centric apps. That is left as a quest for someone else.