LibreWriter: convert footnotes into endnotes or vice versa? Plus: macOS workflow to convert manually

Is there a way to convert footnotes into endnotes or vice versa in LibreWriter?

You can change the settings to display footnotes at the end of the document, but there’s no conversion.

In an old discussion I found a hint to edit an odt’s content.xml, so I created a workflow for macOS that will do that, i.e. convert footnotes <> endnotes (odt & fodt):

But it would be better, if you could do it from within LibreWriter. Any chances of this being implemented in the future? It seems to be quite easy to do such a conversion. Or has it already been implemented, and I just didn’t find it?

1 Like

See also tdf#89352.

From what I understand of LO (I’m neither a guru nor a developer), no conversion is at stake because there is basically no difference between footnotes and endnotes. The note paragraph is tagged with a style name which is defined by ToolsFootnotes/Endnotes... settings. There you have two tabs for customizing two behaviours. Whether they dictate the set notes at the bottom of the page or at end of a document is a matter of setting a flag (clicking on a radio button). Both settings may result in the same layout despite the names.

Of course, if you use Endnote style for a foot note results in user confusion.

In your case, either you misused the style or started your document with one layout and later changed your mind, it does not matter.

What you really ask for is the ability to change globally the name of a style to avoid to hunt all occurrences.

Have you tried EditFind & Replace..., More options, clicking Look for paragraph styles? You select the offending paragraph style from the Find drop-down menu and the replacement paragraph style in the Replace drop down menu.

If this answers your question, please tick the check mark and close the question for community benefit. If you find it valuable, be kind enough to upvote it if you have enough karma.

Thank you, but that’s not what I’m looking for. I know how to change/find/replace styles. When you look at the xml of an OpenDocument file, you’ll see that there is a distinct difference between footnotes and endnotes, independent of the style: the former have note-class="footnote", and the latter have note-class="endnote". So the feature request, if it hasn’t been implemented yet, is a function to change the note class, not the note style.

You’re right. I never noticed before how the two tabs were different and my trick does not work because of that.

Go to the first footnote/endnote anchor → Right click → Footnote/endnote. On the menu you get, you can switch between footnote and endnote just by changing the “type”. There is no need to press OK because the change is immediate: just use the arrows to navigate to the next note.

Thank you… yes, I knew about that as well. For the occasional note it’s probably fine, even though the right-click contextual menu isn’t always accurate (often missing the footnote/endnote menu item… but it’s not a good option for articles/chapters/books with hundreds of footnotes. In these case you’d want a single command to convert all footnotes to endnotes (and/or vice versa) in one shot.

AFAIK, there is no way to do this “on one shot”, sorry: you need to “hack” the ODT file by editing content.xml with a text editor and changing by hand the “note-class” tag.

Ah, OK, that’s what I feared. You can easily replace everything at once with the sed command, which is what I did in the workflow. So I’ll send them an “enhancement” bug report.

So the answer is that there is no (official) solution (yet). There isn’t a one-shot-convert function in Writer (yet), so I can only suggest that you use the nnConv script (renamed from “LOconv”), which will automate the xml hacks for you. It will work on odt and fodt.

  • distro contains a workflow version and shell script with osascript prompts (both for macOS)
  • repo also contains a separate *nix shell script that should work for macOS/Linux/BSD etc. purely on on the command line (tested only on macOS)

It doesn’t work on docx files, and probably never will, because that document format is just plain insane. The solution would be to write in odt or fodt format and just export/save as docx, if you need MS Office compatibility, or even as doc, if your work needs to be imported into e.g. InDesign.

How about this?

Edit: For convenience and to avoid a possible problem if the link dies, here’s the answer from the link:

Try going to Tools / Footnotes & Endnotes. Select the Footnotes tab. Change the selection from “end of page” to “end of document”. It changed all of mine in the whole document, just like I was hoping for.

1 Like