I’m exporting from LO writer to epub, and looking at the output in sigil. There’s a lot of superfluous span tags in the output. I’ve since learned that this happens, among others, when you use manual formatting, so I stopped doing that. I now use paragraph and character styles exclusively. However, there still are these superfluous tags, and they seem to be a result of editting the document (ie, cutting a word, pasting it elsewhere, inserting characters, etc…).
Is there a way to disable the creation of these span tags? They add considerable bulk to the exported epub, and lead to rendering problems on certain ereaders.
As an example, here’s a fresh text document that I created, pasted in some lorem ipsum from the web, and then I cut&pasted a word and inserted some characters elsewhere. I didn’t do any formatting, just entering and editing text.
test.odt (9.9 KB)
Looking at the epub, there’s the superfluous span tags:
<p class="para0"><span class="span0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sit amet ipsum augue. Cras dolor lectus, congue vel interdum eu, pharetra eget magna. Nulla non vulputate magna, sed egestas metus. Sed eget porttitor augue. Aenean augue elementum sit amet tristique lacinia. Integer iaculis ipsum turpis, sit amet bibendum velit semper eget. </span><span class="span0">Invoegen c</span><span class="span0">urabitur vel nulla et mauris vestibulum iaculis sit amet sed nibh. Etiam egestas condimentum lacus vitae interdum. Donec molestie vel lacus et bibendum. Sed bibendum sem vehicula mi maximus, vitae semper enim lobortis. Vestibulum quis tellus tortor.</span></p>
(sorry, this forum doesn’t allow me to upload the .epub )
This should really be just one paragraph with one span tag.
Saving as flat xml (.fodt), I can see the tags are there as well, with style T1:
<text:p text:style-name="P1">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sit amet ipsum augue. Cras dolor lectus, congue vel interdum eu, pharetra eget magna. Nulla non vulputate magna, sed egestas metus. Sed eget porttitor augue. Aenean augue elementum sit amet tristique lacinia. Integer iaculis ipsum turpis, sit amet bibendum velit semper eget. <text:span text:style-name="T1">Invoegen c</text:span>urabitur vel nulla et mauris vestibulum iaculis sit amet sed nibh. Etiam egestas condimentum lacus vitae interdum. Donec molestie vel lacus et bibendum. Sed bibendum sem vehicula mi maximus, vitae semper enim lobortis. Vestibulum quis tellus tortor.</text:p>
(sorry, this forum doesn’t allow me to upload the .fodt )
Short of going through the document with ctrl+M every time before I export, is there anything I can do to prevent this pollution from occuring?