FROM : Douglas Davidson
DATE : Mon Jun 05 18:16:34 2006
On Jun 4, 2006, at 7:17 PM, Joshua Scott Emmons wrote:
>> Take a look at TextEdit's MultiplePageView. You can insert a
>> formfeed (\f) character into it and it will cause a page break.
>>
>
> While, empirically, I know this is true (as I've inserted a form
> feed and seen the page break) I, for the life of me, cannot figure
> out how this is accomplished. It certainly doesn't happen in in
> MutiplePageView. That only maps rects to already existing text
> views, near as I can tell. I don't see any processing that looks
> for formfeed and creates a new "page" (in this case, a text view)
> for it.
>
> Is this done automatically by the layout manager? Reading between
> the lines of the TextEdit example makes me think that it might be
> the case that, if presented with multiple containers that it must
> flow text for, the layout manager might interpret a \f as a sign to
> "skip to the next container". I can't find any documentation on
> this, though. Can anyone confirm that's what's supposed to happen?
>
It is the typesetter that interprets form feeds, but yes, that is
what happens. There is one notable exception--if the current
container is very long, long enough that the typesetter considers it
to be effectively infinitely long, then form feeds are ignored. The
default size for a text container is of this sort; thus, for example,
form feeds are ignored when TextEdit is not in wrap to page mode.
Douglas Davidson
DATE : Mon Jun 05 18:16:34 2006
On Jun 4, 2006, at 7:17 PM, Joshua Scott Emmons wrote:
>> Take a look at TextEdit's MultiplePageView. You can insert a
>> formfeed (\f) character into it and it will cause a page break.
>>
>
> While, empirically, I know this is true (as I've inserted a form
> feed and seen the page break) I, for the life of me, cannot figure
> out how this is accomplished. It certainly doesn't happen in in
> MutiplePageView. That only maps rects to already existing text
> views, near as I can tell. I don't see any processing that looks
> for formfeed and creates a new "page" (in this case, a text view)
> for it.
>
> Is this done automatically by the layout manager? Reading between
> the lines of the TextEdit example makes me think that it might be
> the case that, if presented with multiple containers that it must
> flow text for, the layout manager might interpret a \f as a sign to
> "skip to the next container". I can't find any documentation on
> this, though. Can anyone confirm that's what's supposed to happen?
>
It is the typesetter that interprets form feeds, but yes, that is
what happens. There is one notable exception--if the current
container is very long, long enough that the typesetter considers it
to be effectively infinitely long, then form feeds are ignored. The
default size for a text container is of this sort; thus, for example,
form feeds are ignored when TextEdit is not in wrap to page mode.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| Joshua Scott Emmon… | Jun 4, 23:53 | |
| Todd Ransom | Jun 5, 02:25 | |
| Joshua Scott Emmon… | Jun 5, 04:17 | |
| Douglas Davidson | Jun 5, 18:16 |






Cocoa mail archive

