Fwd: [css3-gcpm] Page breaks -- keep blocked text together

to list.  man, I've been bad about this today.

---------- Forwarded message ----------
From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, Aug 8, 2008 at 9:50 AM
Subject: Re: [css3-gcpm] Page breaks -- keep blocked text together
To: marbux <marbux@gmail.com>




On Fri, Aug 8, 2008 at 3:35 AM, marbux <marbux@gmail.com> wrote:

>
> <http://www.w3.org/TR/2004/CR-css3-page-20040225/#page-breaks>
>
> If I am reading this correctly, CSS3 seems to be limited to manual
> insertion of page breaks to work past troublesome page breaks. I
> suggest consideration of a more automated approach for reflowable
> text, the marking of text spans that must remain together on the same
> page, i.e., that will be treated as a block. So e.g., assuming a tag
> named <keep-together>, a heading and the following two lines of text
> might be marked as:
>
> <keep-together>
> Heading line 1
> Heading line 2
>
> Text line A
> Text line B
> </keep-together>
> Text line C
> Text line D, etc.
>
> So for example, if the page break fell between Heading line 2 and Text
> line A, the page break would be forced before Heading line 1. The
> block protection would extend to the end of Text line B even if a
> change in type size forced more words from Text line C back onto B.
>
> If handled in this manner, repurposed text or a change in type size
> and leading would not require manual inspection for bad page breaks of
> this kind.
>
> This approach also helps in the case of text where the author wishes
> to avoid breaking a page on a hyphenated word.
>
> Downside: inserting new text within an already marked block can cause
> more lines to be protected from page breaks than intended.
>
> Feature suggestion shamelessly borrowed from WordPerfect 5.1.
>

Luckily what you're asking for already exists in the Paged Media spec [1],
and is called page-break-inside.  You can either put the property on a
convenient container element, or if none exists, just wrap the content in a
<div> to group it.

It may be helpful to note that GCPM is *not* the primary spec for paged
media; that would be the Paged Media spec.  ^_^  GCPM is instead a grabbag
of useful features that don't appear elsewhere.

[1]: http://www.w3.org/TR/css3-page/#pg-br-before-after

~TJ

Received on Friday, 8 August 2008 14:51:24 UTC