Ask Your Question
0

Define Chapter Names

asked 2019-04-01 14:30:50 +0200

Mugsy gravatar image

updated 2019-04-01 14:31:24 +0200

I need to insert the title of each chapter into the header of each page, but all the information on how to do this is either out of date (instructing you to look for menu items that no longer exist) or leave out crucial details (like how to define Chapter Names as a field.)

I already have a Table of Contents with all my Chapter Names, so this shouldn't be that difficult.

So far, I'm able to format the Header (from the "Format Header" drop-down) to size it, set the font and center the text, but anything I manually type in the Header appears above every page.

If I "Insert | Field | Title" (or "Subject" or "More Fields..." | "Chapter Name"), the entry is blank.

Apparently, I need to define what qualifies as a Chapter Name (which I thought I already did using Styles to create my ToC.)

Any help is appreciated.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2019-04-02 08:57:32 +0200

ajlittoz gravatar image

updated 2019-04-02 08:58:02 +0200

Field content for Title and Subject come from File>Properties, Description tab. If you did not fill in this description, the fields are empty. Source for Author is taken from Tools>Options, LibreOffice>User Data.

Chapter name is provided by Insert>Fields>Other or More Fields (no direct access) as @RGB-es wrote. In Document tab, select Chapter type and format as needed. The Level indicates your focus: 1 for latest Heading 1, 2 for latest Heading 2, etc.

However, if the requested level does not exist, you get the immediately existing lower level, eventually nothing if there is no Heading 1 yet.

edit flag offensive delete link more

Comments

I'm not trying to display the author, but thanks for the info.

It sounds like I need to edit the ToC to add "hidden" (non-visible) information that is read when inserting "Chapter" name into the header. If so, I don't know how to do that.

Mugsy gravatar imageMugsy ( 2019-04-02 19:42:39 +0200 )edit

Don't edit the TOC, it has nothing to do with chapter names. TOC is a generated table, the items of which (chapters, sub-chapters, etc.) are collected from Heading n paragraphs in your text. This is the same source as for chapter name for headers.

Follow @RGB-es' procedure. You can also get help from the built-in help (F1)..

In case you still don"t succeed, attach your file to your question.

ajlittoz gravatar imageajlittoz ( 2019-04-02 20:49:31 +0200 )edit

Unfortunately, as noted in my original question, the procedure suggested by @RGB-es ("More Fields" | "Chapter" | "Chapter Name") was tried and does not work. All it does is insert a blank space.

I'm afraid I can not attach my document. It is a book I've written that I'm submitting to publishers. I may try paring it down to a smaller test file.

Mugsy gravatar imageMugsy ( 2019-04-02 22:04:11 +0200 )edit

Is it a blank space or empty? If you get a blank space, the chapter engine captured it, meaning you have a chapter reduced to a space. This calls for careful examination of your chapter arrangements. If the insert is empty, you didn't use correctly the Heading n styles, which seems queer as you have a TOC.

ajlittoz gravatar imageajlittoz ( 2019-04-03 08:07:21 +0200 )edit

(Sorry for the late reply.) I can not tell if the outputed character is an actually space or just empty. I can backspace over it to delete it, or highlight & delete the gray blank to remove it.

Mugsy gravatar imageMugsy ( 2019-04-04 02:07:44 +0200 )edit

Make sure View>Formatting Marks is enabled. Blanks will display with a light gray centered dot.

When backspacing, you delete the field, not just its content.

ajlittoz gravatar imageajlittoz ( 2019-04-04 07:52:25 +0200 )edit
0

answered 2019-04-01 22:07:20 +0200

RGB-es gravatar image

If the TOC works, you don't need to define anything else. Go to Insert → Field → More Fields → Document tab, under Type you can pick Chapter and under Format what you want to be displayed (the chapter name, it's number, etc.). The Level field you find bellow to the right corresponds to the "chapter levels" you find on Tools → Chapter numbering (by default, Heading N paragraph style corresponds to Level N). And that's it: just insert the field you need in the header.

edit flag offensive delete link more

Comments

Thanks for the reply, but as I stated in my question, I tried "More Fields..." | "Chapter Name") and the resulting entry is blank. :(

Mugsy gravatar imageMugsy ( 2019-04-02 03:49:41 +0200 )edit
0

answered 2019-04-02 09:40:48 +0200

Also note that the fields in headers only "know" information about the text that is available in the very first paragraph on current page. That means, that for the following structure:

                Page 1
----------------------------------------
|       Header: <Chapter field>        |
|--------------------------------------|
|           Paragraph 1: e.g. epigraph |
| Chapter 1 (Heading 1)                |
|                                      |
| The rest of page paragraphs go here, |
| up to the end of the page, as Text   |
| Body paragraphs                      |
| ...                                  |
| ...                                  |
| ...                                  |
----------------------------------------
                Page 2
----------------------------------------
|       Header: <Chapter field>        |
|--------------------------------------|
| ... and the first chapter text       |
|  continues here                      |
|                                      |
| Chapter 2 (Heading 1)                |
|                                      |
| The text of second chapter (Text     |
| Body)                                |
| ...                                  |
| ...                                  |
----------------------------------------

... the header of the first page does not know about Chapter 1 on the page: it only "sees" the very first paragraph on the page, which happens to be the epigraph; and since there was no chapters before, the field would be empty. On the second page, the very first paragraph does not define new chapter (it is a continuation of the first chapter); so the header of the second page only knows about chapter 1 which was defined previously - and that is what would be displayed in the field, despite Chapter 2 is later defined on the page.

edit flag offensive delete link more

Comments

When I defined each chapter name to create my ToC (Select text | Insert | ToC & Index | Index Entry), I never assigned a "1st key". Do I need to do this for this to work? And does every chapter get its own key? TIA

Mugsy gravatar imageMugsy ( 2019-04-02 19:53:44 +0200 )edit

Oh! You should have started with that information in the question itself. The chapter is defined by paragraph with outline level 1 - normally assigned by dedicated paragraph styles (Heading 1 ... ) . Manually inserted index entry is a special entity that does not define any chapter by its own - so it's natural you don't get expected results.

Mike Kaganski gravatar imageMike Kaganski ( 2019-04-02 22:30:19 +0200 )edit

(Sorry for the late reply) If I need to create the ToC using another method, I'm not sure how to do that.

Mugsy gravatar imageMugsy ( 2019-04-04 02:04:44 +0200 )edit

You simply type your chapter header as a normal paragraph, and apply Heading N paragraph style. This is the first advice in the Help topic conveniently named "Creating a Table of Contents".

Mike Kaganski gravatar imageMike Kaganski ( 2019-04-04 08:23:54 +0200 )edit

Okay, I'm closer now but still having trouble. I removed all of my prior Chapter Indexes and redefined every chapter title as "Heading 3". I then recreated the ToC to read every Header 3 as the chapter name and it correctly rebuilt my ToC. I then inserted "Chapter Name" ("Field" | "More Fields") in my Header, but it puts the name of Chapter 1 in the header of EVERY page. It doesn't change with each chapter. What did I do wrong?

Mugsy gravatar imageMugsy ( 2019-04-04 20:12:07 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-04-01 14:30:50 +0200

Seen: 67 times

Last updated: Apr 02