Contributed by Peter N. M. Hansteen on from the express delivery dept.
During EuroBSDCon 2018 in Bucuresti, Adam Kalisz suggested to add a table of contents near the top of the HTML output of mandoc, and i just implemented and committed that.
It is only done when both of the following conditions hold:
- It is explicitly requested with -T html -O toc,
- and the page in question has at least two non-standard sections - otherwise, the table would be boring and pointless.
As an experiment, i enabled it on man.openbsd.org, see for example
The purpose is to facilitate quick navigation inside the page by clicking on the section title in the TOC that you are looking for. Consequently, something similar would not make sense and is not implemented for terminal output because there is no clicking there, and you can already type "/^TRUNK" for quick terminal navigation.
If there should be an outrage and no positive feedback, i might disable the experimental feature again on man.openbsd.org, but the option is somewhat likely to stay.
Besides, as suggested by kristaps@, it is now possible to provide two arguments to -T html -O man, and that is used in the manual pages of the mandoc portable release on
If you look for example at
you will notice that .Xr links pointing to mandoc manual pages like mdoc(7), man(7), and man(1) link to the local copies contained in the lastest release, while external links like more(1) and uname(3) link off-site to man.openbsd.org.
That means all three improvements suggested by attendees of EuroBSDCon 2018 have been implemented within ten days of the end of the conference, and in time for the upcoming OpenBSD 6.4 release.
(Comments are closed)