discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Dashes and strange markup
@ 2017-03-06 11:17 Dag-Erling Smørgrav
  2017-03-06 14:55 ` Anthony J. Bentley
  2017-03-06 15:57 ` Ingo Schwarze
  0 siblings, 2 replies; 6+ messages in thread
From: Dag-Erling Smørgrav @ 2017-03-06 11:17 UTC (permalink / raw)
  To: discuss

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-06 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-06 11:17 Dashes and strange markup Dag-Erling Smørgrav
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

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).