groff
[Top][All Lists]
Advanced

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

Re: [Groff] ASCII Minus Sign in man Pages.


From: Clarke Echols
Subject: Re: [Groff] ASCII Minus Sign in man Pages.
Date: Thu, 20 Apr 2017 18:04:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

When I was responsible for all of the manpages in HP's HP-UX (Unix) reference manual and online, I always *typeset* with Courier bold, and used the simple hyphen character
because it was all monospace.

Courier was standard for all literals in SYNTAX, including command name, and options such as -r, -f, etc. Only variable arguments such as "filename", directory name, etc. were always in italic. This convention was also used in the DESCRIPTION, EXAMPLES,
and other such sections.

If a minus sign appeared in regular text, I always used \(mi. The top-of-page heading (such as cp(1) for the copy-file page, was always in bold Roman (I used New Century
Schoolbook bold).

I used the .C name for macros, as in .CI, .IC, for command lines in the SYNOPSIS. I rewrote/edited the AT&T Unix macros to accommodate that for names of commands, functions, punctuation in C-language functions, etc. I NEVER used bold Roman font for literals in
such instances.

Clarke

On 04/20/2017 04:37 PM, Ralph Corderoy wrote:
Hi,

If a command is called /bin/foo-bar and it processes a file format
foo-xyzzy, then should their man pages use

     foo\-bar
     .IR foo\-bar (1)
     .IR foo\-xyzzy (5)

...and so on?  That's what I thought, `foo-bar' being a hyphen.

Various things around the place collude so both `\-', or the wrong,
hyphen, `-', produce U+002D, e.g.
/usr/share/groff/1.22.3/tmac/an-old.tmac has

     .\" For UTF-8, map some characters conservatively for the sake
     .\" of easy cut and paste.
     .
     .if '\*[.T]'utf8' \{\
     .  rchar \- - ' `
     .
     .  char \- \N'45'
     .  char  - \N'45'
     .  char  ' \N'39'
     .  char  ` \N'96'
     .\}

But for a man page that's cross platform, non-groff, e.g. AIX, and to be
seen in a variety of formats, all groff's `-T's at least, how does one
ensure that U+002D will result so it can be cut and pasted back to the
shell?  Investigation is hamped by some viewers, e.g. PDF, seeming to
translate non-U+002D back to U+002D as a "favour".  :-)  Fine, but one
can't assume the user's PDF viewer will do this.

\N'45' is portable since it's CSTR 54, but it's Nth character of the
current font.  Does that mean I should use this wherever I want to
ensure U+002D appears in the output for pasting?


--
Clarke Echols
Copywriter and Marketing Communications Specialist
Loveland, CO
(970) 667-6736

www.ClarkeEchols.com

Global climate change is real.  It's caused
by the SUN.

Carbon dioxide CANNOT affect climate in the slightest.
Want proof?

Go to https://www.youtube.com/embed/BC1l4geSTP8
for the facts.

"Five percent of the people actually think.
Ten percent think they think.
And the other eighty-five percent
would rather die than think."
   -- Thomas Edison --

"How fortunate for governments
that the people do not think."
   -- Adolf Hitler --

"During the course of administration,
and in order to disturb it, the artillery
of the press has been leveled against us,
charged with whatsoever its licentiousness
could devise or dare.  These abuses of an
institution so important to freedom and
science are deeply to be regretted,
inasmuch as they tend to lessen its
usefulness and to sap its safety."
   -- Thomas Jefferson (1805) --



reply via email to

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