discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Cc: aldis@bsdroot.lv
Subject: Re: groff `Lk' badness
Date: Sun, 8 Aug 2010 21:37:00 +0200	[thread overview]
Message-ID: <20100808193700.GC28837@usta.de> (raw)
In-Reply-To: <4C5EFD04.2050407@bsd.lv>

Hi Kristaps,

> By way of a note by Aldis Berzoja, it seems that `Lk' has some
> mysterious behaviour we should clarify.

Thanks to Aldis for reporting!

> Input:
> 
> .Lk foo bar baz xyzzy
> 
> groff Output:
> 
>      bar: foo baz xyzzy
> 
> Where "bar:" is underlined and the rest is in bold.
> 
> So it looks like "bar" is the link, as underlined things make us
> think of links.

I think here is the source of the confusion.

> That would make "foo" be the link name (bold text)
> and damned if I know why "baz" and "xyzzy" are also in bold.
> This is confusing, because in fact `Lk' is documented as being link
> first, link-name second (cutting off at two arguments and continuing
> the formatting is probably a groff bug).

Right, the latter (in parantheses) is what i think, too.

> mandoc formats its output as "foo: bar baz xyzzy",

I think this is wrong, and

  "bar baz xyzzy: foo"

would be better.

> but I think this is misleading because the ":" is a reserved
> token in the URI spec.

Yes.

And think of it the following way:

  Here are some web sites of BSD operating systems:
  .br
  .Lk http://www.dragonflybsd.org/ "DragonFly BSD"
  .br
  .Lk http://www.freebsd.org/ FreeBSD
  .br
  .Lk http://www.netbsd.org/ NetBSD
  .br
  .Lk http://www.openbsd.org/ OpenBSD

Rendering that as

  Here are some web sites of BSD operating systems:
  DragonFly BSD:
        http://www.dragonflybsd.org/
  FreeBSD: http://www.freebsd.org/
  NetBSD: http://www.netbsd.org/
  OpenBSD: http://www.openbsd.org/

seems quite natural, doesn't it?
I wouldn't expect the URI to precede its description.

> Can we come to an agreement as to how this should be formatted?  I
> don't want to be bug-compatible with groff in this case.  I like the
> "link: link-name" output, but due to the colon being a URI reserved
> token, "link-name: link" makes more sense,

Definitely.

> with link-name being bold and link being underlined.

Well, normally, you click on the link *name*, so underlining that
makes sense.  Besides, diverging from what groff does seems
gratuitous in this particular respect.

> Thoughts?

The real mess is here:

  schwarze@rhea $ /usr/local/bin/groff --version | head -n1
  GNU groff version 1.20.1
  schwarze@rhea $ /usr/local/bin/groff -mdoc -Thtml link.in
  [...]
  NetBSD:</i> <b>http://www.netbsd.org/</b> <i><br>
  OpenBSD:</i> <b>http://www.openbsd.org/</b></p>

Groff doesn't even attempt to produce real hyperlinks
in -Thtml mode.  Is this true?

I think we should have something similar to:

  <a href="http://www.netbsd.org/">NetBSD</a>:
  <b>http://www.netbsd.org/</b>

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

  reply	other threads:[~2010-08-08 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-08 18:52 Kristaps Dzonsons
2010-08-08 19:37 ` Ingo Schwarze [this message]
2010-08-09  0:22   ` Kristaps Dzonsons
2010-08-09 19:24     ` 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=20100808193700.GC28837@usta.de \
    --to=schwarze@usta.de \
    --cc=aldis@bsdroot.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).