[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Critique this bold-italic private macro for man pages

From: G. Branden Robinson
Subject: Re: [Groff] Critique this bold-italic private macro for man pages
Date: Wed, 3 May 2017 20:52:42 -0400
User-agent: NeoMutt/20170113 (1.7.2)

At 2017-05-04T01:04:48+0200, Ingo Schwarze wrote:
> Hi Branden,
> > .ie c \(lq .ds `` \(lq
> > .el        .ds `` ``
> > .ie c \(rq .ds '' \(rq
> > .el        .ds '' ''
> > 
> > What do you think?
> If doesn't work:
>  $ uname -a
> SunOS unstable11s 5.11 11.2 sun4u sparc SUNW,SPARC-Enterprise
>  $ cat tmp.roff
> .ie c \(lq .ds `` \(lq
> .el        .ds `` ``
> .ie c \(rq .ds '' \(rq
> .el        .ds '' ''
> >>>\*(``hello world!\*(''<<<
>  $ nroff tmp.roff
> >>>hello world!<<<
>  $ troff tmp.roff | /usr/lib/lp/postscript/dpost | sed -n '/>>>/,/<<</p'
> (>>>)720 120 w
> 10 R f
> (hello world!)1 499 1 888 120 t
> 10 S1 f
> (<<<)1387 120 w
>  $ nroff
> >>> 
> .ie c \(mi defined
> .el undefined
> <<<
> ^D
> >>> <<<
>  $ echo '>>>\(lqhello world!\(rq<<<' | nroff
> >>>hello world!<<<
> There are real-world systems (sold today) where neither \(lq
> nor the 'c' conditional is supported.  And yes, that kind
> of nroff may be used for manual page display by default:
>  $ strings `which man` | grep roff
> /usr/lib/sgml/sgml2roff
> troff
> lp -c -T troff
> nroff -u0 -Tlp

N.B. my comments here are situated in a context _outside_ of the GNU
Troff project.

Why do my man pages need to be more portable the shell scripts or C code
I ship with them?

What is the value in reading the _formatted_ version of a man page for a
tool that won't compile or run correctly on the host?

I refuse to write shell scripts for general-purpose consumption only in
the historical Bourne dialect that Solaris /bin/sh was, and I refuse to
write man pages for general-purpose consumption only in some minimal
common subset that _no one_ has troubled themselves to carefully define.

As I've said before, I fear the talk of "safe subsets" and portability
in groff_man(7) and man(7) are years out of date and in places
anticipated a golden age of direct man-to-HTML rendering that never came
to pass for several reasons.

I want the "man language" to be small, as I also said before, but not
cripplingly so, and I want it to be informed by design, not accidental
overlaps in Venn diagrams of traits supported by unmaintained

For example, even if that old Solaris system can render the output of
docbook-to-man legibly, that wouldn't mean that docbook-to-man's output
is well-considered or a model to emulate in any particulars.

Finally, Groff's own portability is sufficiently broad that we should be
able to say, "as a rule, if you want man pages written in the past 25
years to render nicely on Boozix 11.0, Gizmoware's custom hybrid of
4.3BSD and SVr3, please build and install Groff so that its macro
packages can achieve this for you."


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]