- From: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Date: Wed, 20 Aug 2008 23:32:45 +0900
- To: Håkon Wium Lie <howcome@opera.com>
- Cc: www-style@w3.org
Håkon Wium Lie <howcome@opera.com> wrote on 2008/08/20 17:59:00 > > 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. Thank you for upgrading :-) > > > 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? Yes, but note that the <p> after the tables must end the "rotated" page sequence in the UC4 or the following simpler example. table { page: rotated rotated } <table>...</table> <table>...</table> <p>This text is not rendered on a rotated page.</p> > > 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-* > properties. > > - '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 > necessary. > > Alternatively, a single 'normal' value could reset the page sequence, > i.e. remove any current page sequence. problem: <table>...</table> <table>...</table> <p>This text is not rendered on a rotated page.</p> The <p> has 'page: auto' (by default) and if 'auto' means "the element continues on the page sequence already established", the <p> is rendred on a rotated page :-( -- Shinyu Murakami http://www.antennahouse.com http://www.antenna.co.jp/AHF/
Received on Wednesday, 20 August 2008 14:33:32 UTC