Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnotes inside Tables #22

Open
1 task
tajmone opened this issue Oct 24, 2019 · 6 comments
Open
1 task

Footnotes inside Tables #22

tajmone opened this issue Oct 24, 2019 · 6 comments
Labels
🔨 Asciidoctor Tool: Asciidoctor ⭐ footnotes Topic: book footnotes ⚠️ important Priority: High

Comments

@tajmone
Copy link
Owner

tajmone commented Oct 24, 2019


When footnotes occur in tables, inside a cell styled as a (AsciiDoc), then the footnote will be created at the end of the cell. This happens because AsciiDoc cells are treated as embedded AsciiDoc documents.

NOTE 1 — Nevertheless, footnotes numbering is preserved inside table cells, without breaking the general numbering order.

Although in some cases this might be acceptable, there are tables which contain multiple notes with the same text, which could be externalized as a single footnote — but this would look ugly because they'd appear as a single note pointing to another cell — unless that cell could be styled as d (default), which is fine if any of these cells doesn't require the AsciiDoc style.

My main concern is having to deal with tables where some notes are placed at the bottom of the cell, while others at the bottom of the section (i.e. in HTML docs). I'd rather have a consistent style throughout the book.

The most significant example of this is Appendix H: CODE PATTERNS, which contains 11 footnotes, all inside table cells, 9 of them being also inside a code-block, and many of the being duplicate.

NOTE 2 — Although Asciidoctor allows to reuse a same note more than once, keep in mind that clicking on the footnote link will jump to the note text, but the back-link of the footnote number will only jump back to the first occurrence of that note — which could be a problem for the reader, who will loose track of where he was.

I need to consider if it's worth sharing the same footnote or if it's better to just create a shared attribute containing the same text, to avoid repetition of contents but preserve the redundant footnote, so each has a correct back-link. (This would still introduce a DRY element in the workflow).

References

@tajmone tajmone added ⚠️ important Priority: High 🕑 pending decision Issue requires decisions by maintainers ⭐ footnotes Topic: book footnotes labels Oct 24, 2019
@tajmone tajmone added this to the Footnotes milestone Oct 24, 2019
@tajmone tajmone mentioned this issue Oct 27, 2019
19 tasks
@tajmone
Copy link
Owner Author

tajmone commented Oct 27, 2019

Footnotes in Tables Behaving Normally

An example of a footnote occurring in table cell but behaving like all other normal notes is note 72 in 26. THE HUGO ENGINE AND HOW IT WORKS.

Since the cell containing the note is styled as d (default), the actual note text is not inside the cell but with the rest of the other footnotes at the end of the HTML doc.

tajmone added a commit that referenced this issue Oct 27, 2019
Proofread and externalize all footnotes in Ch. "26. THE HUGO ENGINE".

This is actually a single footnote (note 72), inside a table cell
styled as `d` (default), so the footnote text is not displayed in the
cell but with the rest of the notes at the end of the document.

(See #21, #22)
tajmone added a commit that referenced this issue Oct 27, 2019
Proofread and externalize footnotes in §15. TOKENS AND DATA TYPES.

NOTE: There are 3 footnotes, the first two (66, 67) are identical, and
both inside the CSV file used to populate the table.

(See #21, #22, #24)
tajmone added a commit that referenced this issue Oct 27, 2019
Proofread and externalize all footnotes in "3. OBJECTS".
Some footnotes inside tables (see #22).

All book footnotes revised: Closes #21.
@tajmone tajmone pinned this issue Oct 27, 2019
@tajmone
Copy link
Owner Author

tajmone commented Oct 28, 2019

Upcoming Solution in Asciidoctor

I've come across the following Issue on the Asciidoctor project:

When that will be implemented, the whole problem of footnotes inside table cells will be resolved — the new b style (block) for table cells will be treated as an AsciiDoc block snippet, and not as a nested AsciiDoc document like with the a (AsciiDoc) style.

@tajmone
Copy link
Owner Author

tajmone commented Oct 28, 2019

@tajmone tajmone added 🔨 Asciidoctor Tool: Asciidoctor and removed 🕑 pending decision Issue requires decisions by maintainers labels Nov 8, 2019
@tajmone tajmone removed this from the footnotes milestone Nov 8, 2019
@tajmone tajmone unpinned this issue Nov 13, 2019
@tajmone
Copy link
Owner Author

tajmone commented Nov 19, 2019

Footnotes References

This web page discusses in great detail footnotes and their usage:

We ought to extract some correct terminology to be able to describe their use in the Styling Conventions document (i.e. avoid ambiguity when referring to note number that appears in the text body and that which appears next to note contents).

tajmone added a commit that referenced this issue Jan 15, 2020
Proofread again Chapter 7, and fix minor issues (see #46):

* Hugo code vs syntax definitions styles.
* Add anchors and cross references for dynamic grammars (See #22):
    * §7.1  (`dynamic-grammars1`)
    * Ch.17 (`dynamic-grammars2`)
* Missing inline code styles.
* Styles consistency.
* Minor typos.
tajmone added a commit that referenced this issue Jan 15, 2020
Proofread again Chapter 7, and fix minor issues (see #46):

* Hugo code vs syntax definitions styles.
* Add anchors and cross references for dynamic grammars (See #22):
    * §7.1  (`dynamic-grammars1`)
    * Ch.17 (`dynamic-grammars2`)
* Missing inline code styles.
* Styles consistency.
* Minor typos.
tajmone added a commit that referenced this issue Jan 15, 2020
Proofread again Chapter 7, and fix minor issues (see #46):

* Hugo code vs syntax definitions styles.
* Add anchors and cross references for dynamic grammars (See #22):
    * §7.1  (`dynamic-grammars1`)
    * Ch.17 (`dynamic-grammars2`)
* Missing inline code styles.
* Styles consistency.
* Minor typos.
@71GA
Copy link

71GA commented Jan 24, 2025

Has this been solved already? It is now a 5 years since this problem was reported.

@tajmone
Copy link
Owner Author

tajmone commented Jan 28, 2025

Has this been solved already? It is now a 5 years since this problem was reported.

No, and I don't think is going to be fixed any time soon either. It's a problem with the actual AsciiDoc specification, i.e. not specific to the Ruby Asciidoctor incarnation, so the question has to be referred to the AsciiDoc standard committee (which I believe it was). Similar changes, at the spec level and affecting every implementation of AsciiDoc, are likely to be discussed for a long time, and only after prolonged discussions and a final deliberation an actual proposal for change is going to make it to the next AsciiDoc Spec update, especially if it's a backward compatibility breaking change.

And even then, after having being accepted, the waiting time before the new updated AsciiDoc Spec comes into being in an Asciidoctor update is going to take ages, and most likely will only happen during a MAJOR version update too.

Optimistically, it's going to take years. But then, the Hugo project is also decades old (almost half a century), so the waiting times are not beyond the overall time span of the project.

Unfortunately, there's no lightweight markup syntax that supports footnotes in tables or inside footnotes, at least not that I'm aware of. I could give it a try with pandoc, and check if it supports at least footnotes inside table cells, but even if it did (which I doubt), it would mean having to port the entire book to pandoc, which is not easy task since the book leverages many Asciidoctor specific features which are not natively available in pandoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Asciidoctor Tool: Asciidoctor ⭐ footnotes Topic: book footnotes ⚠️ important Priority: High
Projects
None yet
Development

No branches or pull requests

2 participants