how to remove duplicate references from a document

I have merged two separate documents with seperate references(endnotes). Now the references have been added up and the numbering is ok. However there were many duplicate references in the two documents which now have two different numbers associated with them. Is there a way to find the duplicate ones and remove one of them so that the numbering does not get messed up. All the references were added manually using add endnote feature in Libreoffice.

Please edit your question to describe, in Writer technical words if possible, what your “references” are. Do you mean footnotes? bokkmarks? bibliography entries? something else?

Assuming that the duplicates now exist as identical endnote entries, so you want to remove the duplicate ones from the end of your document, and have the reference(s) to the removed one changed, to reference the kept one. I also assume that you have not previously inserted multiple references to endnotes (if you have, those need to be handled first, by searching for the referencing fields).

  • Go to the endnotes page and locate a duplicate you want to remove. Tag it for removal, e.g. by inserting a leading * in the note. (The lead-in part identifies each note later.)
  • Click on the reference number for the duplicate which you want to remove.
    The insertion point should now jump to the note anchor in your text
  • Select menu item Insert - Fields - More fields …
  • Select tab Cross references
  • Select type Endnotes, insert as Reference, and pick the duplicate you are keeping (not the tagged one) in the list. Click Insert and Close.
    You should now have one endnote reference in normal size to the left of the insertion point, and a superscripted reference to the right.
  • Hit the Delete key to remove the duplicate.
  • Press keys shift+left arrow to select the reference field you just inserted
  • Press keys ctrl+shift+P to format the reference as suPerscript
  • Go back to the endnotes area and confirm that the note you tagged for deletion is now deleted.

Improvement:

Instead of pressing Ctrl+Shift+P, apply character style Endnote Anchor (or Footnote Anchor, whichever is appropriate, depending on endnote/footnote nature of the reference).

Thus your new anchors are guaranteed to look the same as the “native” ones.

Bonus: it removes a direct formatting case.