footnote backreference links#2475
Closed
gambhiro wants to merge 3 commits intorust-lang:masterfrom
gambhiro:footnote-backref
Closed
footnote backreference links#2475gambhiro wants to merge 3 commits intorust-lang:masterfrom gambhiro:footnote-backref
gambhiro wants to merge 3 commits intorust-lang:masterfrom
gambhiro:footnote-backref
Conversation
ehuss
added a commit
to ehuss/mdBook
that referenced
this pull request
Mar 30, 2025
This makes several changes to how footnotes are rendered: - Backlinks are now included, which links back to the reference so you can continue reading where you left off. - Footnotes are moved to the bottom of the page. This helps with the implementation of numbering, and is a style some have requested. I waffled a lot on this change, but supporting the in-place style was just adding too much complexity. - Footnotes are now highlighted when you click on a reference. - Some of the spacing for elements within a footnote has now been fixed (such as supporting multiple paragraphs). - Footnote navigation now scrolls to the middle of the page. This is an alternative to rust-lang#2475 Closes rust-lang#1927 Closes rust-lang#2169 Closes rust-lang#2595
Contributor
|
Thanks for the PR! I went ahead and pushed #2626. I didn't feel like I wanted to make this configurable, and there were a number of changes and fixes I wanted to include. I appreciate your help moving this forward, it is something I've wanted for some time. |
rik86189
pushed a commit
to rik86189/mdBook
that referenced
this pull request
Apr 3, 2025
This makes several changes to how footnotes are rendered: - Backlinks are now included, which links back to the reference so you can continue reading where you left off. - Footnotes are moved to the bottom of the page. This helps with the implementation of numbering, and is a style some have requested. I waffled a lot on this change, but supporting the in-place style was just adding too much complexity. - Footnotes are now highlighted when you click on a reference. - Some of the spacing for elements within a footnote has now been fixed (such as supporting multiple paragraphs). - Footnote navigation now scrolls to the middle of the page. This is an alternative to rust-lang#2475 Closes rust-lang#1927 Closes rust-lang#2169 Closes rust-lang#2595
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an option to add backreference links at the end of footnote definitions, so that the user can return and continue reading the main body of the text.
The code is based on the footnote-rewrite.rs example.
It can be enabled with a TOML option:
This feature has been requested before in #1927