What would you use to create high quality man pages?
scdoc and asciidoc don't support cross-references.
I'm kind of starting to see why some authors just write raw troff and commit that, but I'd like something more human-friendly if possible.
What would you use to create high quality man pages?
scdoc and asciidoc don't support cross-references.
I'm kind of starting to see why some authors just write raw troff and commit that, but I'd like something more human-friendly if possible.
@navi @whynothugo rc-*.8 are all mdoc, unsurprising as mdoc comes from BSD and OpenRC has some BSD heritage.
See mdoc(7) for the format.
@whynothugo @navi Can .Xr be used in man(7) pages?
Because as far as I know it's an mdoc(7) exclusive and I don't think you can mix two sets of troff macros.
(Although mdoc(7) is a bit more standalone since mandoc, but groff as used by manpagers like man-db on most Linuxes also supports mdoc(7) so still somewhat a set of troff macros)
@navi @lanodan The mention on the list was my own: https://lists.sr.ht/~sircmpwn/public-inbox/%3Ca31b8cd7-079b-4a7f-b6c5-01d90b5bd08f@app.fastmail.com%3E
I tried to produce a patch but failed miserably. A larger refactor is required. If you want to give it a shot, it would be most appreciated!
scdoc is also missing support for Sx, which allows linking to another section in the page (man pagers merely style the link, but HTML renders will insert the appropriate anchors). This one is less important, but nice to have.
@whynothugo @navi > It's the format into which all man pages are compiled.
It's absolutely not, check a manpage from say a GNU project if you want to see what a man(7) document looks like.
In fact in practice it can even be the other way around as mandoc ships with -Tman to render into a man(7) document for purely legacy purposes.
@lanodan @navi Indeed, they are mdoc. If I understand correctly, mdoc is a subset of roff with some additional macros. It's the format into which all man pages are compiled.
@lanodan @navi I see, I'd quite misunderstood the situation.
Inspecting the raw man page for rc-update and sway I see that they are slightly different (being mdoc and man respectively). man(1) doesn't care about the difference and renders both without issues.
mdoc(7) is definitely more readable than man(7). The description for man(7) refers to it as "legacy formatting language for manual pages".
@lanodan @navi I wish man(1) would support things like following references.
@navi @lanodan We _could_ write a brand new man(1) which reads both mdoc(7) and man(7) but has support for links and reflowing. I'll put it at the end of my TODO list, I might have time in 735 years.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.