Headers in exported RTF

Are page headers another thing, like footnotes, that Cocoa-based applications don’t support in rtf files?

I have a rtf-formatted file generated with “Export Short Story.” It has a per-page header. This header shows up on each page when opening the file in Word, but not when opened in TextEdit (with “Wrap to Page” activated).

Hmm, that shouldn’t be happening. Headers are just regular text with different fonts applied to them, nothing fancy at all. What happens when you import the file back in to Scrivener (just drag and drop it into the Binder)? When you do an HTML or plain text export, do they show up?

Is that true? Just to clarify, this is a header created with the options under “Text Options”; all three boxes are checked. Opening the rtf file with a text editor shows this line:

\f0\fs24 \cf0 \titlepg\pgnrestart\pgnstarts1 {\header {\pard \qr {\f1 MyName / MyTitle / \chpgn \f0 \par}}}

So, the header is in there. Exporting to html, exporting to plain text, or importing the file back into Scrivener (by dragging to the binder) generates no page headers, but none of those formats display text broken into pages, so I’m not sure where page headers would show up.

Of course, opening it Word works fine, so it seems like Scrivener is working perfectly, and the problem is with TextEdit. Maybe not?

Thanks for your help!

Oh! My apologies. I was thinking titles in my head, not headers (as opposed to footers). And yes, I think TextEdit is wholly ignorant of header blocks. It can neither read them nor set them. As to whether or not that reflects on the Cocoa RTF system in general, I’m not sure; but if it is anything like the rest of the system, if TextEdit doesn’t do it, nothing does, and might even damage them if the files are edited with Cocoa based applications.

Actually, if I remember rightly Nisus Writer (Pro at least) does read and set headers from Scrivener, but then NWE/P uses a pretty heavily modified version of the Apple Text Engine.


As already guessed here, the Cocoa text system’s support of RTF knows nothing of headers. In fact, Apple’s implementation of RTF does not do images (they created RTFD to do that!), footnotes, comments, page numbers, headers or footers. And a lot more. Like Nisus, I modified Apple’s RTF implementation to support features such as headers.

TextEdit - which relies solely on built-in Cocoa methods - does not support page headers. Nisus, Mellel and Word all do support headers. You will find exactly the same thing with footnotes etc.

Hope that clarifies things.

Thanks! I suspected that might be the case, but I wanted to make sure I wasn’t doing anything wrong.

And to reiterate the suggestion in the FAQ. If you are exporting with the intention of using applications which utilise the Cocoa RTF system exclusively, such as TextEdit, I recommend RTFD. More features are supported, though comments and footnotes will be compressed. Of course, this is still limited to what you can see. So headers and footers are still not supported with RTFD.