Change headers every new chapter.

Discuss the word processor
Post Reply
robert17
Posts: 2
Joined: Thu Apr 13, 2017 9:40 pm

Change headers every new chapter.

Post by robert17 »

Hello,

I have just downloaded Writer 4.1.3.

I am writing a text with different chapters, and I would like to change the headers, so that the headers over every chapter contain this chapter's title/description.

How can it be done?

Thanks in advance.
OpenOffice 4.1.3, Windows Vista
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change headers every new chapter.

Post by RoryOF »

Insert the field name Chapter into the page headers; use the longform /Insert /Fields /Other : Document tab : Chapter and select the level in the bottom right which corresponds to the heading level used to name the Chapter.

Attached is a small sample file. Go to the end of Chapter 2. Press Enter, select it to be Heading 1. It will immediately force a new page (a Right page style, as I like my chapters to start on Right pages, for nice printing when printed brochure duplex and folded for binding). The cursor, now below "Chapter 3", will be set in style Heading 2; enter there your chapter title. Now the cursor will in style Default, awaiting for your chapter text. type DT, press F3, to fill in dummy text. You will see that the header on the next page(s) shows the title you entered for Chapter 3. Switch /View /Field names to see what fields are used in the page headers. The chapter page (a Right page) has no Header used, as the chapter header is on the page in Heading 2 style.

For a Chapter page I would either omit the page number, or insert a footer with the page number centred - a running Header on a chapter page can look awkward as the chapter title is usually dominantly displayed on the page: this is a design decision.

The autonumbering means that if you force a break somewhere in the text and insert Heading 1, the new chapter is correctly numbered and the existing chapters are renumbered and their pages reheaded as appropriate.

The file is a quick example and heading position is not as elegant as I would use in publication.

You should examine /Tools /Outline numbering to see how the Heading 1 style is set to autonumber.

Useful information on text formatting and numbering in the various tutorials at
Writer Tutorials
Attachments
Chapters.odt
(12.51 KiB) Downloaded 219 times
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Change headers every new chapter.

Post by John_Ha »

You may find this explanation helps your understanding.

It's all about Page Breaks. The page following a Page Break can be exactly the same Page Style as the page before the Page Break. BUT if you want to change the Page Style (so as to change headers or header text, footers or footer text, page numbers, hide page numbers etc) you must insert a Page Break and you must select a new Page Style which makes the change you want.
In a correctly working document page numbers follow from the preceding page. If you want to change the page number itself, or remove a page number from a page, or add a page number to a page without one, you need to insert a Page Break where you select the Page Style for that page (and subsequent pages) which does what you want.

It is very useful to make Page Breaks visible by Tools > Options (Preferences on Mac) > OpenOffice > Appearance > scroll to Text document > tick Section boundaries > choose a colour for Page and column breaks. Page Breaks now show on the screen as a thin coloured line and identify all page breaks. This is the default setting on later installations where the Page Break appears as a thin blue line.

Page Styles (and hence changed headers and footers); Page Breaks and Page Number are an attribute of the first paragraph on the page following a change even if the paragraph is empty or is a Heading (or is a table at the very top). Note that Heading means a Heading 1 or a Heading 2 etc, and not a Page header as in header/footer. Set View > Non printing characters ..., to ON to see the paragraph break.

When you Insert > Manual Break > Page Break..., the small pop-up window allows you to choose the Page Style for the first (and hence subsequent) page(s) following the break; and also the option to change the Page Number for the frst (and hence subsequent) page(s) following the break.

You can also manually insert and delete Page Breaks, manually choose the Page Style (and hence change headers and footers), and manually change the Page Number, by placing the cursor in the first paragraph and going Format > Paragraph > Text Flow > Breaks ... (or in the table, and going Table > Properties > Text Flow...) where all these options can be changed.

You can also delete Page Breaks by Backspace, or by deleting highlighted text which includes the Page Break.

Debug page style changes / changed page numbering / changed header problems by placing the cursor in the first paragraph following a page break and going Format > Paragraph > Text Flow > Breaks .... What is the document telling Writer to do following the break? If you see nothing there to cause the change, the document has become corrupted and (much!) more diagnosis is required.

A word of caution. You can go Format > Page ..., and edit the format of the page in which the cursor is currently located. However, you are actually editing that page's Page Style, so all other pages which use that same Page Style will also have their formats changed.

You can get more information on Page Styles, Page Breaks and Page Numbering in Chapter 4 - Formatting Pages of the Writer Manual.
You will find much useful information in the Writer FAQ, the Writer Tutorials, the up to date Writer guide and the OOo v3.3 Writer Manual. When a pop-up window opens, click the Help button for extensive help on that function - it is often more comprehensive than the manual.

Also, please always search the forum (with headers in your case) before posting a query as the same questions (like yours) get asked again and again and again and again ...
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
EinarFlydal
Posts: 52
Joined: Mon Jan 11, 2016 3:23 pm

[Solved] Re: Change headers every new chapter.

Post by EinarFlydal »

Thanks to both of you!
I had done much of what you have suggested, but was not aware the formatting of the break is in the following paragraph.
There is a problem that in the help file, translated into - in my case - Norwegian, such info lacks.

Still a question: When one turn on the "Lock section", which section is then locked? The following that was just created, or the one one leaves?

E
Last edited by EinarFlydal on Sat Dec 29, 2018 7:06 pm, edited 1 time in total.
OpenOffice 4.1.2 on Windows10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change headers every new chapter.

Post by RoryOF »

The section whose name is shown in the Section box in /Format /Sections or in /Insert /Section window.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
EinarFlydal
Posts: 52
Joined: Mon Jan 11, 2016 3:23 pm

Re: Change headers every new chapter.

Post by EinarFlydal »

RoryOF,

Yes, for shure, but what is denoted by that name, is it from where your cursor stands in the text when you define the sesction and onwards, or backwards? This is not explained as far as I have found.
I ask because it seems odd e.g. to lock the section you have still not written, but meaningful to lock the section you are about to leave, going forwards in the text.
May be this is too evident for you to find problematic? :D
I have only been in the ICT business for 35 years...

Happy to have you around!

Einar
OpenOffice 4.1.2 on Windows10
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Change headers every new chapter.

Post by RoryOF »

I add a coloured background to each section /Format /sections: Background tab (different colour for each) until the document is finished - this clearly defines the change of chapters and sections, which can be helpful when editing the entire document. This background colour can also be applied at the time one defines the section. The usual course is that when one has finished (or leaves a section for some days) one can choose /Format /Sections, select that section and lock it (Write protect, depending on language); one can also mark it as hidden

Note that you can change the name of the Section either on creation or by /Format /Section from the default name Section N
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
burljon
Posts: 1
Joined: Fri Nov 12, 2010 9:11 pm

Re: Change headers every new chapter.

Post by burljon »

I've been reading several of these various threads, and I'm pretty much convinced to return to Wordperfect. Sum total OOWriter is not capable of seamless headers. Wordprocessors are supposed to eliminate work, not create a ton more of it. I saw one comment "... the same question gets asked over and over and over and over." That should be clue number one that Open Office is a broken product, at least as far as writer is concerned. I like very much many of the features in the spreadsheet, but I write books, and I also code. One should not have to babysit a wordprocessor to get very simple tasks - like having a different odd page header each chapter to name one - when the whole point of a wordprocessor is to be invisible. It's like I'm back in the 80's again. 90% of the time, the Writer's spell checker turns itself off without warning. I still haven't figured out why. Every time, I have to do something different to get it working again. I just can't take Writer seriously. I don't have the time or money.
OpenOffice 3.2.1 on Windows 7
Post Reply