I have a document with a table of contents that won't sort alphabetically.
The TOC has two levels. Both have the sort alphabetically option checked. The second level does sort correctly within each level, but some of the entries on the main level won't sort at all. There doesn't seem to be any rhyme or reason to the way they sort: they just go where they want.
It is easy enough to move the entries around into the correct order, but I'm using the TOC to build bookmarks in the PDF export and the bookmarks for the sections will disappear when I cut and paste part of the TOC.
I've tried things like retyping the headings that are used for the TOC in the document. This fixed some entries, but not all. I've check the language options: the document originally came from Germany, but I've changed everything to English in the document and TOC styles, and by using find and replace on the languages. The order doesn't seem to match German alphabetical order anyway.