W3C home > Mailing lists > Public > www-style@w3.org > January 2014

RE: Floats, books and regions

From: Håkon Wium Lie <howcome@opera.com>
Date: Tue, 28 Jan 2014 01:23:21 +0100
Message-ID: <21222.63609.972373.905679@gargle.gargle.HOWL>
To: François REMY <francois.remy.dev@outlook.com>
Cc: "'Bjoern Hoehrmann'" <derhoermi@gmx.net>, "'Daniel Glazman'" <daniel.glazman@disruptive-innovations.com>, <www-style@w3.org>
François REMY wrote:

 > ± Users of dead tree media might not mind ToCs that allow no interaction, but
 > ± it seems clear everybody else would want links to be clickable and to be
 > ± guaranteed to lead to the correct section. 

 > What are we talking about here? My demo *has* clickable links. 

 > http://fremycompany.com/TEMP/2014-01/demo-regions-toc.html (I had

Yes, your demo has clickable links, but only because you wrote those
links into the HTML code.

If you want to automate the creation of ToCs, you will need to
automate the creation of links as well. GCPM tried to do
it at some point:


I have since concluded that this is beyond what a declarative language
like CSS should be made to do.

JavaScript, however, offers a reasonable solution to the ToC problem.
Here's an HTML document with a toc-generating script, along with a PDF


Creating an index is similar, but more difficult du to formatting
conventions. Here's an HTML file with the resultant PDF:


As you can see from the index in the back of the file, it misses
commas between page numbers and the collapsing of equal page numbers
into one link. To fix this, one needs to run a script both before and
after formatting.

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Tuesday, 28 January 2014 00:24:02 UTC

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