tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: Bk -words badness
Date: Tue, 6 Jul 2010 00:27:48 +0200	[thread overview]
Message-ID: <20100705222748.GB5497@iris.usta.de> (raw)
In-Reply-To: <4C31A369.6010005@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Mon, Jul 05, 2010 at 11:18:33AM +0200:

> Ingo, how goes the `Bk' work?

Not.

I was slacking in Bob's garden, then on the plane, then sleeping,
then at work.  Now i'm catching up on my mail.  :-)

> 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
[...]

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

Right, that is one of the most annoying problems we still have.

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

Sounds good.

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

Yes, if i understand correctly, that is what groff does.
It also ought to allow almost any desired formatting,
and it is somewhat intuitive:  People are likely to put
on one input line whatever belongs closely together,
even when they don't remember the rule.

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

Yes, you are right, the documentation is also very simple to write
and very simple to understand.

> Thoughts?

[x] Try that!

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

      parent reply	other threads:[~2010-07-05 22:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05  9:18 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 message]

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=20100705222748.GB5497@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@mdocml.bsd.lv \
    /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).