Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Provide html anchors for Options #48
Technically speaking, I think this could be implemented by adding anchors to the first
We’ll need to run some tests to see how much this blows up the resulting HTML and how to properly display the paragraph symbol so that users know what’s going on. Possibly, we’ll need to move the paragraph to the left side of the element to avoid reflows of the content when hovering.
Also, the uniqueness of anchors should likely be enforced (and we should derive the anchor name from section + text, not just text).
Not sure when I’ll get around to all of this, pull requests and experiment results welcome!
Hi @oorestisime ,
this ought to work out of the box with mandoc-1.12.4 and higher.
Here is an example of a remote deep link using that feature:
Needless to say, it can only ever work with manual pages written in the mdoc(7) language. The anachronistic, low-quality man(7) language is simply not expressive enough to support any such feature.
your closing of this ticket made me check whether this is really already fixed in the deployed version of debiman on manpages.debian.org (as opposed to only in mandoc), and that made me find an issue closely related to it: the id_unique ohash wasn't reset between different manual pages, resulting in suffix counting advancing globally across all manual pages and hence ugly ids like
which should really be just "#a" without a suffix of "_67".
I fixed this in:
which will be contained in the next mandoc release (to be called 1.14.5). I'm currently wrapping up various minor issues and not planning to work on any major new features before release, so it shouldn't take that long any more.