Header different first page, but odd/even footers

B

BarbaraF

I am trying to set up a template for a document with several sections, each
section starting on "next page". I want the header of the first page of each
section to show e.g "introduction", "text", etc, and all the subsequent pages
in the section to show e.g. "introduction (continued)". I can do this by
clicking "different first page" under page setup. I also want the footer
to include the page number on the left for even pages and on the right for
odd pages (outside edge when printed double sided). I can do this by
clicking "different odd and even". However this is no good if I tick both -
the problem arises because the first page of a new section may be either odd
or even, so I cannot sensibly define the first page footer. If I define it
to show the page number on the right, say, then it comes on the right
regardless of whether that section happens to fall odd or even.

Can anyone help please!
 
S

Suzanne S. Barnhill

It's not uncommon to use a centered drop folio on the first page of a
chapter; or you could use Odd Page section breaks so that the first page
would always be odd.
 
D

Daiya Mitchell

One option would be to force the first page of a new section to be odd (or
even) by using an Odd Page Section Break.

Another option would be to avoid the issue by centering the number on the
first page of each section. It's very common to see first pages with numbers
centered at the bottom, and no header text (since normally it would
replicate a heading in the main text)

Others may have suggestions that actually address the specific question you
ask.
 
J

Jay Freedman

BarbaraF said:
I am trying to set up a template for a document with several
sections, each section starting on "next page". I want the header of
the first page of each section to show e.g "introduction", "text",
etc, and all the subsequent pages in the section to show e.g.
"introduction (continued)". I can do this by clicking "different
first page" under page setup. I also want the footer to include the
page number on the left for even pages and on the right for odd pages
(outside edge when printed double sided). I can do this by clicking
"different odd and even". However this is no good if I tick both -
the problem arises because the first page of a new section may be
either odd or even, so I cannot sensibly define the first page
footer. If I define it to show the page number on the right, say,
then it comes on the right regardless of whether that section happens
to fall odd or even.

Can anyone help please!

Hi Barbara,

You can have your cake and eat it, too -- use both different odd/even and
different first page -- by constructing a pair of slightly complex fields in
the first-page footer.

On the left side of the footer, the field code should look like this:

{ IF { = MOD({PAGE},2) } = 0 "{PAGE}" "" }

This field displays the page number on even-numbered pages and displays
nothing on odd-numbered pages.

To build this up, start by inserting a {PAGE} field by clicking the # button
on the Header/Footer toolbar. (Press Alt+F9 so you can see field codes
instead of results, which makes this easier to follow.) Then type the =
MOD( before it and the ,2 after it to get

= MOD({PAGE},2)

That expression evaluates to 0 on even pages, and evaluates to 1 on odd
pages. Select all of the expression (but not the paragraph mark after it)
and press Ctrl+F9 to add the field braces around it.

Now type IF to the left of the field and = 0 "" "" to the right of the
field to get

IF { = MOD({PAGE},2) } = 0 "" ""

Put the cursor between the first pair of quotes and click the # button on
the toolbar again to insert another {PAGE} field. Finally, select the whole
thing (again avoiding the paragraph mark) and press Ctrl+F9 again.

Select the field and copy it to the clipboard. Type two tabs to get to the
right margin, and paste. Now use cut-and-paste to swap the positions of the
"{PAGE}" and the "" to make the second field look like this:

{ IF { = MOD({PAGE},2) } = 0 "" "{PAGE}" }

This field, the converse of the first one, displays the page number on
odd-numbered pages and displays nothing on even-numbered pages.

Finally, press Alt+F9, select the whole footer paragraph, and press F9. You
should be able to use Same As Previous to run this first-page footer through
all your sections.
 
B

BarbaraF

Thanks for your reply. I had already thought of using Odd Page breaks, but
the whole document is really one chapter, with quite a lot of sections within
it, and some of the sections may be short (possibly only one page). I don't
want to end up with a lot of blank pages. I will have to do about 30 or 40
of these documents eventually, so want to get the template as good as
possible before starting.

Could you explain what you mean by a "centered drop folio"
 
S

Suzanne S. Barnhill

A centered page number in the footer (which Daiya also suggested). But given
your further description, I think Jay's solution will be better for you.
 
B

BarbaraF

That's great, does just what I wanted.

I had a bit of trouble to start with, because I missed the = before the MOD
first time (unfortunatlely there was a page break just there and I didnt
notice it), and just typing it in after caused an error code. Also the space
in between the = 0 seems to be important, I missed that on my second attempt
and again got an error message. The other problem was that the whole thing
was so long it went off the right-hand side of the page and I could not see
to edit it - I got round this by changing to a smaller font, but is there a
better way?

Got there in the end - thanks again
 
J

Jay Freedman

I'm glad you got there eventually. :)

Yes, these fields are picky about their spacing. Even after all these years,
it's still trial-and-error for me to get one working.

As for the one that runs off the right margin, it may help to put in the
tabs between fields as the last thing, or to replace them temporarily with a
line break or paragraph mark.
 
Top