Documenter.jl: Multiple identical footnotes

Created on 26 Sep 2017  路  2Comments  路  Source: JuliaDocs/Documenter.jl

Right now, Documenter errors when multiple bodies for a footnote is encountered. This is problematic, when, for instance, rendering docstrings, where each docstring may contain identical references to the same article with identically labelled footnotes. Manually relabelling these for Documenter to work "fixes" it, but it would be better if the footnotes were either collected at the bottom, or the anchor tag to each footnote was given a unique reference based on its section/function name.

This came up in: https://github.com/JuliaLang/julia/pull/23679

Bug

Most helpful comment

Referring to a footnote in another docstring is probably not good practice, unless they would automatically be pulled into the docstring. help?> would just show a reference to a footnote that the user would have no idea what was. Even then, Documenter would also fail if the referenced footnote did not appear on the same page in the rendered documentation, as far as I can tell.

All 2 comments

I would lean towards making the footnotes in each docstring be a separate group, as opposed to collecting them into a single catalogue as is done now. It would mean that you couldn't refer to footnotes defined in other docstrings, nor refer to a non-docstring footnote within a docstring anymore. As you say, the anchor would have to be updated to have a docstring-specific prefix.

Alternatively, we could also do some more sophisticated scoping with the footnotes, but I am not sure whether the complexity would be worth it.

Referring to a footnote in another docstring is probably not good practice, unless they would automatically be pulled into the docstring. help?> would just show a reference to a footnote that the user would have no idea what was. Even then, Documenter would also fail if the referenced footnote did not appear on the same page in the rendered documentation, as far as I can tell.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

halirutan picture halirutan  路  4Comments

SimonEnsemble picture SimonEnsemble  路  3Comments

nalimilan picture nalimilan  路  4Comments

dkarrasch picture dkarrasch  路  5Comments

carlobaldassi picture carlobaldassi  路  5Comments