tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Bk -words badness
@ 2010-07-05  9:18 Kristaps Dzonsons
  2010-07-05 10:35 ` Kristaps Dzonsons
  2010-07-05 22:27 ` Ingo Schwarze
  0 siblings, 2 replies; 7+ messages in thread
From: Kristaps Dzonsons @ 2010-07-05  9:18 UTC (permalink / raw)
  To: tech

Ingo, how goes the `Bk' work?  Scanning through mandoc's rendering of 
current manuals, I see a lot of the following sort of breakage:

.Bk -words
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
.Op Fl a Ar b
...

Which will, for obvious reasons, continue eternally past rmargin.

I have an intuition for how to implement an implied `Bk' for all 
SYNPRETTY blocks: to hook into print_mdoc_node() and set/unset the 
PREKEEP flag depending on the line number as reported in mdoc_node.

Would this sort of behaviour satisfy you?  The effect would be:

<PREKEEP>.Op Fl a Ar b<UNKEEP>
<PREKEEP>.Op Fl a Ar b<UNKEEP>

...etc.

The `Bk' handler would then be responsible for simply setting the flag 
that would be OR'd in print_mdoc_node() for keeps (SYNPRETTY|KEEPPRETTY 
or whatever).

This way, we can simply say that SYNOPSIS implies a `Bk -words' for the 
entire section (i.e., SYNPRETTY) and that `Bk -words' means that 
contained macro lines aren't space-broken between words.

Thoughts?

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2010-07-06 22:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-05  9:18 Bk -words badness Kristaps Dzonsons
2010-07-05 10:35 ` Kristaps Dzonsons
2010-07-05 11:03   ` Kristaps Dzonsons
2010-07-05 22:09   ` Ingo Schwarze
2010-07-06  9:40     ` Kristaps Dzonsons
2010-07-06 22:30       ` Ingo Schwarze
2010-07-05 22:27 ` 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).