Created attachment 200135 [details] Export an EPUB of this ODT file. The chapter names in the TOC will be incorrect. Attached is an ODT file with a few short chapters. The chapter names are styled as Header 2, and consist of readable words. When the EPUB is viewed, the chapter names are only a few characters long, typically the initial letters of one or more words in the title. For example, the first chapter is Something New, but appears in the EPUB table of contents as simply "S". Examining toc.xhtml inside the EPUB file, the chapter name has become <a href="sections/section0001.xhtml">S</a> Inside section0001.xhtml, the "S" has been separated from the "omething new", as shown here: <p class="para0"><span class="span0">S</span><span class="span0">omething new</span> A user, while using Writer, will see this as "Something New", but the resulting EPUB table of contents will have only the letter "S" as the chapter name. The problem may have arisen as the Header 2 was edited and re-edited, causing Writer to have broken the words into more than one span. I'm guessing that the ideal solution would be to join consecutive <span>s if they have the same attributes, but this would be a bigger fix than just EPUB export.
Confirmed. Actually the issue of having multiple <span>'s affects other applications such as tokenizers for computer aided translations tools. To merge several <span>'s you can use "Clean direct formatting (Ctrl+M)" before EPUB export. Admittedly it can be tedious. Version: 25.2.2.2 (X86_64) / LibreOffice Community Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac CPU threads: 12; OS: Linux 6.11; UI render: default; VCL: kf5 (cairo+wayland) Locale: en-US (pt_BR.UTF-8); UI: en-US Calc: threaded