W3C home > Mailing lists > Public > www-style@w3.org > August 2008

Re: [css3-gcpm] Spacing and alignment of leaders

From: marbux <marbux@gmail.com>
Date: Fri, 8 Aug 2008 16:45:56 -0700
Message-ID: <2c60d980808081645l5b72b56fia2bf07f24c2f3bec@mail.gmail.com>
To: www-style@w3c.org

Forwarding because I accidentally mailed this to Tab rather than to the list.

> On Fri, Aug 8, 2008 at 7:28 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>
>> On Thu, Aug 7, 2008 at 11:12 PM, marbux <marbux@gmail.com> wrote:
>>>
>>> Text .[em].[em].[em][en]5
>>> Text .[em].[em].[em]89
>>> Text .[em].[em].[en]101
>>>
>> Wouldn't the horizontal spacing be rather simply solved by using
>> leader('.[em]')?  You can provide a generic string to the function.  You'd
>> have to escape the em space, obviously.
>
>> Of course, the leader alignment is a slightly different issue that is not
>> solved by this.
>
> Right. There's a need to programmatically address the spacing between
> the last leader and the page/chapter number to account for differences
> in the number string lengths.
>
> E.g., first pass through a table of contents to determine the longest
> page number indexed, add an en space to it and total the number of ems
> and ens to obtain the horizontal space to be occupied by the
> combination of numbers and gutter em/en spaces, then adjust page
> numbers with extra en or em spaces accordingly in the gutter between
> the numbers and the last leader, as in the example above. That way,
> all of the leaders are aligned horizontally. .
>
> The alternative way would be to set a right-aligned tab for  each
> potential leader position and the page numbers. This method has the
> advantage of maintaining horizontal leader alignment even when it
> isn't relative length characters like numbers on the right, e.g., in a
> figure displaying character and actor names for a theatric
> performance:
>
>     Hamlet  . . . . . . . . . . . . . . .  Anthony Aardvark
>
> Because of the greater flexibility, I favor the tabbed leader approach.
>
> Best regards,
>
> Paul E. Merrell, J.D. (Marbux)
>
> --
> Universal Interoperability Council
> <http:www.universal-interop-council.org>
Received on Friday, 8 August 2008 23:46:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:11 GMT