discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Cc: Jason McIntyre <jmc@kerhand.co.uk>
Subject: Giant .Bk magically doing the right thing?!
Date: Sun, 27 Jun 2010 21:11:43 +0200	[thread overview]
Message-ID: <20100627191143.GM19398@iris.usta.de> (raw)

Hi,

Jason just pointed me to a couple of instances of very strange .Bk
usage that seem to magically do what you want - but i have no idea
why, or how to implement this in mandoc.  For example, from ifconfig(8):

.Sh TUNNEL
.Nm ifconfig
.Bk -words
.Ar tunnel-interface
.Op Cm deletetunnel Ar src_address dest_address
.Op Cm tunnel Ar src_address dest_address
.Op Cm tunneldomain Ar route-id
.Ek

This gives, with both old and new groff:

TUNNEL
     ifconfig tunnel-interface [deletetunnel src_address dest_address]
     [tunnel src_address dest_address] [tunneldomain route-id]

Without the .Bk, of course, groff gives:

TUNNEL
     ifconfig tunnel-interface [deletetunnel src_address dest_address] [tunnel
     src_address dest_address] [tunneldomain route-id]

Now, as far as i have understood and as i have documented in mdoc(7),
i think .Bk is supposed to keep the words in its block together.
How is groff telling the difference between the two spaces in the
string "dest_address] [tunnel src_address"?

If the markup were

.Sh TUNNEL
.Nm ifconfig
.Bk -words
.Ar tunnel-interface
.Op Cm deletetunnel Ar src_address dest_address
.Ek
.Bk -words
.Op Cm tunnel Ar src_address dest_address
.Ek
.Bk -words
.Op Cm tunneldomain Ar route-id
.Ek

i would understand.  But as it is, it looks like magic...

Any clues?

Yours,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2010-06-27 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-27 19:11 Ingo Schwarze [this message]
2010-06-27 19:37 ` Kristaps Dzonsons
2010-06-27 19:40   ` Joerg Sonnenberger

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=20100627191143.GM19398@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    --cc=jmc@kerhand.co.uk \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).