W3C home > Mailing lists > Public > www-style@w3.org > August 2008

Re: [gcpm] custom pages and page lists

From: Håkon Wium Lie <howcome@opera.com>
Date: Wed, 20 Aug 2008 10:59:00 +0200
Message-ID: <18603.56532.299447.696295@opera.com>
To: MURAKAMI Shinyu <murakami@antenna.co.jp>
Cc: www-style@w3.org

Also sprach MURAKAMI Shinyu:

 > CSS2 and CSS3 Paged Media have the following example where the two
 > tables with page: rotated are rendered on the same page if they fit.
 > Is this use case not very important?
 >     In this example, the two tables are rendered on landscape pages
 >     (indeed, on the same page, if they fit). The page type "narrow"
 >     is used for the <p> after the second table, as the page
 >     properties for the table element are no longer in effect:
 >     @page narrow { size: 9cm 18cm }
 >     @page rotated { size: landscape }
 >     div { page: narrow }
 >     table { page: rotated }
 >     with this document:
 >     <div>
 >     <table>...</table>
 >     <table>...</table>
 >     <p>This text is rendered on a 'narrow' page</p>
 >     </div>
 > I'd like to call this use case 3.1 (UC3.1) in the follwing comments.

Yes, this use case should also be included. I'd even upgrade it to a
major version: UC4.

 > I would like Option D with named page list.
 > UC1: same as Option D.
 >      Option C's code works too.
 > UC2:
 >   @page { 
 >     @top-center { content: string(title) }
 >   }
 >   @page chapter-start { 
 >     @top-center { content: none }
 >   }
 >   h1 { page: chapter-start auto; string-set: title content() }
 > This example is similar to the GCPM WD's example.
 > http://www.w3.org/TR/2007/WD-css3-gcpm-20070504/#named3
 > This spec says:
 >     The last value in the list becomes the leaving value which is
 >     compared with the first item the 'page' property of the next
 >     element. If those two values are different, a page break is
 >     generated.
 > The following assumptions are needed.
 >  - the 'page' property no longer inherits
 >  - every element with a non-auto value on 'page' start on a new page,
 >    so there would e.g. be a page break between these two div elements:
 >      div.capter { page: chapter }
 >      <div class="chapter">...</div>
 >      <div class="chapter">...</div>
 >   - if 'page' has more than one value, it will not generate any page
 >     breaks between the pages in the list.
 > These are same as OPTION C's assumptions except "between" 
 > (not "between/after") in the last.
 > UC3: same as Option D.
 > UC3.1:
 >     table { page: rotated }
 >     <table>...</table>
 >     <table>...</table>
 > These two tables are rendered on separate pages.
 > To prevent page break between two tables, two same page names can be
 > specified,
 >     table { page: rotated rotated }
 > It doesn't prevent page break after the table and works well.

So, in your proposal, specifying a list (as opposed to a single value)
would make pages be created only if necessary? That is, if the element
would naturally occur on the first page in its list ("rotated" in the
above example), it wouldn't start on a new "rotated" page, but
continue on the exisiting one. And, the page sequence would continue
until replaced by another page sequence?

This makes sense.

However, but I don't find the code for UC3.1/4 intuitive. I'd like to
be able to write:

  table { page: rotated auto }

The next question is: what does 'auto' mean? Does it refer to:

  (a) the default page, or

  (b) the previous entry in the list

I think (b) is what we want. We may want another value, 'normal', to
refer to the default page; it would be the "name" of the unnamed page.

Here's a first pass at describing the values:

If a single value is specified, it means:

 - 'auto': the element continues on the page sequence already
   established. If no page sequence is established, the default page
   is used. page-break-* properties are honored

 - <named-page>: the element is laid out on one or more <named-page>
   pages; more pages are created if necessary. A page break occurs
   before and after the element, thereby ignoring the page-break-*

 - 'normal': refers to the default page, otherwise like <named-page>

A space-separated list of values constitutes a page sequence. If a
page sequence is specified, the element establishes a page sequence
corresponding to the specified list. Pages are only created as
necessary: if the element would naturally occur on a name page equal
to the first name page it its list, a new page is not created for the
element. The page sequence continues until it is replaced by another
page sequence; the last page in the page sequence is repeated as

Alternatively, a single 'normal' value could reset the page sequence,
i.e. remove any current page sequence.

              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Wednesday, 20 August 2008 08:59:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:39 UTC