Re: [Page DOM] page counters across multiple documents

On 03/11/2014 14:10 , Dave Cramer wrote:
> Most book-like documents consist of multiple HTML files. Consider a tiny
> book with two HTML files, one for the first chapter and one for the
> second chapter. We'd like to display page numbers throughout the
> document, so chapter two would need to know how many pages were in
> chapter one.
>
> CSS counters can be initialized, but we'd need some method to obtain
> information about previous and subsequent files in the same book, and
> pass that to the page and pages counters. This could get expensive...

I've thought about similar problems a few times in the past, 
specifically how to handle things like ToCs and in-document 
cross-references for multi-page specs (for ReSpec).

I haven't found any kind of magic bullet... You basically have to 
process all the documents. Hopefully you can cache the result of that 
processing so it only needs to happen once.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Tuesday, 18 November 2014 10:32:21 UTC