From: Alejandro Colomar <alx@kernel.org>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>,
tech@mandoc.bsd.lv, Ingo Schwarze <schwarze@usta.de>,
Alejandro Colomar <alx.manpages@gmail.com>
Subject: Re: mandoc mishandles tzfile(5)'s .IP \(bu "\w'\(bu 'u"
Date: Mon, 23 Oct 2023 12:33:43 +0200 [thread overview]
Message-ID: <ZTZMDQP3kGk89FY3@debian> (raw)
In-Reply-To: <20231023083059.h43j6g2cse3e55en@illithid>
[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]
Hi Branden,
On Mon, Oct 23, 2023 at 03:30:59AM -0500, G. Branden Robinson wrote:
> Hi Paul,
>
> At 2023-10-22T17:41:28-0700, Paul Eggert wrote:
> > On 2023-10-22 14:06, Ingo Schwarze wrote:
> > > mandoc only supports ASCII strings as arguments to \w, not escape
> > > sequences or formatting instructions.
> >
> > For the TZDB man pages mandoc need not support all that, just \(bu.
> >
> > Just to make sure we're on the same page, I reproduced the problem by
> > running the command "mandoc -man -Tascii t.5", where t.5 contains the
> > following lines:
> >
> > .TH tzfile 5
> > .SH NAME
> > .IP \(bu "\w'\(bu 'u"
> > xxx
> > .PP
> > yyy
>
> At the risk of being simplistic, why not just give `IP` an explicit
> measurement as an argument?
>
> .IP \(bu 2n
He feels that IP \(bu 3n is too long of a space in PDF. "\w'\(bu 'u"
has the benefit of being 3n in terminals, but shorter in PDF.
This was triggered after my suggestion of using 3[n] instead of 2[n] to
clearly separate the bullet from the bulleted text, as docuemented in
man-pages(7).
Cheers,
Alex
>
> (Or 3n, or 4n, or whatever looks best to you.)
>
> > The output should contain two spaces between the bullet's "o" and the
> > "x", but with current mandoc it contains five spaces.
>
> If you're viewing on a terminal, `.IP \(bu 3n` should achieve this.[1]
>
> (Typesetters are a different story because how wide a bullet is depends
> on the output device and the font.)
>
> I'm not saying that better mandoc(1) support for `\w` would be an awful
> thing to have, but it doesn't seem necessary, to me, to solve this
> specific problem.
>
> Regards,
> Branden
>
> [1] Strictly, you can leave the "n" off, but I consider that slightly
> sloppy, and I think that the explicit scaling unit is also helpful
> as a reminder to the man page author that `IP`'s second argument,
> unlike most arguments to man(7) macros, will _not_ be formatted as
> text.
I might take that.
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-10-23 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <884cb5d0-27ce-a5ca-b449-972021e62e92@gmail.com>
[not found] ` <7c3294cf-e3d0-c716-d1c0-5b6c5c757d7e@cs.ucla.edu>
[not found] ` <7eb92df5-6c87-8384-c4a8-2a00eabf1c8e@gmail.com>
[not found] ` <66ef5b92-6e19-8bea-2840-6c2f0240d225@cs.ucla.edu>
[not found] ` <ZTWO6/0aqdxtS6Vg@asta-kit.de>
2023-10-23 0:41 ` Paul Eggert
[not found] ` <20231023083059.h43j6g2cse3e55en@illithid>
2023-10-23 10:33 ` Alejandro Colomar [this message]
2023-10-23 21:23 ` Ingo Schwarze
2023-10-24 19:36 ` Paul Eggert
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=ZTZMDQP3kGk89FY3@debian \
--to=alx@kernel.org \
--cc=alx.manpages@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=g.branden.robinson@gmail.com \
--cc=schwarze@usta.de \
--cc=tech@mandoc.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).