What to do about cross-references in an exported EPUB

I have some pre-existing ODT documents that up until now have only ever been exported to PDF, and I am now also exporting them into EPUB. I love that LibreOffice has this built-in. I am very impressed. Was previously using OpenOffice, and have just moved over and loving it so far!

Since these documents are “designed” for PDF, they have a large proliferation of cross-reference links, e.g.:

For more details see “interesting chapter” on page 27.

This arrives in the EPUB as:

For more details see “” on page .

I am looking for advice on how to handle this and hoping that the advice isn’t “just delete all your cross-references”. I can imagine it might be worth deleting all the “on page x” parts of the cross references, because really those are only useful if people are PRINTING out the PDF on actual PAPER! :smiley:

But I would like to find a way to get the link text to remain if EPUB doesn’t support links (is that the case? I don’t know), just so that the sentence still reads OK.

Of course, the ideal would be for cross-references to still work in EPUBs too, but I don’t know whether that is actually supported by EPUBs - it’s all quite new to me.

All advice gratefully received.
Am using Libre Office Version: 25.8.1.1 (X86_64)
Build ID: 54047653041915e595ad4e45cccea684809c77b5
CPU threads: 22; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-NZ (en_NZ); UI: en-GB
Calc: CL threaded

I am viewing EPUBs using a MOON+ reader on a Samsung Phone at the moment, but would also be happy to hear about othe readers that people love - the idea is to make these EPUBs available for a large audience to read.

Cheers,
Morag

First, I never exported to EPUB, so I’ll be of little help.

The EPUB specification states that it is basically XHTML. Consequently, all HTML features should be available in EPUB, notably <a … > elements. It then all depends on how the export filter handles the cross-references. There is also an EPUB publication about Canonical Fragment Identifiers (CFI) which defines how to encode target locations within the document. Once again, this is the responsibility of the export filter to make the correct translation.

Could you attach a 1- or 2-page .odt sample containing a cross-reference and the corresponding EPUB? To attach the EPUB, you may be forced to cheat the AskLO site: just add an .odt or .pdf extension at end of the file name.

You could try Writer2xhtml extension, https://extensions.libreoffice.org/en/extensions/show/writer2xhtml to see if that works better. The user manual, on page 37 says it can do some links that Writer can’t.
Footnotes and endnotes work though so it is surprising that bug tdf#128955 hasn’t been resolved.

You could convert fields to text in LibreOffice.

Maybe Calibre can convert from pdf?