discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: Re: -column issue
Date: Fri, 06 Aug 2010 19:08:11 +0200	[thread overview]
Message-ID: <4C5C417B.4050209@bsd.lv> (raw)
In-Reply-To: <20100806070614.GD2107@bramka.kerhand.co.uk>

> hi. there's a formatting issue for -column lists. the best example i can
> find is in openbsd's sysctl.3 (it's riddled with these):
> 
> 	.Bl -column "Second level nameXXXXXX" integerXXX -offset indent
> 	.It Sy Second level name	Type	Changeable
> 	.It Dv FS_POSIX_SETUID No "	integer	yes"
> 	.El

UGH.  This is gross.  Why why why didn't they do:

     46  .Bl -column "Second level nameXXXXXX" integerXXX -offset indent
     47  .It Sy Second level name        Type    Changeable
     48  .It Dv FS_POSIX_SETUID No       integer yes

(With tabs between columns.)  It renders just fine in both mandoc and 
new/old groff.

I think this "bug" should be set aside.  It goes like this.  The quoted 
part for FS_POSIX_SETUID is in its own column, as is what follows.  So 
the `No' nixes the space before the entire column, which in turn makes 
it be off by one.  This is intuitive (to me, at least) because what 
follows `No' shouldn't have a leading space.  Throwing in a corner-case 
for columns seems wrong.  However, see below for my musings.

> additionally, only "Second level name" is rendered in Sy font. "Type"
> and "Changeable" are unaffected.
> 
> these -column lists are icky!

Right, this has been fairly extensively discussed.

In groff, tabbed lists are a little magical in that they allow macros to 
extend across the whole line (ONLY if they're specified in the first 
column).  mandoc, on the other hand, treats each column like a fresh new 
context.

I'm still on the fence whether this should be "fixed".

An option is to depend on Ingo's tab-code and simply throw out special 
tab-handling for lists altogether.  I'll look into this in the coming 
weeks.  If it simplifies the code, I'll probably do it.
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2010-08-06 17:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06  7:06 Jason McIntyre
2010-08-06 17:08 ` Kristaps Dzonsons [this message]
2010-08-06 17:52   ` Jason McIntyre
2010-08-06 18:13     ` Kristaps Dzonsons
2010-08-06 18:23       ` Jason McIntyre
2010-08-06 18:35         ` Kristaps Dzonsons
2010-08-07 16:15         ` Ingo Schwarze
2010-08-07 15:59     ` Ingo Schwarze
2010-08-07 17:32       ` Kristaps Dzonsons
2010-08-07 18:03         ` Ingo Schwarze

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=4C5C417B.4050209@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=discuss@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).