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