Chapter number to follow after the chapter name

Discuss the word processor

Chapter number to follow after the chapter name

Postby rdenbak » Tue May 12, 2020 9:11 pm

Hi, I'm trying to get my head around the following: I want the chapter number to follow the chapter name in such a way that I can use the chapter number (not the chapter name) in the Header of the document.
So for example the chapter titles of a couple of chapters can be:
Amy goes to school - 1
Amy goes on holiday - 2
Amy stays with her grand-parents - 3

The headings of the pages should follow the numbering of the chapters, prefixed with a fixed text: "Chapter " and then followed by the actual number of the current chapter, i.e.:
Chapter 1
Chapter 2
Chapter 3

If tried many ways, but I fail to get this done. Can anybody help me?
OpenOffice 4.1.7 - Windows 10
rdenbak
 
Posts: 4
Joined: Tue May 12, 2020 8:56 pm

Re: Chapter number to follow after the chapter name

Postby JeJe » Tue May 12, 2020 10:22 pm

Explained in the help file.

Edit.
For the first step 4 don't type anything
Type "Chapter " in the header and add a field with just the Chapter number after it.

Inserting a Chapter Name and Number in a Header or a Footer
Before you can insert chapter information into a header or footer, you must first set the outline numbering options for the paragraph style that you want to use for chapter titles.
To Create a Paragraph Style for Chapter Titles
1. Choose Tools - Outline Numbering.
2. In the Style box, select the paragraph style that you want to use for chapter titles, for example, "Heading 1".
3. Select the numbering style for the chapter titles in the Number box, for example, "1,2,3...".
4. Type "Chapter" followed by a space in the Before box.
5. Enter a space in the After box.
6. Click OK.
To Insert the Chapter Name and Number in a Header or a Footer
1. Apply the paragraph style that you defined for chapter titles to the chapter headings in your document.
2. Choose Insert - Header or Insert - Footer, and then select the page style for the current page from the sub-menu.
3. Click in the header or footer.
4. Choose Insert - Fields - Other and click the Document tab.
5. Click "Chapter" in the Type list and "Chapter number and name" in the Format list.
6. Click Insert and then click Close.
The header on every page that uses the current page style automatically displays the chapter name and number.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1146
Joined: Wed Mar 09, 2016 2:40 pm

Re: Chapter number to follow after the chapter name

Postby JeJe » Tue May 12, 2020 11:43 pm

Unless anyone knows better, there doesn't seem to be a way to change it so that the chapter number in the heading is after the heading text instead of before.

If you have to have it that way you can add a chapter number field at the end of every chapter heading.
There is still the problem of the chapter number appearing before the heading - that can be hidden by setting the numbering character style to one with white text so the number isn't seen. See attached doc.
Attachments
Chapter nos.odt
(9.26 KiB) Downloaded 17 times
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1146
Joined: Wed Mar 09, 2016 2:40 pm

Re: Chapter number to follow after the chapter name

Postby Bill » Wed May 13, 2020 10:51 am

JeJe wrote:Unless anyone knows better, there doesn't seem to be a way to change it so that the chapter number in the heading is after the heading text instead of before.

Chapter numbering is basically paragraph numbering, so I don't believe that it would be possible to put the automatic chapter number after the chapter name.

JeJe wrote:If you have to have it that way you can add a chapter number field at the end of every chapter heading.
There is still the problem of the chapter number appearing before the heading - that can be hidden by setting the numbering character style to one with white text so the number isn't seen. See attached doc.

This worked for me with limited testing when saving in .odt format, but in .doc format the chapter number field in the header of the first chapter displayed "2" instead of "1".
AOO 4.1.7, LO 6.3.6.2 and LO 6.4.3.2 on Kubuntu 20.04
Bill
Volunteer
 
Posts: 7865
Joined: Sat Nov 24, 2007 6:48 am

Re: Chapter number to follow after the chapter name

Postby rdenbak » Wed May 13, 2020 6:14 pm

JeJe wrote:Unless anyone knows better, there doesn't seem to be a way to change it so that the chapter number in the heading is after the heading text instead of before.

Thanks for helping. I was aware of the Help text, but that did not solve the problem for me since I too could not get the number after the Paragraph heading.
I might need to seek for another solution to bypass this problem.
Again thanks for helping.
OpenOffice 4.1.7 - Windows 10
rdenbak
 
Posts: 4
Joined: Tue May 12, 2020 8:56 pm

Re: Chapter number to follow after the chapter name

Postby Hagar Delest » Wed May 13, 2020 7:37 pm

It should be possible by using the trick explained in this tutorial: [Tutorial] "In-line" or "run-in" headings.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Chapter number to follow after the chapter name

Postby Bill » Wed May 13, 2020 9:10 pm

Another possibility: Insert the normal chapter title, then cover (hide) it with a frame containing a chapter name field and a chapter number field. After inserting and formatting the frame over the first chapter title, it can be copied and pasted over the other chapter titles.
Attachments
Chapter_Name_Frame.odt
(9.57 KiB) Downloaded 15 times
AOO 4.1.7, LO 6.3.6.2 and LO 6.4.3.2 on Kubuntu 20.04
Bill
Volunteer
 
Posts: 7865
Joined: Sat Nov 24, 2007 6:48 am

Re: Chapter number to follow after the chapter name

Postby JeJe » Wed May 13, 2020 9:25 pm

A slightly better way of hiding the Chapter number than my earlier white text method is possibly to indent the first line of the paragraph so it is off page.
Attachments
Chapter headings indented.odt
(9.48 KiB) Downloaded 14 times
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1146
Joined: Wed Mar 09, 2016 2:40 pm

Re: Chapter number to follow after the chapter name

Postby RoryOF » Wed May 13, 2020 9:55 pm

The Amy... lines are easier if you decide to use this format
1 - Amy ...
2 - Amy ...

that is, place the chapter number before the chapter title.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31416
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Chapter number to follow after the chapter name

Postby JeJe » Wed May 13, 2020 10:20 pm

Hagar Delest -
An all white text paragraph above is an interesting idea - a paragraph style with hidden text above works as well, and there isn't a visible line above.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1146
Joined: Wed Mar 09, 2016 2:40 pm

Re: Chapter number to follow after the chapter name

Postby Hagar Delest » Wed May 13, 2020 10:57 pm

I think we had this discussion at that time and IIRC a hidden paragraph style leads to... no entry in the ToC.
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Chapter number to follow after the chapter name

Postby JeJe » Wed May 13, 2020 11:48 pm

If I set heading 2 paragraph style font effects to hidden the TOC in that document you posted a link to works fine.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1146
Joined: Wed Mar 09, 2016 2:40 pm

Re: Chapter number to follow after the chapter name

Postby Hagar Delest » Thu May 14, 2020 4:13 pm

Sure?
Have you updated the ToC? I just tried and the links disappear from the ToC. Can you upload a document that works so that I compare?
AOO 4.1.7 on Xubuntu 20.04 and 4.1.5 on Windows 10 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28951
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Chapter number to follow after the chapter name

Postby JeJe » Thu May 14, 2020 4:37 pm

You're right the links disappear from the ToC if you update it - so you'd have to turn the hidden effect off while you update the ToC.
Openoffice 4.1.6
Windows 8
JeJe
Volunteer
 
Posts: 1146
Joined: Wed Mar 09, 2016 2:40 pm

Re: Chapter number to follow after the chapter name

Postby keme » Thu May 14, 2020 5:34 pm

It is possible, sort of. Much like the second post from JeJe above, but with some "control bits" added, and with a more intuitive workflow (methinks) than the solution for "inline headings".

  • Activate numbering for headings. Numbering followed by space, right aligned to zero, with zero indent. (Later you can adjust from this starting point.)
    When you right align the numbering, it does not interfere with placement of heading text. This may be confusing until you get the mindset. Without this, headings from 10 upwards may appear misaligned, depending on what other settings you have for font size and spacing.
  • Set character style for numbering to background color (usually white).
  • Create a new paragraph style - named say Heading repeat - based on Heading 1, but do not change any settings.
  • Create a frame without borders and without spacing, anchored as character, no spacing, bottom aligned to baseline, automatic heigth and width.
  • Place that frame on the end of the heading line.
  • Insert Chapter number field in the frame using the Heading repeat style you just created.
  • Copy that frame, and paste it into each heading where you want the numbering to appear.
With this, you get a numbering which does not interfere with ToC because it is "shielded" inside a frame. If you change the heading style, the numbering will follow suit, because its style is a clean link to the heading style.

I attached a template file which illustrates this. I made the numbering character style light grey so you see everything. Change that to white and you have your workaround.
 Edit: Forgot the page header, but I guess you'll figure that out... 


Should someone test the template in other office suite incarnations, note that LibreOffice sometimes displays erratic behavior when you adjust placement of outline elements. The attached template works fine as it is in LO, but does not react consistently to editing of those settings.
Attachments
NumberBackwards.ott
(10.61 KiB) Downloaded 14 times
User avatar
keme
Volunteer
 
Posts: 3367
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway


Return to Writer

Who is online

Users browsing this forum: No registered users and 14 guests