this post was submitted on 30 Dec 2025
85 points (97.8% liked)

Linux

10813 readers
446 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

In demonstrating one of the gaps of man pages in modern times and likely having hindered the adoption of the Linux kernel's new mount API, it took more than six years for those system calls to be properly documented within man pages. The Linux "new" mount API was introduced back in mid-2019 with Linux 5.2 and since supported by key file-systems after several years but not until weeks ago was this file descriptor based mount API scoped out within man pages.

The "new" mount API for Linux is a set of system calls like fsopen and fsconfig for offering more flexibility than the Linux kernel's long-used mount system call that is a one-shot approach compared to this modern multi-step design for better flexibility. In the kernels since Linux 5.2, various file-systems have transitioned to supporting the modern mount API. It was only earlier this year that F2FS added support for it as one of the last major file-systems without it.

you are viewing a single comment's thread
view the rest of the comments
[–] onlinepersona@programming.dev 19 points 7 hours ago (4 children)

Groff is indeed such a crap format to write documentation in. It nearly reads like zalgo.

I can't wait for the anti markdown people to come out of the woodwork though and complain that it's "the progressivist agenda" to be more user friendly because devs aren't users.

"If you can't write Groff, maybe you dont deserve to read the output"

"The markdown evangelists are so annoying. You can't just rewrite everything in markdown"

"When will this markdown craze stop??? I can't hear it anymore!"

Identity politics entered the developer arena.

[–] MonkderVierte@lemmy.zip 1 points 1 hour ago* (last edited 1 hour ago) (1 children)

Missing features in Markdown:

  • description lists (some have them, commonmark doesn't)
  • image captions & resizing
  • basic richtext like underline without html syntax
  • native vector (svg) handling

I'm not saying not to use md (vs. asciidoc/tor, restex or orgmode) but to add the features please.

[–] onlinepersona@programming.dev 3 points 1 hour ago (2 children)

Description lists?

Richtext? Like this or this ?

SVG handling? I've never seen a manpage with SVGs nor have I seen a manpage with images, much less image captions.

[–] MonkderVierte@lemmy.zip 1 points 1 hour ago* (last edited 1 hour ago)

SVG handling? I've never seen a manpage with SVG … image captions

This is from wanting to use markdown for more than tech. documentation, like saving some simple websites.

[–] MonkderVierte@lemmy.zip 1 points 1 hour ago* (last edited 1 hour ago)

Richtext? Like this or this ?

No, like the mentioned <u>underline</u> (this is how you write it in ~~markdown~~ html).

[–] The_Decryptor@aussie.zone 7 points 3 hours ago

These days there's scdoc, you can see the source for a man page written in it here, and the output here.

[–] kogasa@programming.dev 7 points 5 hours ago (1 children)

Honestly this is the first I've heard of groff, but I'd be surprised if it's not easy to transpile a Markdown document into the format. Have written only Markdown-based docs for a decade

[–] pivot_root@lemmy.world 8 points 4 hours ago* (last edited 4 hours ago) (1 children)

I'd be surprised if it's not easy to transpile a Markdown document into the format

By hand—if you have experience writing roff typesetting—it is.

Having a program do it for you... you're going to get something, but it won't be correct and you will need to fix most of it.

A few problems come to mind:

  1. It's a macro-based typesetting language. As a consequence, there's a one-to-many association between representations in Markdown with some equivalent in roff. A Markdown paragraph is just a paragraph, but in roff it could be an un-indented paragraph, a paragraph with first-line indentation, a paragraph with line-wrap indentation, or a paragraph with a left margin.

  2. Rendering a man page, you have multiple different implementations of man and multiple different implementations of *roff (roff, troff, groff, nroff). The set of macros and features that are available differ depending on which implementation, resulting in one-size-fits-all solutions targeting the lowest common denominator.

  3. Ironically, the one-to-many association goes both ways. With Markdown, you have code fences, quotes, italic text, bold text, and tables. With lowest-common-denominator manpage roff, you have paragraphs and emphasis that will either be shown as bold or inverted. If you're lucky, you might also be able to use underlines. If Markdown tables are no wider than 80 characters, you could preprocess those into plain characters, at least.

  4. Despite being more structured with its typesetting, the contents of a manpage are mostly still unstructured. The individual sections within the page and its use of indentation and emphasis are entirely convention, and not represented in the source code by anything more than just typesetting macro primitives.

It could work out if you generate both the Markdown and man page from something with more explicit structure. If the plan is to go from a loose Markdown document into a manpage, you're going to end up having to write your Markdown document almost exactly like a manpage.

[–] Oinks@lemmy.blahaj.zone 3 points 2 hours ago* (last edited 2 hours ago)

Pandoc actually does a reasonable job at turning (Pandoc flavored) markdown into man-roff. Sure it doesn't work for arbitrary markdown but it's good enough to avoid writing roff by hand.

The main reason I see for not doing that (and using something like scdoc instead) is that you end up with a Haskell toolchain in your dependency graph.

[–] emmanuelw@jlai.lu 5 points 5 hours ago* (last edited 4 hours ago)

I love groff! But i don't write documentation, so that may be why.