groff
[Top][All Lists]
Advanced

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

Re: [groff] groff_man question


From: Ingo Schwarze
Subject: Re: [groff] groff_man question
Date: Sat, 6 Jul 2019 19:24:15 +0200
User-agent: Mutt/1.8.0 (2017-02-23)

Hi Walter,

walter harms wrote on Thu, Jul 04, 2019 at 07:20:54PM +0200:

> the groff_man page is listing some useful macros i did not notice sofar.
> .EE/.EX

When you wonder about portability, you can always check

  https://man.openbsd.org/man.7

Here is what it says about .EX and .EE:

  https://man.openbsd.org/man.7#EE

  EE  This is a non-standard GNU extension.  In mandoc(1), it does the
      same as the roff(7) fi request (switch to fill mode).

  EX  This is a non-standard GNU extension.  In mandoc(1), it does the
      same as the roff(7) nf request (switch to no-fill mode).

> and \*(lq,\*(rq

Those are not macros but predefined strings.

In general, using predefined strings is a bad idea.
There is never a need and portability is dubious.

  https://man.openbsd.org/mandoc_char.7#PREDEFINED_STRINGS

Use \(lq instead of \*(lq and \(rq instead of \*(rq.

> Are these save to use or are they a groff special ?

Using them is not safe.  They are GNU extensions and make your
manual pages non-portable.

By the way, overriding their definition in your own manual page is
even worse style than using them without doing so because for best
portability and style, manual pages ought to refrain from using
low-level roff.

If you do not care about portability, you can use them.  If you do
care, don't override their definitions, just write your manual page
cleanly without using GNU extensions.

Yours,
  Ingo



reply via email to

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