Learn how to convert man pages to PDF using man -t and ps2pdf. Complete guide with commands for Linux, BSD, and macOS.

Read the full guide here: https://ostechnix.com/print-export-man-pages-pdf-linux-unix/

#Manualpages #manpage #pdf #ps2pdf #Ghostscript #Postscript #mandoc #Linux #Unix #Bsd #Macos #Linuxcommands #Linuxbasics #Linuxhowto #Sysadmin #Linuxadmin

How to Print and Export Man Pages to PDF in Linux and Unix - OSTechNix

Learn how to convert man pages to PDF using man -t and ps2pdf. Complete guide with commands for Linux, BSD, and macOS.

OSTechNix

@rl_dane

Have you run

doas printenv MANPATH

?

You are about to learn the joy of doas.conf, I predict.

#doas #FreeBSD #mandoc

You are kidding me!

This is the coolest way to view markdown files I've ever discovered:

lowdown -stman somefile.md |man -l -

#markdown #man #mandoc

OpenBSD

the main OpenBSD page

Has anyone talked to Ingo S of #mandoc maintenance fame lately?

Please DM if you have news.

#OpenBSD #NetBSD #FreeBSD #macOS

@ollien In a couple of days

https://man.freebsd.org/cgi/man.cgi?query=sync&manpath=FreeBSD+15.0-CURRENT

should contain the changes but for now I published the HTML render of the manual page here:

https://people.freebsd.org/~0mp/sync.html

(It was generated with `mandoc -T html bin/sync/sync.8 > /tmp/sync.html`)

#documentation #freebsd #sync #foss #opensource #mandoc #mdoc

sync

OpenBSD

the main OpenBSD page

@mos_8502 Probably because (even 😏) tex is more readable (and, of course, more verbose) 😉

The only thing that still forces you to use (a limited subset of) #roff (with some macro package) is authoring manpages that should work "everywhere" (read, systems without #mandoc support) 😉

Of course, still an interesting thing to cover. I guess "power users" (having to typeset stuff a lot) would actually like the pretty terse syntax.

@wwwgem nroff user, mostly, not GNU gnroff.

I prefer nroff with -mdoc when the primary end result does not need pictures or where plaintext availability has high value (e.g. manpages, but also other systems documentation). This is very nice to write, much nicer than Tₑχ/LᴬTᴇΧ or -man, and semantic markup.

Then GNU groff can be used to provide an additional PDF which is at least somewhat legible, and I do my own HTML conversation from the plaintext output, but mdocml (now called mandoc) can be used to create somewhat good HTML if you stick to -mdoc commands instead of using nroff primitives. (Which I tend to not do.)

I very much dislike how the GNU g{,n}roff macropackages have changed with the last release. The MirBSD nroff macropackages, specifically -mdoc, work well with GNU g{,n}roff and mostly avoid the pain. (Writing \- and a font hack were still needed.)

nroff with -man is just ugly and awful, stay away from it.

nroff with -ms (+), -me (ref), etc. is also possible, but I found -mdoc more modern and therefore less buggy.

I haven’t yet used neqn (doc, guide) or pic and only a little tbl (doc) (mostly, the native -mdoc tables suffice); AT&T nroff does not have a working pic and it doesn’t transfer to plaintext output well anyway.

I use Tₑχ/LᴬTᴇΧ when the end result primarily must be a PDF with pretty pictures (such as the installation manual of a software at $dayjob we handed to paying customers) or for more programmability. Though copy/paste from those PDFs is so bonkers I patched lstlisting to also dump the listings to a .lst file we provide along, so the admin can copy/paste the commands, examples and config files from there.

(I’ve never used $…$ math mode. I’m not in academics ☻)

I’ve pimped both (have my own Tₑχ/LᴬTᴇΧ styles/class and packages, and tweaked my groff fonts (example) and bugfixed the raw roff that implements the macros). I use both depending on where.

For my Mu͒seScore workshop, I even have a link list (source) written in a roff-like format that I convert to both Tₑχ/LᴬTᴇΧ (for PDF output) and HTML (for the website) using a Korn shell script, so much I like the format and structure.

Otherwise I’m somewhat a fan of plaintext (with UTF-8 line drawing, etc.) but not rST or md, and a large fan of just handwriting XHTML/1.1 snippets that can be included in webpages. (This ofc doesn’t transfer well to PDF.)

#nroff #groff #tex #latex #mdoc #mdocml #mandoc #mksh

RTFM nroff(1)

another classic god fucking damn #mandoc moment