Hi jkl, > Carsten Kunze wrote: > > There are ways to detect the formatter but a manpage must not do > > this. > > Why not? ISTM we'd have better manpages if they weren't constrained > to the rendering capability of a VT-100 terminal. For example, > equations or pictures could augment the text, or replace some of it, > when "printed".
`.if n' and `.if t' are OK since they're available everywhere. And man pages may already use eqn(1), etc., if they want. man(7) mentions the first line being `\" p' to indicate pic(1) is required, for example. It's up to those preprocessors to produce output that will have a go at a good representation given the limitations, and for the author not to strain them and to keep the alternatives on a par. $ p="`printf '%s\n' .PS down box line box right \ > 'move to last box.e' line line box .PE`" $ nroff -p <<<"$p" | uniq ┌──────┐ │ │ └───┬──┘ │ ┌───┴──┐ ┌──────┐ │ ├──────────│ │ │ │ │ │ └──────┘ └──────┘ $ nroff -p -Tascii <<<"$p" | uniq +------+ | | +---+--+ | +---+--+ +------+ | +----------| | | | | | +------+ +------+ $ -- Cheers, Ralph. https://plus.google.com/+RalphCorderoy