discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Giant .Bk magically doing the right thing?!
@ 2010-06-27 19:11 Ingo Schwarze
  2010-06-27 19:37 ` Kristaps Dzonsons
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Schwarze @ 2010-06-27 19:11 UTC (permalink / raw)
  To: discuss; +Cc: Jason McIntyre

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

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

end of thread, other threads:[~2010-06-27 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-27 19:11 Giant .Bk magically doing the right thing?! Ingo Schwarze
2010-06-27 19:37 ` Kristaps Dzonsons
2010-06-27 19:40   ` Joerg Sonnenberger

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