I claim, and I may be wrong that:
In the RTF standard, and I suspect other document standards as well, the 
proper way to write a document section is
  <section> = <secfmt>* <hdrftr>? <para>+ (\sect <section>?)
where
<secfmt> is general formatting for the section,
<hdrftr> is all the header/footer stuff, and
<para>+ is one or more paragraphs belonging to the section.
(\sect <section>?) zero or more subsections.

Abiword writes a document by stepping through a vector of pf_Frag in a 
pt_PieceTable.   Unfortunately, the header/footer stuff is located AFTER 
the text content for a section.

The upshot of all this, assuming what I claim is correct, is that AbiWord 
outputs RTF where the <hdrftr> follows the <para>+, and is thus not valid 
according to the standard.  Worse yet, WinWord2000 doesn't care about the 
order, but reimporting the document to AbiWord does not work.

Possible solutions:
1. Store header/footer information at the beginning of a section.
2. Fix the importer so it doesn't care about the order.
3. Fix the document exporting routine so it outputs the header/footer first.

Any ideas?
Matti


Reply via email to