We have long been aware that a #tabular should have "table notes" and not
footnotes. So, we have a new element, #tn, for use only within a #tabular.
Notes render with marks a, b, c,... right below the table. So they are "local"
in a way, and are not knowls and cannot be cross-referenced, etc Definitely
not a variant of #fn. A new element.
Chicago Manual of Style (18th edition, 3.77–3.81; specific notes at 3.80)
If you have a "paragraph" cell, the #tn is restricted to lie inside the #cell,
but simply adjacent to the #p, and will render at the end of the #p. Since a
"paragraph cell" is an outlier, we have allowed this restriction, in large part
to keep the schema neat and tidy.
Bonus: no fancy footwork in LaTeX due to tcolorboxes. Hmm, maybe we can
generalize that...
What happens to a footnote ("fn") already inside a table?
Nothing breaks. A "fn" within a "tabular" cell is now understood as a
table note: your document builds as before, but the note renders as a
superscript lowercase letter in the cell, with its text collected at
the bottom of the table -- the Chicago Manual of Style treatment of
notes to tables. A deprecation warning will ask you to convert the
element to "tn", the table note element, at your convenience.
One visible consequence: a table note is apparatus of the table, not a
true footnote, so it no longer consumes a footnote number. If your
document has footnotes inside tables today, the numbers of later,
genuine footnotes will decrease the next time you build. And since a
table note is not a target for a cross-reference, an "xref" pointing at
a footnote inside a table will no longer resolve - reconsider such a
cross-reference as part of converting.
A bit of a torture-test:
Table 13.2: Table Notes in Demanding Locations
https://pretextbook.org/examples/sample-article/html/section-table-calisthenics.html#table-note-gallery
Note: the logic and mechanics of this should be in good shape, the
presentation might need some work. So holler if you put this to use
and see some necessary tweaks.
https://github.com/PreTeXtBook/pretext/pull/3113