Order of entries in Table of Contents

I’m using LibreOffice 7.4.7.2 in Ubuntu 22.10.

In my document’s ToC I’d like the “Index” entry to come last because that’s the correct position in the document (main text, references, notes, index). I generated the index after doing everything else. Now, though the Index comes after “Notes” in the document, it is listed before “References” and “Notes” in the ToC. So, page order shown in the ToC is also wrong.

Thank you.

Please edit your question (= modify it, don’t use a comment at this stage) to give more information on;

  • how you created your references, notes and index
  • which paragraph styles you used for the reference, notes and index headings
  • if you manually edited the TOC
  • if you consistently use styles

If possible, attach a sample file derived from your document with 1 page for the main text (containing at least one note, one reference and one index entry), 1 page for references, 1 page for notes and 1 page for index.

PLease excuse me for not giving the following contextual information
earlier.


A) How I created the References, (Foot)Notes, and (Alphabetical) Index
and what paragraph styles i used for them.

LOexpt0.odt (14.1 KB)

  1. Your index is part of your footnote 1 - and as such, logically belongs to the place in text, where the footnote’s anchor is.
  2. Your “Notes” heading is in a header. Since header is not part of text flow, but a property of a page style, its position could be unexpected (but that is not the problem you described).

Thank you for your comments.

I realize(d) this but didn’t know how to move the index to an “independent” position. Reading your message and the very detailed message by ajlittoz, I see that i need to redo the document, possibly after reading relevant sections of the LibreOffice manual again. Again, I left it at that since it served my purpose. I couldn’t do it any other way that was satisfactory.

I’m trying to understand the structure of your document. It is quite unusual and perhaps faulty.

  • You created a section in order to control where the endnotes appear in the document sequence
  • Footnotes are sent at end of document
  • Endnotes are generated at end of section
  • Your “references” are in fact endnotes

You probably messed up your chapter numbering by applying some direct formatting (with toolbar buttons?). When I change options>Chapter Numbering, your 1.1 heading does not follow the new scheme.

Have you ever forced a numbering restart? because a new chapter added at end numbers from 1!

Endnotes (references): tell me if I am right. Your endnotes automatically appeared at end of your main text section. You put the cursor at end of main text (left of the last paragraph mark before the endnotes. You hit Enter and entered Heading 1 “References”. Since your definition of Heading 1 mandates a page break, all endnotes were sent to next page.
Now a weird thing happened: the page style for the notes was changed to Endnote which is expected when endnotes are collected at end of document but this is strange here because the first line in the page is not a note. You may have uncovered a Writer bug or an unforeseen behaviour due to “courtesy automation intended for Word compatibility”!

Your section ends after the last reference 'endnote) and we’re back in the “standard” data flow. This flow is terminated and footnotes are then displayed (as requested by your configuration). Page style is changed to Footnote as expected, but there is absolutely no indication of it, which may be again another bug in Writer.

To add your alphabetical index, you put the cursor at end of the last footnote, meaning you are inside the note. Presently, there is absolutely no way to add anything after a note page because this is a fake page, residing in some cache, waiting to be displayed. Therefore, anything you type at end of the note extends this note. And as @mikekaganski points out, what you add is in fact logically located at anchor position of the note.

You added Heading 1 “Notes” in the header of a page. This is faulty because a header is repeated on every page. The fact that your notes are only one page long does not change the issue. I don’t know when the heading is scanned for TOC. This may be at time of construction of the page style (first time it is met), every time a new page is needed (thus which instance is retained?) or at time when the page is finalised (then a the very last time the page is seen, then which instance?). A document must not depend on implementation details. Anyway, putting an “active” heading in a footer or header is wrong.

This explains why the order in your TOC is not what you expect.

You can fix your document. You did it partially by constraining your endnotes to end of section.

The same should be applied to footnotes to attempt to group them. However, there is no control to request “at end of section”. All you have is an “at end of text” option. Built-in documentation is very clear about it. End-o-text footnotes will appear on the last page of text provided there is enough room for all of them. If this is not the case, they revert to bottom of page position.

There is no solution for footnotes.

However there are several workarounds. It depends on what your footnotes and “references” really are.

  • your references may be bibliographic entries. Then use the Bibliography feature for them (they will be listed in alphabetical order) and switch your footnotes to endnotes
  • if you want your references in document order with the page number on which they appear, create a user index; this user-defined index can be inserted anywhere, like TOC or alphabetical index; of course switch your footnotes to endnotes

Don’t forget to create an extra empty paragraph before selecting the extent of your main section so that you have at least one paragraph after the section, allowing you to put there your Alphabetical Index and other tables/indices

Thank you very much for taking your time and effort for the detailed description. I need to study each and every one of your comments and, as i mentioned in my reply to @mikekaganski, need to start from the beginning.

Yes, my “references” are endnotes.

I couldn’t control where my footnotes are placed; once i created a separate section for “references”, footnotes moved to the space beyond the “references”!

I prefer “References” (listed in the order of their occurrence in the text) rather than (alphabetically ordered) “Bibliography”.

“Notes” heading appears only once even when i have more than one page of footnotes; i confirmed it earlier since i was apprehensive about that. If i don’t have the alphabetical index then my document works as intended!

I don’t think i applied direct formatting to headings nor did i force a numbering restart. But, as i said above, i will start from scratch and do the whole thing again.

Sorry I could not respond sooner to your valuable feedback. In the last
several days I was preoccupied with other work.

I experimented with LibreOffice quite a bit today. I also looked at a
few books (hardcopies) to see how footnotes, references and indexes are
placed/arranged.

Here are my findings, comments and conclusions.

---- Background info

My goal is for the book to be structured as follows:

  1. Main body
  2. Footnotes (for all chapters)
  3. References (for all chapters)
  4. Alphaberical index (for all chapters)

Footnotes, references and index should have “Heading 1” style and should
appear in the ToC in the above order.

I have not tried using a master document.

I didn’t change any chapter or sub-section heading styles for individual
headings using the tool bar. Nor did i mess with the ToC.

---- I chose the path of least resistance!

Since I don’t know how to achieve what i want and can’t make enough time
for further experimentation, I settled for a simpler alternative:
Footnotes at the bottom of the page (this is easy) and references &
indices at the end of the book.

Making each chapter a section by itself and selecting “Footnotes →
Collect at end of text” (and selecting “Restart numbering”) as in

didn’t work. It put footnotes at the end of the page; numbering was per
chapter but this is not a big deal for me.

As you (@ajlittoz) say, this is what I should have expected: “However,
there is no control to request “at end of section”. All you have is an
“at end of text” option. Built-in documentation is very clear about it.
End-o-text footnotes will appear on the last page of text provided there
is enough room for all of them. If this is not the case, they revert to
bottom of page position.”

Thank you (@ajlittoz) for your last suggestion re. endnotes with the
page number on which appear. For now I’ve decided not to try this due to
shortage of time.

Thank you!

There is no problem with footnotes if you accept to have them at bottom of page => no heading then.

When you generate an alphabetical index, you enter a heading which will be styled Index Heading. Unfortunately, this paragraph style is the ancestor of all other bibliography/TOC/table of xxx headings. Modifying it would lead to undesired effects (the TOC heading would become part of the TOC). Create a dedicated style or use User Index Heading. Apply the style to the alpha index heading. You modify this style in Outline & List tab to attach is to Outline level 1 which is the same as Heading 1.

Endnotes heading is bit trickier. You can’t type it directly because the heading will be entered either outside the part (i.e. before the page break starting the endnotes) or as first paragraph of the first note which therefore will bear the note number. The trick is to add a fake endnote to your document, e.g. at start of the section at end of which the notes will be set. Insert the note with Insert>Footnote & Endnote>Footnote or Endnote so that you can choose explicitly the note number; type the heading. Use a space character. In the Endnotes part, restyle the fake heading note as Heading 1.

It seems it’s possible to use foot/endnotes grouped at the end of a section; then the last paragraph of the section could be a Heading1 “Footnotes”? And then would go the indexes.

AskAboutFootnotesBeforeToC.odt (29.9 KB)

Note that I used endnotes, just because I started with that, but I don’t think that use of proper footnotes grouped at the end of section should be problematic.

@mikekaganski Your sample file missed the fact that OP wants both footnotes and endnotes. You used endnotes for what OP call foonotes and you get the intended result of grouping them at end of section.
It then depends on how “references” are implemented. They were initially endnotes and I suggested to use a user index as a workaround. But this is a poor surrogate because it is very limited in formatting possibilities.

Which bring us back to simultaneous foot-/endnotes. When there are many footnotes in a section, enough to overflow remaining space at end of text, Writer automatically reverts to footnotes at bottom of pages.

I also see that TOC heading is a standard Heading 1 paragraph (with the internal heading in TOC dialog set to “void”). This results in ‘Table of Contents’ being also included in the TOC. I don’t think this is traditional usage in typography. Only OP can tell if this is intended.

1 Like

When you generate an alphabetical index, you enter a heading which will be styled Index Heading. Unfortunately, this paragraph style is the ancestor of all other bibliography/TOC/table of xxx headings. Modifying it would lead to undesired effects (the TOC heading would become part of the TOC). Create a dedicated style or use User Index Heading. Apply the style to the alpha index heading. You modify this style in Outline & List tab to attach is to Outline level 1 which is the same as Heading 1.

But, (at least in my experiments with LibreOffice in the past couple of days) I didn’t face any problem leaving the index heading with style Index Heading. It appears correctly in the ToC. Maybe when i implement this in the big document. If so, I’ll use the above procedure. Thank you!

Endnotes heading is bit trickier. You can’t type it directly because the heading will be entered either outside the part (i.e. before the page break starting the endnotes) or as first paragraph of the first note which therefore will bear the note number. The trick is to add a fake endnote to your document, e.g. at start of the section at end of which the notes will be set. Insert the note with Insert>Footnote & Endnote>Footnote or Endnote so that you can choose explicitly the note number; type the heading. Use a space character. In the Endnotes part, restyle the fake heading note as Heading 1.

Again, this hasn’t been a problem for me, even in real book documents of about 500 pages. I didn’t have to resort to this trick. I am attaching one of my experimental documents.

I’m attaching the odt file.

FNperChapter_RefsAtEnd_FollowedByIndex.odt (13.6 KB)

As @ajlittoz responded, my goal/hope/wish was to collect all three (footnotes, references, and index) at the end of the document, in this order. I don’t think LO allows this. So, i now put footnotes at the end of the page and the remaining two at the end of the document.

@RamkiLO
Your experimental document is OK. I’d suggest two little improvements:

  • add a direct formatting to your 3. References heading to switch to Endnote page style
    This will remove the separator line between “text” area and note area which is needed in your normal text to isolate footnotes.
  • either add a manual page break before your alphabetical index (also reverting to Default Page Style)

Good job anyway

  • add a direct formatting to your 3. References heading to switch to Endnote page style
    This will remove the separator line between “text” area and note area which is needed in your normal text to isolate footnotes.

Thank you for pointing this out. I’d meant to use Endnotes page style for the “references” page(s) but overlooked it until now. I’ve done it now.

  • either add a manual page break before your alphabetical index (also reverting to Default Page Style)

This didn’t work because if i change the Index page (or the newly added blank page before it) to Default Page Style, that changes the preceding page (References) also to Default Page Style and the line below the chapter heading (“References”) reappears!

Good job anyway

Thank you for your help.

I am going to try using a master document to see if i can get all three (footnotes, references, index) at the end of the book, in this order. Most likely that won’t work! If i find anything useful (unlikely) I will report here.

This is because you inserted a “standard” page break Ctrl+Enter. Use Insert>More Breaks>Manual Break so that you can define a transition to a new page style.

Do you need a master document or a template? A master document is useful only when you want to bind together several sub-documents (which generally are common to several synthetic masters). A template initialises an instance of the document with the styles and initial contents of the template. The template can be a skeleton document with already the cover page, your main section with a dummy chapter and your endnotes, a dummy alphabetical index at end. All of this with the required page breaks and page styles already in place. All is left to do is type the chapters and customise the cover page.

This didn’t work because if i change the Index page (or the newly added blank page before it) to Default Page Style, that changes the preceding page (References) also to Default Page Style and the line below the chapter heading (“References”) reappears!

This is because you inserted a “standard” page break Ctrl+Enter. Use Insert>More Breaks>Manual Break so that you can define a transition to a new page style.

This worked. Thank you! I learned that the two ways of inserting a page break are different.

But, why not leave the index page with the Endnote page style (as happens when i change the “References” page to Endnote page style)? What’s the advantage in using “Default Page Style” for the Index page?! (Please ignore if this is an irrelevant/dumb question!)

RamkiLO:

I am going to try using a master document

Do you need a master document or a template? A master document is useful only when you want to bind together several sub-documents (which generally are common to several synthetic masters). A template initialises an instance of the document with the styles and initial contents of the template. The template can be a skeleton document with already the cover page, your main section with a dummy chapter and your endnotes, a dummy alphabetical index at end. All of this with the required page breaks and page styles already in place. All is left to do is type the chapters and customise the cover page

No, i did mean “master document”. I thought using a master document might enable me to put footnotes, references, and the index in this order, at the end of the book. But, this is not the case.

Also, since some of my chapters have quite a few charts, i felt using a master document architecture will simplify file handling. This is correct but it is not so important in my case as to necessitate the use of a master document. So, i will continue with a single odt file.

I will just settle for per-page footnotes, references at the “end of the document”, followed by the index.

I will use the sample file i created for this thread as my template.

Thank you very much for your help.

This is not a dumb question at all.

The answer depends on how structured you want your document to be.

A style (paragraph, character, page, frame, list) is associated with an “object” which has a specific significance for you. For instance, a paragraph is related to your main topic (then Text Body), a comment (a specific paragraph style), a quotation; when it is a heading, you use Heading n. The same holds with paragraph styles (Emphasis, Strong Emphasis, TradeMark, Quotation, Irony, …).

You use page styles in the same way: each one defines a logical part of your document: First Page, Left Page, Right Page, Endnote, Footnote. Generally, you separate these parts with a specific manual page break to tell Writer (or a smarter parsing program) that you enter a different part.

This is why I suggested to change page style between Endnotes and Index even if geometry is the same. I didn’t want to bother you with yet another page style but, again, logically, you should because Index is not the same as the main discourse. Using a dedicated page style allows you to have a different header/footer.

In the end, the decision is yours. If you’re satisfied with Endnote page style also encompassing Index, well OK. But if you want to control very precisely formatting and layout of the document, all the more if it is a long-lived one with multiple updates, it is better to design a carefully crafted collection of styles. But don’t overplay it. You must settle on a balanced number between too few and too many.

Thank you very much for taking the time for such a detailed response and explanation. It is very informative.

In the past, for my most complicated book (in terms of document structure), i used six page styles:

  • NoFooterRight and NoFooterLeft for the title page to ToC,

  • Right Page and Left Page for the main text and appendices and

  • EndnoteRight and EndnoteLeft for the “References” sections.

  • I just noticed that i had used five sections in all in that book!

Maybe that was inelegant. I will try to make it more nuanced based on your explanation.