Re: word import (headers]

From: Martin Sevior (msevior@physics.unimelb.edu.au)
Date: Wed May 14 2003 - 22:32:33 EDT

  • Next message: Jim Hodapp: "Re: Commit: draw cells with border style none"

    On Thu, 2003-05-15 at 04:45, Tomas Frydrych wrote:
    > Hi Martin,
    >
    > could you give me the gist of how the headers/footers work in AW
    > (where are the header/footer sections placed in the document
    > structure)? I will try to work out how it works in Word while my mind
    > is still in Word-mode.
    >
    Hi Tomas,
             I hope you don't mind me CCing the list because I thing other people
    will be interested in this email.

    Sure. Headers/Footers have their own PTX_SectionHdrFtr and their own
    strux type in the piecetable. Unlike tables/cells/footnotes/endnotes
    they do not have an endstrux strux. They're explicitly placed at the end
    of the piecetable, after all other text.

    There are 8 types of header/footer struxs which determined by the
    contents of the attribute "type" (see fl_BlockLayout.cpp:5065)

    The valid values for "type" are:

    "type" "header"
    The default header type and the header that exists on odd pages

    "type" "header-even"
    If a hdrftr of type even is present then the contents of the strux are
    display on even pages, the contents of "header" are displayed on pages
    except if:

    "type" "header-first"
    If a strux of this type is present the contents of this strux is
    displayed on the first page.

    If a strux of type
    "type" "header-last"
    is present, the contents will be displayed on the last page of the
    document.

    So the Hierarchy of which content display on which page is:

    header-first on First page in section (even if it is the last page)
    header-last on Last Page in section
    header-even on even pages in the section
    header otherwise (which defaults to odd pages not first or last)

    Exactly the same system applies to types

    "footer-first","footer-last","footer-even","footer"

    Now the headers/footers know which section they're applied to by the
    attribute "id"

    The value of id should be a randomly generated UT_uint32 number
    expressed as a string.

    The Section strux's have the same "id" attribute as the hdrftr strux's.

    To successfully import a hdrftr an importer has to arrange for the id
    attribute of the section to match the id attribute of it's associated
    "header-first","header-last","header-even" and "header" (similarly for
    footers) typed PTX_SectionHdrFtr struxes.

    So just to recap the expected piecetable structure is:

    PTX_Section<=>PTX_Block<=>content....
    <=>PTX_Section<=>PTX_Block<=>content..
    <=>PTX_SectionHdrFtr<=>PTX_Block<=>content...
    <=>PTX_SectionHdrFtr<=>PTX_Block<=>content..
    ...
    <=>PTX_EndDocument

    Is that clear?

    If that structure is in place at the end of the loading phase the
    formatter will lay everything out correctly.

    > Also, I though we could add the annotations feature that is found in
    > word. It is really just another kind of a footnote, the only real
    > difference is that it is only visible when show para is on.
    >

    Yes it would be rather easy to add but would no doubt come with it's own
    set of bugs which would take time to fix. I would really like to release
    2.0 before June 10th (in time for GUADEC). Consequently I'd like to
    postpone this for post 2.0. There are many other really easy to add
    features that I'm leaving out of 2.0 for similar reasons.

    If you manage to get all our current features imported from MS Word, I'd
    really appreciate it you could find time to thoroughly examine Revision
    Marks. It is really easy to get both unexpected behavior and crashes
    once you turn on Revision Marks. The code basically hasn't been touched
    since you wrote it one year ago.

    Cheers

    Martin

    > Tomas

    -- 
    Martin Sevior <msevior@physics.unimelb.edu.au>
    University of Melbourne
    -- 
    Martin Sevior <msevior@physics.unimelb.edu.au>
    University of Melbourne
    


    This archive was generated by hypermail 2.1.4 : Wed May 14 2003 - 21:38:02 EDT