> And it would be really nice if I could read man pages in the terminal in a proportional font, but preserving alignment etc.
Most man utilities can write postscript instead of directly to terminal. You can use that to achieve exactly what you want. Though this is not exactly in the terminal itself.
Is there a way to avoid Times New Roman? Some of the characters are pretty ambiguous. I remember, back when I used that command, I mixed up an l and a 1 for one of the flags.
To be pedantic, the font you're seeing isn't Times New Roman, but rather Times. They're similar, but there are subtle differences.
Yes, you can choose a default font. You need to change your /etc/man.conf, find the line that starts with TROFF, and add new options. For example, to use Palatino as the default font, you should additionally provide the option `-f P`. Then you'll get this output: https://dl.dropboxusercontent.com/u/845567/bash%281%29%20Pal...
This breaks for spacing between non-whitespace character. E.g. the list of flags, which may have varying lengths, but all descriptions start on the same alignment.
This is a man page with a list of flags below
--flag1 Description of flag1
--secondflag Description of secondflag
If we naively replaced the above with 4spaces=1tab we'd get the whitespace between flag1 and its description replaced with two tabs, and we'd get the whitespace between secondflag and its description left as a string of three space characters.
I have no idea what is actually used in man pages for alignment and spacing, but the example above is only to illustrate that 4space=1tab breaks even on trivial examples as a conversion rule.
That does not matter for single dash and letter options. For double dash long options I like to split them on different lines so that you still have a lot of horizontal space for the descriptions themselves even with very ling option names, so a brute force way:
This is a man page with a list of
.I flags
below
.P
.BR --flag :
.RS
Description of flag1
.RE
.P
.BR --secondflag :
.RS
Description of secondflag
.RE
.P
This means that they can be converted to PostScript or PDF. There’s no portable way to do this with the “man” command, but on most Linuxes you can use “man -t” and on a system using Mandoc you can use “man -T pdf”.
Likewise, for HTML, “man -H” is not strictly portable, but only works on certain versions of Linux; a Mandoc system would let you use “man -T html”. (The only strictly portable, as in “POSIX specified,” flag for man is -k.)
Honestly it might be better to just get used to using an existing webpage for your distribution. For example, OpenBSD’s web manpage database (based on Mandoc) is very nice: http://man.openbsd.org/ls.1
Konqueror is still included in current versions of KDE Applications (effectively 5.x, but the term "KDE 5" isn't really used).
Also, it's not so much a Konqueror thing as it is a feature of KDE's URL-handling subsystem. Any KDE application that interacts with URLs can retrieve HTML-formatted man pages. If you don't like Konqueror, you can always use Rekonq. Or you can open the source code in KWrite or Kate. Or you can browse man indices in Dolphin as if they were directories (though the actual pages will open in Konqueror).
KIO slaves are wonderful, wonderful things. It's the same technology that lets you use fish:// to access files and directories over SSH in every KDE program that deals with URLs (and since the file open/save dialogs are URL-based, this means it'll work with anything that uses those dialogs).
Thanks, yeah I used to use fish:/ and fonts:/ and a couple of other kio slaves, just not man, low discoverability I guess. I thought kio slaves had died with KDE5 [that's still the right name IMO despite the framework:applications split].
That assumes that the terminal has full-color support.
It would be even better to use a sane default supported by all terminals (the ugly 16-color one), and enable full-color only on terminals known to support it.
There is probably an exact-but-complicated way to do this. All I do to determine 256-color support is to check for a -256color suffix in the TERM variable.
The terminfo database records how many colours a terminal supports: if the shell command `tput colors` prints 256, then your terminal is configured to support 256 colours.
Unfortunately, there's no standard database field to record the presence of truecolor support; even if there were, there's terminals (like xterm, for example) that understand the control-sequences but map them to the nearest colour in the 256-colour palette rather than using them as-is.
(See also, a script to display an image in the terminal: https://git.gnome.org/browse/vte/tree/perf/img.sh?h=vte-0-36 )