Re: formatting a back-of-the-book index with CSS (no JavaScript)

On Sat, 23 Aug 2014 23:40:49 +0200
"Jan Tosovsky" <j.tosovsky@email.cz> wrote:

> On 2014-08-23 Liam R E Quin wrote:

> > You need the formatter to collapse ranges 
[...]
> I hope this collapsing will be optional.
Yes.
 
> I distinguish (but who else cares?):
> primary 9-10  (the term is discussed thoroughly within this range)
> primary 9, 10 (there are individual occurrences on every particular page)
Yes, there's a property to let you intermix these treatments.

> I also expect those directly specified ranges ending up as 10-10 merged just
> into 10.
I think I forgot to mention that explicitly, although it's in XSL-FO.

> 
> > I wrote a short blog entry on this:
> > http://barefootliam.blogspot.ca/2014/08/back-of-book-indexes-and-
> > css.html
> 
> A nice overview. 
> 
> I'd like to add a note to column balancing. When it is employed, there is
> another constraint to cope with to meet all typographic rules:
> (1) Page register (the last line should be placed at the same position on
> every page) 
> (2) Orphan/Widow (no single line should be located at the end/top of the
> page)
> (3) Balanced columns

Yes, I agree - but these are not special to formatting of an index, so I didn't get into it here.

> When e.g. the first column ends with the letter followed with the first
> entry (primary):
> - should this block be overflown to the next column? Should the next column
> be balanced? If so, this page won't meet the page register.
Copy-fitting is another problem, and again I agree it's important and particularly obvious in an index. I'm trying to focus on only one aspect because I think it's easier to persuade people to make a small change, and because the small change is the only part specific to an index; more work on keep-together, keep-with-next, column balancing and "try to make this content fit this space" (copy fitting) will have to follow and I hope you'll help us make it work :-)

[...]

> I am not so optimistic about the automatic sorting. E.g. Czech rules define
> different sort order for the first and the second letter.

Neither am I - but my proposal is only for formatting. Sorting the index could be done with XSLT, or with people who prefer a procedural approach, python or JavaScript, and yes, using surrogate keys (sort-as) where needed.

Probably I should add a complete worked example to my blog, so people can get a clearer idea of what I'm trying to propose, so that they can shoot it down more easily :-)  Thanks for your comments.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/

Received on Saturday, 23 August 2014 23:21:54 UTC