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

Footnote numbers are unbearably unstable #4022

Closed
Eelis opened this issue Jun 4, 2020 · 10 comments
Closed

Footnote numbers are unbearably unstable #4022

Eelis opened this issue Jun 4, 2020 · 10 comments
Labels
decision-required A decision of the editorial group (or the Project Editor) is required.

Comments

@Eelis
Copy link
Contributor

Eelis commented Jun 4, 2020

In stark contrast with our awesome stable subclause names, footnote numbers are about as unstable as you can get.

As a result, when people make a link to a footnote in eel.is/c++draft, such a link is usually broken very quickly. :( And there isn't much I can do about it as long as the upstream footnote numbers keep changing all the time.

Would it perhaps be an idea to reset the footnote number counter to 1 in each subclause? In other words, make it so that a footnote is identified as "[ding.dong] footnote 2" instead of "footnote 134". That would completely eliminate the stability and dead link problem.

We're already breaking footnote numbers all the time anyway, so it doesn't seem too outrageous to break them a final time in order to not have to break them again in the future. :)

@Eelis Eelis changed the title Footnote number are unbearably unstable Footnote numbers are unbearably unstable Jun 4, 2020
@jwakely
Copy link
Member

jwakely commented Jun 4, 2020

They have to be numbered sequentially throughout the document:
https://www.iso.org/sites/directives/current/part2/index.xhtml#_idTextAnchor350
They're also not allowed to have titles, but maybe a stable tag would be acceptable

Making stable hyperlinks into the unstable draft is a non-goal IMHO. Paragraph numbers are unstable too, it's just a smaller problem because the numbers are relative to a specific subclause. Maybe the html generator software could create its own IDs for footnotes based on the subclause tag and paragraph number. The html anchor didn't have to be based on the footnote number used in the PDF.

@Eelis
Copy link
Contributor Author

Eelis commented Jun 4, 2020

They have to be numbered sequentially throughout the document:
https://www.iso.org/sites/directives/current/part2/index.xhtml#_idTextAnchor350
They're also not allowed to have titles, but maybe a stable tag would be acceptable

Ah, I should have guessed that the ISO straightjacket might be an obstacle here, too. ;) Thanks for the link.

Making stable hyperlinks into the unstable draft is a non-goal IMHO. Paragraph numbers are unstable too, it's just a smaller problem because the numbers are relative to a specific subclause.

That makes it not just a marginally smaller problem, but a vastly smaller problem. Vastly reducing problems seems like a worthwhile goal.

Maybe the html generator software could create its own IDs for footnotes based on the subclause tag and paragraph number. The html anchor didn't have to be based on the footnote number used in the PDF.

Well, right now if you see a link like https://eel.is/c++draft/basic#footnote-19, but you prefer the PDF, you can tell just from the URL where you need to go in the PDF without having to visit eel.is/c++draft. The links are not tied to the website.

This is really useful, because it also means that one can freely use eel.is/c++draft links in messages (e.g. on a mailing list) without worrying that the link will become meaningless if the website eventually goes down.

Introducing new IDs for the anchors would break that important property, which is why I'm very reluctant to do it.

@RedBeard0531
Copy link
Contributor

Introducing new IDs for the anchors would break that important property, which is why I'm very reluctant to do it.

You could do something like https://eel.is/c++draft/basic#officialfootnote-19-stablefootnote-12, although if you want that to work stably, you would need to use some JS to update document.location if the officialfootnote-N component is stale.

@jensmaurer
Copy link
Member

What if the HTML generator software would number footnotes sequentially from the start of each paragraph, so that the link would look like https://eel.is/c++draft/basic#def.odr-3-footnote-1 ?

There is rarely more than one footnote per paragraph, so that both helps with external links as well as stability.

In general, we tend to avoid footnotes in favor of notes for new text, but there's of course so much legacy.

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jun 4, 2020
@Eelis
Copy link
Contributor Author

Eelis commented Jun 4, 2020

What if the HTML generator software would number footnotes sequentially from the start of each paragraph, so that the link would look like https://eel.is/c++draft/basic#def.odr-3-footnote-1 ?

Problem is, if the link looks like that but we don't also number footnotes that way in the PDF, then someone who sees that link in a mailing list post and who is using the PDF (either because they just prefer the PDF or because eel.is is down) will go looking for footnote 1 in that section, but footnote 1 won't be there because the footnote numbering in the PDF will be something else.

@Eelis
Copy link
Contributor Author

Eelis commented Jun 4, 2020

You could do something like https://eel.is/c++draft/basic#officialfootnote-19-stablefootnote-12

Verbose as that is, at this point I'm desperate enough to consider it a serious option! Thanks for the suggestion, I'll think about it. :)

@jensmaurer
Copy link
Member

What if the HTML generator software would number footnotes sequentially from the start of each paragraph, so that the link would look like https://eel.is/c++draft/basic#def.odr-3-footnote-1 ?

Problem is, if the link looks like that but we don't also number footnotes that way in the PDF, then someone who sees that link in a mailing list post and who is using the PDF (either because they just prefer the PDF or because eel.is is down) will go looking for footnote 1 in that section, but footnote 1 won't be there because the footnote numbering in the PDF will be something else.

There will likely be at most one footnote in that paragraph. If you want to optimize for the 99% case, you can make the link look like https://eel.is/c++draft/basic#def.odr-3-footnote instead and avoid any reference to the footnote number.

@Eelis
Copy link
Contributor Author

Eelis commented Jun 4, 2020

Oh, you mean you'd simply deem it acceptable that the user is told the wrong footnote number. I guess that's one way of solving the problem. :D

To make that a little bit more palatable, I could perhaps use explicitly written out ordinals, e.g. http://eel.is/c++draft/ding.dong#second-footnote. Having the "second footnote" on a page be footnote 124 seems more tolerable than having "footnote 2" on a page be footnote 124.

@jensmaurer
Copy link
Member

The numbers are way off to be confused, I believe.

@Eelis
Copy link
Contributor Author

Eelis commented Jun 4, 2020

They have to be numbered sequentially throughout the document:
https://www.iso.org/sites/directives/current/part2/index.xhtml#_idTextAnchor350
They're also not allowed to have titles, but maybe a stable tag would be acceptable

Well I wouldn't want to propose inventing stable tags for footnotes, because that sounds like a lot of work for something insignificant.

So maybe there's nothing reasonable that can be done, in which case this ticket can of course be closed.

Thanks for brainstorming with me! I'll figure something out for cxxdraft-htmlgen. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decision-required A decision of the editorial group (or the Project Editor) is required.
Projects
None yet
Development

No branches or pull requests

4 participants