Please add the ability in writer to automatically put sections in order according to alphabetization of their headers. This is very useful when merging two documents that have a large number of headers.
Do you mean a Navigator in Writer?
In Writer, you can see all the headers in the Navigator panel in the order of their corresponding sections. Suppose they are not in alphabetical order and you want them, as well as their corresponding sections, to be. Or, maybe you merged two documents by copying one at the end of the other, so now all the second document headers and sections are not merged in alphabetical order with the first. In either case, it would be nice to have a single command that lets the sections be re-ordered alphabetically by the headers, and then also shows the headers in alphabetical order in the Navigator. I have done this in Microsoft Word. As far as I can tell, it can't be done automatically in the current version of Writer. I would find it very useful as I tend to create documents with 50 or more headers.
Sounds like a niche use case to me. Assuming we talk about a master document, and you insert multiple documents/files at once, why is the alphabetical order relevant and not, for example, the date/time of modification? And isn't the move up/down feature sufficient? Or do you just talk about the order of items in the Navigator, similar to headings or bookmarks (bug 160657, bug 86395)?
No feedback, resolving as IND. Please feel free to reopen with further arguments.
I was referring to the order of the headers both in the document itself and in the Navigator. In Microsoft Word, it is possible to put those headers, both in the Navigator and the document itself, in alphabetical (or alphanumerical) order. Is it truly a niche case? I often create note files that have a large number of headers. First, it would be nice to be able to just add new sections with headers either at the top or the bottom of the document and not have to alphabetize manually, but rather do it later with a single command. But even if I alphabetize manually, suppose I later want to merge two lengthy documents with many headers by pasting one into the file of the other. Then I'd like to have all the headers in alphabetical order again. In Microsoft Word, I've been able to do this with a single command. With Writer, it appears to be necessary to do it manually. This is the only feature from Word that I miss, having switched to LibreOffice Writer. Or, suppose I had already alphabetized the headers manually, but then I decide to rename some headers, and I'd like to alphabetize again. To be very concrete, suppose I have one document with headers/sections: Antibodies B cells NK Cells Post-viral conditions T cells and another document with headers/sections: Antibody-dependent enhancement Dendritic cells Interferons Macrophages NK cells Now I merge them by pasting one at the end of the other and have headers/sections: Antibodies B cells NK Cells Post-viral conditions T cells Antibody-dependent enhancement Dendritic cells Interferons Macrophages NK cells Maybe with only 10 headers it seems not burdensome to alphabetize manually, but what if each document has 25 headers/sections? As to why the alphabetical order is relevant, it just gives me an easier way to navigate around the document that's less cumbersome than using search. But it also helps me merge sections with identical headers. In the above example, after the merge I have two headers/sections on "NK cells." I'd like them to appear next to each other to make it easier to merge them into a single header and section of the same name.
(In reply to elkareh from comment #5) > Is it truly a niche case? If you sort chapters by any other criteria but creativity I believe a text processor is the wrong tool. But since Word has the feature, although quite awkwardly realized, we should do as well, at least for feature parity. I suggest to introduce the command .uno:SortChapter that sorts the top-level heading. Or should it also apply to the sub levels? Example: <H1>Lorem<H1> ... <H2>Consectetur<H2> ... <H2>Ami quis</H2> ... <H1>Aluctus<H1> ... => a) Aluctus, Lorem (Consectetur, Ami quis) or b) Aluctus, Lorem (Ami quis, Consectetur) We provide an option to sort alphabetically in the Navigator (done for bug 135043 and other). This wouldn't play nicely with the new command, and either we remove it or make it actually sort. What do you think, Jim?
*** Bug 127497 has been marked as a duplicate of this bug. ***
*** Bug 104255 has been marked as a duplicate of this bug. ***
Some support for sorting in the duplicates. Please comment whether a simple sort A-Z is sufficient or if you also need the opposite order (requires a dialog then), or sorting by some other criteria like number of words (hopefully not).
Created attachment 202555 [details] Test document Some unsorted headings
From my perspective it would already be very helpful to just be able to sort the Header 1 level. I certainly would appreciate being able to go to Header 2 level, but it's lower priority, and I understand that you support people are busy and can't do everything. Ordering alphabetically/alphanumerically is fine and I have never had need for reverse ordering. I'd like to explain why I like to use Writer for virtually every text-related (or text combined with inserted images) purpose I have, even if developers perceive it as a misapplication: it's the longevity and the ease of sharing with others intrinsic to Writer (and all other LibreOffice) documents. I freely acknowledge that I use Writer extensively for what might be termed "note-taking" purposes, hence my massive number of headers. Yes, I could use note-taking software such as Obsidian. I could work in Markdown .md but I'd lose the wysiwyg benefits and inserting images would be clumsier. Writer has some great advantages. I can count on Writer being around years from now; other free software comes and goes. I save and use my files across years, even decades. I need to be confident that I can read my older files without major difficulties. I can share my Writer files with colleagues who use Word. I can't expect everyone I work with to be using the same niche note-taking software that I happen to be using. These are the major attractions of using the LibreOffice suite for as many of my documents and purposes as possible.