Book page headers for different chapters

That will work bu is not “good practice”. Whatever you apply with menu Format leads you to direct formatting which sooner or later causes issues when you try to tune your formatting. It is much much better to apply a character style over the one defined in the character style. If you want to modify the whole header appearance, modify first the character style. Remember: the fewer applications (either with styles and, most important, with direct formatting, to be used as a last resort when it is really impossible to handle the goal with styles), the better (reliability, predictability, stability, ease of application, performance, …).

There are two ways to manage it.

  • for single line header: modify the spacing parameters in Header paragraph style Indents & Spacing tab.
  • for more sophisticated headers: open the page style configuration dialog and go to Header tab
    Parameter Spacing is the distance below the bottom limit of the last paragraph in the header and the top limit of the first paragraph in the text. I use here word “limit” to emphasise that these boundaries include the spacing below and above of said parameters. Consequently, the effective distance between “lines” is larger than Spacing alone because you add header spacing below and text spacing above.

Don’t go into too many details. Users are supposed to have read the Writer Guide or at least built-in help. Haven’t you :wink: ? AskLO is not a substitute for guides and tutorials. It helps solve pinpoint problems but the whole training is rather a personal effort. In addition, the site is not structured methodically by clearly identified topics, making difficult to query for an existing solution.

Hi Ajlittoz,

(1) Comment about modifying Header appearance.

I myself was surprised that I had no success with changing the appearance via Style.

I did try to change the appearance in Styles > Manage Styles > Paragraph Styles and selected Header but that made no change. I tried changing from lower case to capitals and from black to a colour. The change of colour appeared in the Style panel but made no difference in the Header. Perhaps I was doing something wrong. I have updated the SUMMARY CONTINUATION.

(2) Spacing under Header

Thanks for explaining that spacing under a Header can be applied in the Header Tab of Page Styles. I have updated the SUMMARY CONTINUATION.

(3) LibreOffice Writer Help

I have tried a number of times to use LibreOffice Writer Help, but without success. I could NEVER FIND THE HELP I NEEDED!. I Also tried YouTube. If it wasn’t for you and EarnestAI I could have spent many weeks learning about LibreOffice Writer to find out what I have learnt in 13 days with your kind assistance. I would like other people to have the opportunity of benefitting from what I have learnt. I consider it VERY VALUABLE!.

This means some direct formatting masks the effect of style. I keep on repeating DF is the source of all evil but this is difficult to hear because most people believe DF is “intuitive” and the normal way of handling formatting (curse Word propaganda for that!). DF was only offered for quick’n’dirty formatting of single page write-then-throw-away scratch documents. Writer is a very sophisticated and powerful tool. DF conflicts with its functions until you have understood hwo to use wisely DF.

So, first thing in order to use effectively and efficiently is to accept to forget everything you think you know about text processing. You must accept that founding principles are different and understand them. Then, and only then, you realise that these founding principles result in a very simple consistent structuring mechanism. There are still small discrepancies here and there, but globally you end up with an easy-to-use program implying a user-friendly workflow (I call it “semantic styling”).

Hi Ajlittoz,
I’ve amended my APPEARANCE section further, and have added links to the mock-up I created and you corrected.
I’ve also added links provided by Robleyd.
I’m planning to paste it in as a Suggested Solution.

S U M M A R Y - C O N T I N U A T I O N - (2024-01-26)

INSERTING FIELDS INTO LEFT AND RIGHT BOOK HEADERS

LEFT HEADER

This will be the Title of the book

Put curser in left Header

File > Properties > Description

Insert your book Title.

RIGHT HEADER

First you have to create Headings to be used for the Fields.

Heading 1 will be used for Level 1

Heading 2 will be used for Level 2

Heading 3 will be used for Level 3

This example is for a book with a Book Title, Sections, and Chapters within the Sections.

In this case the Section Name will appear in the Right Header.

(1) HEADING

On the first Section Page enter the Section Name.

Select the Section Name

Click Styles on top menu

Click Heading 1

The Section Name will now have taken on the default appearance of Heading 1.

(2) FIELD

To insert the Section Name Field in the Right Header

Put curser in Right Header

Insert > Field > More Fields

Document Tab > Type > Chapter

Document Tab > Format > Chapter Name

Document Tab > LEVEL 1

Follow the same procedure for other ‘Chapter’ headings, which will be at different Levels.

(3) APPEARANCE

To Modify the appearance of the book Title

Styles > Manage Styles > Paragraph Style (click first icon on left)

Click the + sign of +Headings to open up Headings options

The Title is one of these Heading options

To Modify the appearance of the Section Name

The same process as for modifying the book Title.

Direct Formatting, which means putting the curser in the Header itself, should be avoided and is NOT advisable. It spoils consistent structuring.

Space Under

To insert Space under a Header

Styles > Manage Styles > Page Style (4th icon from left)

Right click on Page Style containing the relevant Header

Select Modify > Header Tab > Spacing

LINKS

Correction of my (April’s) mock-up by Ajlittoz

This is what I did in your corrected sample Book Ducks, Geese and Hens-ajl.odt (13.5 KB).

LINKS from Robleyd

robleyd

Have you tried looking in the help 1? You might also find the Writer Guide 1 [PDF] a useful resource.

1 Like

As usual, advices are much better when OP mentions OS name, LO version (full version number with 4 components) and save format. I’ll assume you save .odt.

Headers are one of the properties attached to page styles. One page style can have only one header. Consequently, either you create one page style per chapter, but it soon becomes boring if you have tens of chapters. Or you turn your headers into “dynamic” strings with the help of fields.

The latter solution is generally the preferred one but it requires you follow some discipline. The chapter heading can be captured to be inserted into the header. This is done when you apply Heading n paragraph styles to your headings: Heading 1 for chapter titles, Heading 2 for sub-chapters, etc. There is a dedicated field for each level accessible with Insert>Field>More Fields, Document tab, Heading Type to retrieved the heading with or without the chapter number.

Considering your question, I recommend you read the Writer Guide for basic information about styles and fields. Come back here for more specific help.

EDIT 2024-01-14 (after reading the comments below this answer)

Let me summarise the specification:

  • the book contains (3) parts, the heading of which provide right-page headers
  • every part is structured in chapters (which start on a new page, I assume from the following requirement)
  • chapter start page have no header
  • other page headers are book name on left, part name on right
  • illustrated pages have no header nor footer

My suggestion is then to record the book title in File>Properties, Description tab, Title:. The title can be inserted anywhere appropriate, e.g. in the First Page cover page with Insert>Field>Title and then paragraph-styled Title.

Changing the title in the properties automatically updates all the usages in the document.

Story titles are entered in a page of their own (page style to be defined) in a Heading 1 paragraph. Customise Heading 1 for ample spacing above paragraph, font parameters, centre alignment, automatic page break “before” with switch to your page style.

Using Heading 1 captures the story title in a field.

Your chapters start with a Heading 2 paragraph (chapter title/heading). Customise Heading 2 as usual for the required look and in Text Flow force a page break “before” to Default Page Style.

I use Default Page Style as the target page style but if you prefer any else, it is up to you.

Default Page Style Header tab is configured as:

  • tick Header on to enable headers
  • untick Same content on first page
    This “detaches” the first page from the other headers and will allow you to have an empty header.
  • untick Same content on left and right pages
    This makes left and right headers independent from each other.

Create a chapter, eventually with dummy text so that you have at least 3 pages. This assumes you already have a story name otherwise you’ll see disturbing things (though everything will settle down once you have a story name; it is important to respect the hierarchy Heading 1, Heading 2 to ensure there is data at each level).

  • make sure your header is empty on first chapter page
  • in left header, Insert>Field>Title
  • in right header, type two Tab (to right align the header) and Insert>Field>More Fields, Document tab, Heading Type, Heading contents Format (level should be 1, check)

Regarding pages with pictures, they require a dedicated page style. However, your specification is incomplete. If the images are frontispieces, i.e. a picture preceding a chapter start, usually a left page facing chapter start on right, insertion of this page can be automated. Of course, you can leave it empty if you have no image.

Otherwise, full-page images are quite hard to insert automatically. What I mean here is the “natural” page breaks in your book are not predictable (from an author’s point of view). The location where they happen depends on the edits and text updates. Full-page insertions require manual anchor positioning and you must change manually this position after an update (or at least check that changes didn’t move “too much” the anchor, creating nearly empty pages).

Hi Ajlittoz,
Thank you very much for your help. I didn’t manage to work out the ‘preferred’ solution, but on the way found out how to create the one page style per chapter method. I will copy my notes below.

HEADERS FOR BOOKS: One page style per chapter method

(in LibreOffice 4.1.8)

For the right hand header

(1) Styles

(2) Manage Styles

(3) Page Style (click 4th icon from left on top menu)

(4) Right click on blank space in the box

(5) New (style)

(6) The Page Style box opens up under the Organiser tab.

Give the style a name (e.g. The Road to Concord)

(7) It is important to fill in Next Style line below, which will be the left hand header

when you’ve created it

(8) Still in Page Style, click the Page tab and under Layout Settings and choose Mirror

(9) Still in Page Style, click on the Header tab and click in Header On box.

You can make the left hand header in the same way as above, but for a book it will be the same throughout (e.g. The Silk Roads). Always remember to fill in the Next Style line in the Organiser section, which will be the chapter name (e.g. The Road to Concord or The Road to heaven)

You could choose Left Page which is already a style option, right click on it and Modify it. Modifying involves filling in the Next Style box in the Organiser section, changing Page style to Mirror, and having the Header box ticked under the Header tab.

Once you have created the right and left pages you can enter the appropriate text for the left and right headings in the actual document headers. Once they have been entered they repeat until a different chapter heading is required.

Of course the margins for books will be greater on the inside than on the outside. Adjustments can be made in Page Style under the Page tab.

ADDITIONAL INFO

No Header Pages

No Header or Footer Pages

At the beginning of chapter you will not want any header at all. For pictures you will not want headers or footers.

Create New page styles by right clicking in the blank space as in (4) above.

You can call it Right Page No Header, Blank Top & Bottom etc.

Make changes on the Organisation tab, Page tab, Header and Footer tab as necessary.

You will have to insert Manual pages breaks in some situations. Insert them as often as you can.

There is a much simpler way if all you want is different left/right header. This makes only one page style per chapter instead of two.
And if your header(s) can be retrieved from chapter information/book information, then you end up with only one page style for all chapters.
I am busy right now, so have no time to explain. But if you’re still interested when I am back, I can explain the procedure.

Thanks for your suggestion, and I would be interested.
But there is another problem, which is that at the beginning of the chapter, above the words Chapter 1, Chapter 2 etc, there should be no header at all.
I look forward to hearing further from you when you have time.

Just to clarify my problem
The book is a children’s book containing three stories. Each story has about ten chapters. The page headers on the right side should be the name of the story and the page header on the left should be the name of the book.
The first pages of chapters starting ‘Chapter 1’, ‘Chapter 2’ etc should have no header.
Pages with pictures should no header or footer.

I’ve found a way to have no header pages and no header or footer pages. I’ve added the way to do it as ADDITIONAL INFO to my one page style per chapter method above.

Have you read the update to my answer?

Hi Ajlittoz,
I very much appreciate the further detailed instructions you have given. They are very helpful indeed. It will take me a little while to put them into practice, but I get the idea. I hope other people will benefit from them.

Thank you for alerting me to your update, which I had missed!

HEADERS FOR BOOKS: One page style per chapter method (LABORIOUS!)

ADDITIONAL INFO 2024-01-18

For each new page style you have to adjust settings under the following tabs:

ORGANISER tab: Style Name, Next Style

PAGE tab: Paper Format (size). Layout Setting ( mirror ), Margins (inner & outer etc)

HEADER tab On / Off

FOOTER tab On / Off

It is the Organiser info which needs special mental concentration. This is because you have two think not just one page ahead, but two pages ahead.

Page styles require the Next Style box to be filled in. For each chapter I have 9 page styles.
What comes after the ‘>’ sign is what will appear in the Next Style box. But the style name includes this information.
If you haven’t created the Next Style page yet you have to allow Untitled as an option and then come back to update it.

My page stye names for one chapter (‘Friends’ is the Chapter name)

Friends LEFT > Friends RIGHT
Friends LEFT > Friends RIGHT NoHeader
Friends LEFT NoHeaderNoFooter > Friends RIGHT
Friends LEFT NoHeaderNoFooter > Friends RIGHT NoHeader
Friends LEFT NoHeaderNoFooter > Friends RIGHT NoHeaderNoFooter
Friends RIGHT > Friends LEFT
Friends RIGHT NoHeader > Friends LEFT
Friends RIGHT NoHeader > Friends LEFT NoHeaderNoFooter
Friends RIGHT NoHeaderNoFooter > Friends LEFT NoHeaderNoFooter

NOTE It is important to use Manual page breaks. This allows you to choose what next page to have.

Hi Ajlittoz,

Thank you very much for your instructions. I understood using the Title field, but didn’t manage the Chapter fields. As I wanted to get the first draft of the book to the printer without delay I continued with the laborious 9 pages styles per chapter method.

As there have been 120 views of this topic within the last 6 days it might be worth bringing further clarity to it.

Also, when I go on to the next draft of the book it would be helpful to be able to use your method.

Thanks again.

Your design is somehow contradictory: a page style can have only one “Next” style. Therefore, when you write the Friends LEFT NoHeaderNoFooter can have three possible successor, this can’t be automated through the “Next” field. And you note yourself that you must use manual breaks. Consequently, it is pointless to configure the “Next” parameter.

Having 9 page styles per chapter is not really author-friendly. I guess your page styles mainly differ in header/footer contents. Can’t these contents be generated with fields? If the answer is affirmative, the same page styles can be used for all chapters, reducing the total number to 9 (instead of 9 × count_of_chapters.

Are you sure you need 9 page styles? I don’t see any logical pattern in your enumeration. I wonder if your xxx NoHeaderyyy are created to hold full page illustrations. You’re then bothered by the separation of your “main” page styles between LEFT and RIGHT versions. This separation with “Next” alternation management is legitimate when the geometric characteristics of the page are radically different. In most of the cases, using a single page style with Same contents on left and right unticked in Header and Footer tabs is largely sufficient and preferable. With such a page style, when you insert a single “orphan” page with a different page style, the “side” of the original style is automatically selected without problem because it is valid for both. This reduces your need from 9 to 3 page styles (and I bet that with a better description of what you’d like this number ends up to 2).

The Book is for children with illustrations

Page Left/Right Type Header Footer
1 R Chapter 1 No Yes
2 L Illustration No No
3 R Text Yes Yes
4 L Illustration No No
5 R Text Yes Yes
6 L Text Yes Yes
7 R Chapter 2 No Yes
8 L Illustration No No
9 R Text Yes Yes
10 L Blank No No
11 R Chapter 3 No Yes
12 L Text Yes Yes

From what I see (a more thorough analysis is needed for an accurate advice), you need 3 page styles:

  • first chapter page, to force right side, “Next” set to running chapter page
  • running chapter page (don’t worry for “Next”; it is automatically idempotent) with separate header/footer; choice of side variant is automatically managed by Writer
  • illustration page, “Next” set to running chapter page but not really important because your page is not necessarily full and you’ll use a manual page break to switch back to chapter text

Blank pages are automatically inserted by Writer where needed.

1 Like

As a non-academic observer of this thread I find descriptions harder to follow than samples. Using @ajlittoz previous comment and what I gleaned from the thread, I created a test document.

I used 3 page styles, MyChapter, MyText, and MyIllustration, for the three page styles described. I did make MyIllustration to be Left Only as it seemed to be a deliberate choice to have illustrations on the left. I did have to Insert > More breaks > Manual breaks to change the page style where the Next style wasn’t right but that isn’t unknown. Entering a new Heading 1 creates a new chapter on a new MyChapter page.

Make sure Book View is enabled to see the automatically generated blank page.
BookPageHeadersDifferentChapters.odt (63.3 KB)

I slipped on this one. If it is really systematic, this could simplify the design, but as I sketched the suggestion, illustrations can go to a right page without change in the page styles.
However, LO in not ideal for this kind of work. IMHO, a positioning option is missing for frames: something I call “deferred insertion”. You’d define a fixed size for the frame and Writer would wait for the first opportunity to layout the frame. Here the frame height is the key factor. If there is not enough space for the frame at the anchor, subsequent text is added until page break is reached. Then the frame is inserted at top of page and standard operation resumes after it. This is a radical change compared to the present feature where a frame is always set in the same page as the anchor.
With such a new positioning option, there is no need for a specific page style for the illustration.
This was my day dream for today.