Re: Global / leaking sections
- From: JosypenkoMJ@xxxxxxxxxxxxxxxxx
- Date: 11 Jul 2005 09:55:07 -0700
John,
Thanks, this definitely helps - it'll take awhile to fully digest.
I'm used to writing code (eg. Fortran) where everything is local (no
inheritance) unless specified.
I don't know if you saw the next Email, but to clear it up some, Word
doen't let a header on a page to be in one section and the footer on
the same page to be in another. Below is a simple example of what
happens if a section is inserted in the middle of a page. The page 1
footer should be in section 2 but Word says it is in section 1. It is
only on the next page 2, headers and footers are placed in section 2.
_____ page 1 _____________
_____ Header - Section 1 - _____________
text in section 1
text in section 1
text in section 1
text in section 1
_____ section break (continuous) _____________
text in section 2
text in section 2
text in section 2
text in section 2
_____ Footer - Section 1 - _____________
_____ page 2 _____________
_____ Header - Section 2 - _____________
text in section 2
text in section 2
text in section 2
text in section 2
text in section 2
text in section 2
text in section 2
text in section 2
_____ Footer - Section 2 - _____________
_____ end of page 2 _____________
John McGhie [MVP - Word and Word Macintosh] wrote:
> Hi Mike:
>
> OK, Microsoft tightly defines the meaning of the word "Section" as they use
> it in a Word document :-) The concept is very complex, one of the big
> subjects those such as yourself who deal with Word at an advanced level have
> to get hold of.
>
> A "section" is "part" of a document, and does inherit all of its properties
> from its containing document. However, and this is where things get
> exciting, a section is an "object" within a document. Word is extremely
> object-oriented. The concept of objects brings with it the concept of
> inheritance and the creation of "hierarchies".
>
> When created, a document contains a master section (Section {last}), which
> inherits all of the properties of the document. Then the user may set some
> of those properties: for example, the headers and footers.
>
> The next section to be created (which will become Section 1) will inherit
> those properties. However, the user may then choose to break the
> inheritance and define properties within Section 1.
>
> Let's say the user then adds a section break within Section 1. It will
> create a new Section 1. The old section 1 will become Section 2. The master
> section will now be Section 3. Section 1 will inherit the properties of
> Section 2. Section 2 inherits everything from Section 3 except the headers
> and footers.
>
> If the user then adds a section break to Section 3, it will create a new
> Section 3, and the master section will now be 4. The new Section 3 will
> inherit all of the properties from Section 4.
>
> If the user changes the headers in Section 3, the headers in Sections 3 and
> 4 will change. The headers in sections 1 and 2 will not.
>
> Each section has up to three headers (First Page, Left, and Right) and three
> Footers. Each of those headers and footers can be set to "Same as Previous"
> or "Not Same As Previous". The default is "Same as Previous".
>
> Much of the confusion occurs because "Same as Previous" and "Inheritance"
> work the opposite way. Throughout Word the standard rule is that each
> "object" is a "container". For example, paragraphs, tables, pictures, and
> sections are objects.
>
> Each object is divided from the rest of the document by a terminating
> structure. The terminating structure for a paragraph is the paragraph mark,
> for a section it's the section break.
>
> The terminator contains all of the properties for the object. A paragraph
> mark contains all of the style, font, and paragraph properties applied to
> the text before it. A Section break contains all of the margins, headers
> and footers for the section it ends.
>
> The above way of working is a feature of the way Word and its binary file
> structure are designed. Originally, the design was created because it is
> very efficient, both in terms of computing power and file size. However, to
> human beings, it's counter-intuitive. We have difficulty understanding a
> situation where what happens depends upon what comes next, not upon what has
> gone before.
>
> So for Headers and Footers, Microsoft added code to reverse Word's native
> behaviour with the "Same as Previous" button. The "Same as Previous" button
> is not attached to the current section that you think you are working on:
> the change it makes is to the properties of the section break BEFORE the one
> you are in. When you click it, Same as Previous copies the header or footer
> you are working on from the previous section break, overwrites that header
> or footer in the current section, then sets the previous break to inherit
> from the current one. You may have to read this more than once before it
> settles as you what is really going on: I don't know about you, but it took
> me a while to get hold of it :-)
>
> It's an "exception" that intentionally "breaks the rules". It was created
> because people converting from WordPerfect simply could not get comfortable
> with the concept of forward inheritance. They had spent years of their
> working lives working with a product which inserted a code in the text at
> the point from which it wanted the new formatting to "begin". They had huge
> problems with this new-fangled Word, which inserted a terminator that not
> only contained all of the formatting, but occurred at the point in the text
> where you wanted that formatting to END.
>
> With 20-20 hind-sight, maybe it would have been better if they had not
> created this exception. If there was only one rule and it applied
> everywhere, I guess we would all have been forced to learn the rule early
> and would not be having problems now. Hind-sight is the most powerful
> design tool there is: unfortunately, it leads to difficulties in the
> production and distribution process...
>
> The way Word is designed is fundamentally more powerful, more flexible, and
> more computer-power and disk-space efficient than WordPerfect's design. You
> will find this out if you ever try to take a single WordPerfect file beyond
> about 160 pages: everything starts to get very, very s-l-o-w-w-w-w... Word
> will hang in beyond 2,500 pages. It's a bit difficult to tell what the
> actual limit is, because the Page Number counter runs out of digits at 9,999
> -- but in a single document the practical limit is about 2,500 pages. Of
> course you can join as many of these as you like to make a document whose
> size is limited only by the size of your file server.
>
> Hope this helps
>
> On 9/7/05 5:15 AM, in article
> 1120850127.309607.231230@xxxxxxxxxxxxxxxxxxxxxxxxxxxx,
> "JosypenkoMJ@xxxxxxxxxxxxxxxxx" <JosypenkoMJ@xxxxxxxxxxxxxxxxx> wrote:
>
> > Microsoft doesn't seem to know the meaning of the word section. A
> > section is a closed boundary that encloses items that can share
> > properties, etc. only amomgst themselves. However, Word creates
> > sections that at times allows some properties to be shared between
> > different sections. As a simple example, I am trying to make 1 section
> > with all 1" margins and a following section with all 0" margins. This
> > is what Word does (commands are enclosed in __) :
> >
> > _____ page 1 _____________
> >
> >
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> >
> >
> > _____ page 2 _____________
> >
> >
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margins
> > 1" margin
> > _____ section break (continuous) for 1" margins _____________
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> >
> >
> > _____ page 3 _____________
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > _____ page 4 _____________
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > 0" margins
> > _____ section break (continuous) for 0" margins _____________
> >
> >
> > For the first section, page 1 and the beginning of page 2 have
> > correctly a 1" margin about its top, left, and bottom. In the middle of
> > page 2, I switch to a section of 0" margins, but at the bottom of the
> > page, there still is a 1" margin, which should be a 0" margin. On the
> > next page, the bottom margin is correct at 0".
> > Any ideas ?
> >
> > Thanks
> > Mike
> >
>
> --
>
> Please reply to the newsgroup to maintain the thread. Please do not email
> me unless I ask you to.
>
> John McGhie <john@xxxxxxxxxxx>
> Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
> Sydney, Australia +61 4 1209 1410
.
- Follow-Ups:
- Re: Global / leaking sections
- From: John McGhie [MVP - Word and Word Macintosh]
- Re: Global / leaking sections
- References:
- Global / leaking sections
- From: JosypenkoMJ
- Re: Global / leaking sections
- From: John McGhie [MVP - Word and Word Macintosh]
- Global / leaking sections
- Prev by Date: Re: Somewhat OT - Resume ideas
- Next by Date: Re: mail programs crashing w/word attachments...
- Previous by thread: Re: Global / leaking sections
- Next by thread: Re: Global / leaking sections
- Index(es):