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: Liam R. E. Quin <liam@w3.org>
Date: Wed, 16 Dec 2015 17:42:00 -0500
Message-ID: <1450305720.4470.50.camel@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
On Wed, 2015-12-16 at 11:18 -0800, Tab Atkins Jr. wrote:
> On Tue, Dec 15, 2015 at 9:51 PM, Liam R. E. Quin <liam@w3.org> wrote:
> > 
> > [..]

> > See http://barefootliam.blogspot.ca/2015/12/declarative-index-
> > proposal-
> > for-printing.html for the actual proposal.
> > 
> 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.

Thanks for the feedback and for looking. I tried to clarify in the edit
I did. There are two kinds of ranges involved, and I should use a
different name for one of them.

(1) a discussion that occurs over a range of pages will typically have
index markers at the start and end of that range. If the two markers
end up on the same page (18, say), the formatter has to combine them,
and not put something pathetic and wrong out like,
    position, absolute, 18-18
instead of,
    position, absolute: 18
But if they are on different pages, 18-19 is correct, or 18-26 or
whatever.

So the markup can know there was a range but not how to format it.

(2) a sequence of individual isolated instances where something is
mentioned might end up as
    position, absolute: 12, 16, 18, 18, 18, 19, 20, 21, 36
and that must be formatted at run-time as
    position, absolute: 12, 16, 18-21, 36

You can't do this in the markup because you don't know the page
numbers.

> 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.

Yes

> 
> 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?

Agreed, that needs some work. If we can get at least rough consensus on
the approach to use then I'll make a more detailed version (and
"implement" it with fake page numbers perhaps).

Thanks for looking & commenting

Liam
Received on Wednesday, 16 December 2015 22:42:06 UTC

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