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

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 UTC