discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Dag-Erling Smørgrav" <des@des.no>
To: discuss@mdocml.bsd.lv
Subject: Dashes and strange markup
Date: Mon, 06 Mar 2017 12:17:30 +0100	[thread overview]
Message-ID: <86wpc2ac39.fsf@desk.des.no> (raw)

I came across a FreeBSD man page that left me scratching my head, and I
was hoping you could explain what is going on and how to fix it.  Let me
show you the output first:

     The file that goes by the name of beastie.4th is a set of commands
     designed to draw the ASCII art FreeBSD mascot — known simply as beastie —
     to the right of the boot loader menu.  The commands of beastie.4th by

Nicely formatted with Unicode em-dashes, both in FreeBSD 10 (which uses
groff) and FreeBSD 11 (which uses mandoc).  But whatis tells a different
story:

| % uname -r
| 10.3-RELEASE-p11
| % PAGER=cat whatis beastie
| beastie.4th(8)           - FreeBSD ASCII art boot module

fine, but:

| des@hive ~% uname -r                                                         
| 11.0-RELEASE-p2
| des@hive ~% PAGER=cat whatis beastie
| beastie.4th(8) - FreeBSD ASCII art boot module known simply as beastie to the right of the boot loader menu. [...]

I cut it short, but it prints out the entire DESCRIPTION section instead
of just the document description.

Here's an excerpt from the source:

| .Sh NAME
| .Nm beastie.4th
| .Nd FreeBSD ASCII art boot module
| .Sh DESCRIPTION
| The file that goes by the name of
| .Nm
| is a set of commands designed to draw the ASCII art FreeBSD mascot
| .Nd known simply as
| .Ic beastie
| .Nd to the right of the boot loader menu.

So apparently Nd was (ab)used for an en- or em-dash, and I can sort of
understand it because it is documented to "print a dash followed by its
arguments", and mandoc's makewhatis is less forgiving than groff.

The next issue is that I tried to replace .Nd with either \(en and \(em,
but the former is rendered as a single hyphen and the latter as two
hyphens, instead of actual en- or em-dashes.  Is that intentional?

(I also replaced .Ic with .Em, but that's completely orthogonal)

The third issue is that according to conventional English typography[*],
the correct usage is an em-dash with no surrounding spaces, and I can't
figure out how to suppress the spaces, short of gluing everything
together (like\(em\&this).  Then again, I'm not sure how this will
affect line wrapping, so perhaps I should follow Oxford's example and
switch from an em-dash without spaces to an en-dash with spaces...  but
I'd still like to know if there's a better way to suppress the spaces.

[*] see for instance the Chicago Manual of Style and older editions of
the Oxford Style Manual.

DES
-- 
Dag-Erling Smørgrav - des@des.no
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2017-03-06 11:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 11:17 Dag-Erling Smørgrav [this message]
2017-03-06 14:55 ` Anthony J. Bentley
2017-03-06 16:52   ` Dag-Erling Smørgrav
2017-03-06 15:57 ` Ingo Schwarze
2017-03-06 16:39   ` Dag-Erling Smørgrav
2017-03-06 17:34     ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wpc2ac39.fsf@desk.des.no \
    --to=des@des.no \
    --cc=discuss@mdocml.bsd.lv \
    --subject='Re: Dashes and strange markup' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).