[css3-page][css-multicol] break at odd, even and empty pages

Grant, Melinda:
> Assuming something like the following for overloading page-breaking  
> to handle column-breaking:
> page-break-before
> page-break-after
>      auto | column | always | right | left | avoid | avoid-page |  
> avoid-right | avoid-left

   | odd | even

based on counter 'page' or

   | recto | verso

based on block progression.

Note that you usually have [l|r] := [-|1][2|3]..->..[n|-] = [e|o] =  
[v|r] in books (or [-|n]..<-..[3|2][1|-] = [1|-][3|2]..->..[-|n] = [o| 
e] for sinistrograde, i.e. leftwards or right-to-left scripts), but  
in binders or brochures you may also have [1|2]...[m|n] = [o|e].

> page-break-inside
>      auto | avoid | avoid-page | avoid-right | avoid-left

   | avoid-odd | avoid-even

> (...avoid-right and avoid-left could be replaced by avoid-turn...)

Probably, includes the logical equivalents.

1. Should there be a way to control whether two consecutive empty  
pages (-) generated by 'left' and 'right' are collapsed? I assume  
[-|-] should never happen (if not explicitly requested), but could  
someone want to avoid [a|-][-|b]?

   <a/><b/> <c/><d/>
   a,b,c,d {page-break-before: always; page-break-after: always;}

   a {page-break-after:  left;}
   b {page-break-before: right;}
   c {page-break-after:  right;}
   d {page-break-before: left;}

   abcd     -> [a|-][-|b][c|d] or [a|b][c|d]
   aabbccdd -> [a|a][-|b][b|c][c|-][d|d]
   abbcdd   -> [a|-][-|b][b|c][-|-][d|d] or [a|-][-|b][b|c][d|d] or  
[a|b][b|c][d|d]
   aabccd   -> [a|a][-|b][c|c][-|-][d|-] or [a|a][-|b][c|c][d|-]

   a {page-break-after:  right;}
   b {page-break-before: left;}
   c {page-break-after:  left;}
   d {page-break-before: right;}

   abcd     -> [a|-][b|c][-|d]
   aabbccdd -> [a|a][-|-][b|b][c|c][-|d][d|-] or [a|a][b|b][c|c][-|d] 
[d|-]
   abbcdd   -> [a|-][b|b][c|-][-|d][d|-] or [a|-][b|b][c|d][d|-]
   aabccd   -> [a|a][-|-][b|c][c|-][-|d] or [a|a][b|c][c|-][-|d] or  
[a|a][b|c][c|d]

((
   a {page-break-after:  always;}
   b {page-break-before: right;}
   c {page-break-after:  right;}
   d {page-break-before: always;}

   abcd     -> [a|b][c|d]
   aabbccdd -> [a|a][-|b][b|c][c|d][d|-]
   abbcdd   -> [a|b][b|c][-|d][d|-]
   aabccd   -> [a|a][-|b][c|c][-|d]

   a {page-break-after:  always;}
   b {page-break-before: left;}
   c {page-break-after:  left;}
   d {page-break-before: always;}

   abcd     -> [a|-][b|c][d|-]
   aabbccdd -> [a|a][b|b][c|c][d|d]
   abbcdd   -> [a|-][b|b][c|-][d|d]
   aabccd   -> [a|a][b|c][c|-][d|-]
))

   Each letter represents one page filled by, not one instance of the  
element.

2. Should there be a way to collapse an empty page generated by  
'left' and 'right'? (I believe not.)

   <c><a/><b/></c>
   c {empty-page-inside: avoid;} /* X: stronger 'avoid' after a /  
before b */

   a {page-break-after:  avoid;} /* 'always'|'left' same but cancels  
X */
   b {page-break-before: left;}
   /** or **/
   a {page-break-after:  left;}
   b {page-break-before: avoid;} /* 'always'|'left' same but cancels  
X */

   ab  -> [a|-][b|-] -X-> [a|b]
   aab -> [a|a][b|-]

   a {page-break-after:  avoid;} /* 'always'|'right' same but cancels  
X */
   b {page-break-before: right;}
   /** or **/
   a {page-break-after:  right;}
   b {page-break-before: avoid;} /* 'always'|'right' same but cancels  
X */

>

   ab  -> [a|b]
   aab -> [a|a][-|b] -X-> [a|a][b|-]

JFTR:
> 1. page-break-before: auto;  column-break-before: avoid;
> 2. page-break-after:  avoid; column-break-after:  always;
> 3. page-break-before: avoid; column-break-before: always;
> 4. page-break-after:  avoid; column-break-after:  always;
>    page-break-before: avoid; column-break-before: always;

For all but the most edgy cases

   1. page-break-before: avoid-column;
   2. page-break-after:  column;
   3. page-break-before: column;
   4. page-break-after:  column; page-break-before: column;

should give the same results.

> I feel that overloading the page-breaking properties results in  
> such counter-intuitive naming (...)

Well, that's because it's backwards,

   column-break-before: page;  =  page-break-before: always;

works better than

   page-break-before: column;  =  column-break-before: always;

because of the common degenerate case of 1 column. Unfortunately we  
already have PBB/A:always (*), so cannot introduce CBB/A:page (#).  
Since 'avoid' works better the other way around (unlike 'always'),  
that's probably not too bad after all.

                   -before / -after
     column-break- | page-break-   | break-
    ===============+===============+===============
     auto          | auto         *| auto
    ---------------+---------------+---------------
     page         #| always       *| page
    ---------------+---------------+---------------
     always        | column        | column
  =                |               | always
    ---------------+---------------+---------------
     avoid         | avoid-column  | avoid-column
  =  allow-page    | avoid-column  | prefer-page
    ---------------+---------------+---------------
     avoid-page    | avoid        *| avoid-page
  =  avoid-page    | allow-column  | prefer-column
  =                |               | avoid
    ---------------+---------------+---------------

   column-break-before/-after:
    page   | always     | avoid    |allow-page  | avoid-page
   page-break-before/-after:
    always | col        | avoid-col             | avoid     |allow-col
   break-before/-after:
    page   | col|always | avoid-col|prefer-page | avoid-page|prefer- 
col|avoid

'left'/'right'/'odd'/'even'/'recto'/'verso' are special cases of  
'page' and therefore are left out here for simplicity.

Received on Friday, 10 April 2009 17:36:37 UTC