W3C home > Mailing lists > Public > www-style@w3.org > December 2015

Re: [gcpm] coalescing sequences of numbers for cross-references, back-of-the-book index etc

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 16 Dec 2015 11:18:33 -0800
Message-ID: <CAAWBYDCXPLVBHtDtWkS28sOOfjbpYV9Mjdy-_YWPk8Y=gaunNw@mail.gmail.com>
To: "Liam R. E. Quin" <liam@w3.org>
Cc: www-style list <www-style@w3.org>
On Tue, Dec 15, 2015 at 9:51 PM, Liam R. E. Quin <liam@w3.org> wrote:
> This proposal is to fill in a missing piece in making
> pagimaged/foliated media (i.e. with page numbers) using CSS.
>
> Right now you can't really generate a back-of-the-book index properly
> in an interoperable way. So we need to fix it. This is a declarative
> approach, identifying to the formatter/browser/user agent which items
> in a list are to be collapsed if they are the same number or
> consecutive numbers, so that
>    index items: 3, 15, 16, 17, 17, 17, 26
> is rendered instead as
>    index items: 3, 15-17, 26
>
> You can't do this today in pure CSS because you don't know the page
> numbers in advance.
>
> See http://barefootliam.blogspot.ca/2015/12/declarative-index-proposal-
> for-printing.html for the actual proposal.
>
> I'm sure the details aren't all right, but I have some confidence in
> the approach - or at any rate it worked for XSL-FO and is in use.

Your examples confuse me - it looks like you have all the information
necessary to represent a range and collapse duplicates already,
encoded in the markup.  If you can't generate a range, that's just a
limitation of your generator tool that should be fixed, not something
that CSS needs to deal with.

This range stuff is usually (I thought) an addition to "index
counters", where you mark up some reference, and use CSS generated
content magic to duplicate it over in an index with a marker supplying
the source page.  That's why you end up with multiple instances of the
same page, expanded ranges, etc.  In that case, adding some CSS to
help collapse the display of markers makes sense to me.

The collapse behavior specified is pretty ambiguous about its effect
on markup-related things, too - in your example, when you collapse the
latter four elements into "402-404", which of the four <a>
destinations is used?

~TJ
Received on Wednesday, 16 December 2015 19:19:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC