- From: thomas <thomas.bsd@gmail.com>
- Date: Sun, 22 Mar 2009 21:24:25 +0100
- To: WWW Style <www-style@w3.org>
2009/3/22 David Woolley <forums@david-woolley.me.uk>: > thomas wrote: >> >> The draft makes it possible to have references like "page 72". The >> LATEX varioref package works similarly but it offers more advanced >> references like: "on the preceding page", "on this page", "on the >> following page", "on the facing page", "on pages 72-75" (if the > > How would you handle internationalisation? Well, I would handle it the tedious but efficient way, i.e. listing all possible cases. An english book (double sided printing): :lang(en) { ::vref-current-page { content: "on this page" } ::vref-previous-and-odd-page { content: "on the preceding page" } ::vref-previous-and-even-page { content: "on the facing page" } ::vref-next-and-odd-page { content: "on the facing page" } ::vref-next-and-even-page { content: "on the following page" } ::vref-range-onepage { content: "on page " target-counter(firstref, page, decimal) } ::vref-range-multipage { content: "on pages " target-counter(firstref, page, decimal) "\2013" target-counter(secondref, page, decimal) } } See the speech <a href="#begin" style="vref: #begin #end">here</a> and the figure <a href="#fig" style="vref: #fig">there</a>. Possible rendering: See the speech on pages 12–15 and the figure on the facing page. A french and german paper (single sided printing): :lang(fr) { ::vref-current-page { content: "sur cette page" } ::vref-previous-and-odd-page { content: "sur la page précédente" } ::vref-previous-and-even-page { content: "sur la page précédente" } ::vref-next-and-odd-page { content: "sur la page suivante" } ::vref-next-and-even-page { content: "sur la page suivante" } ::vref-range-onepage { content: "p.\00A0" target-counter(firstref, page, decimal) } ::vref-range-multipage { content: "p.\00A0" target-counter(firstref, page, decimal) "-" target-counter(secondref, page, decimal) } } :lang(de) { ::vref-current-page { content: "auf dieser Seite" } ::vref-previous-and-odd-page { content: "auf der vorherigen Seite" } ::vref-previous-and-even-page { content: "auf der vorherigen Seite" } ::vref-next-and-odd-page { content: "auf der nächsten Seite" } ::vref-next-and-even-page { content: "auf der nächsten Seite" } ::vref-range-onepage { content: "S.\00A0" target-counter(firstref, page, decimal) } ::vref-range-multipage { content: "S.\00A0" target-counter(firstref, page, decimal) "-" target-counter(secondref, page, decimal) } } Note that I couldn't use the syntax "target-counter(attr(href, url), page, decimal)" since we need two hrefs (one for the beginning of the target, one for its end). The syntax "target-counter([firstref|secondref]...)" is certainly wrong but it's here for clarity. I let more skilled people inventing a correct syntax if they think this feature is worth being included in CSS3. IMO it's a very nice one for people using HTML/CSS to typeset documents. Thomas
Received on Sunday, 22 March 2009 20:25:06 UTC