When I got into creating my own e-pubs I originally created them from .ODT files and ended up with an average 50,000 word story running into 1.3 MB in size. Then when I started creating them from .HTML files I'd created the size dropped to half of that at about 0.68 MB. I moved on to creating my own e-pubs from a .HTML file using my own CSS code embedded in the file which covered every type of paragraph I used in the story, and the file size dropped to 0.25 MB. Thus my current method results in a file that's about 20% of what I get if created directly from the word processing file. I'm sure the readers prefer the much smaller files to download and use less space on their devices drives.
Note: I use html span commands for bold and italic text as well as colours.
However, I recently found that there is a worse way to create an e-pub file from a source document than direct from .ODT. I recently helped another author to create a new e-pub file for his document. His original e-pub had been created directly from his .DOCX file and it came out at 11.2 MB. After I worked on his story file to create an e-pub with my process the .HTML came out at 0.87 MB which is 7.8% of the original e-pub.
That's such a significant change I thought I'd mention it to all of you authors out there.
Note: What I did to his file is a bit more than a straight conversion to .HTML and the full details are listed below with the reasons.
1. There were no defined styles in the original document so I created the paragraph styles used in the story and I applied them to the paragraphs then saved the file as his preferred .docx - Note: This reduced the .docx text file by 45%. The styles were: Default for the general story text, Centered without italics, Centered with italics, Heading for the Title page story title, Heading 1 for chapter headings, Quotation for quotes which is aligned left (becomes blockquote in html).
2. The original text file had embedded fonts - I stopped the embedding of the fonts as the e-pub readers will usually override the e-pub font with the user's preferred font. Thus it's best not to have any fonts specified in the e-pub file. I don't know how much this would've affected the file size, but I'm sure it would've had some effect.
3. I saved the file as .HTML then used my scripts to strip out all of the excess format code, including the font type and size designations. Ran the script to convert all of the required font commands for bold and italics to span commands. Opened the .HTML file to add in my CSS code to the file instead of as a separate file to be called. This resulted in a file of 0.56 MB which is down from the 0.93 MB of the original .DOCX file and up a bit from the 0.49 MB of my revised .docx file.
...............
Yes, there's a few steps and each change has an effect on the final product, but in this case the result is very dramatic. The change is so big I felt I should mention it for you all to know about and consider how you create your e-pubs.
If anyone is interested in seeing how the process works on their e-pubs I'm prepared to apply my system to a file for you, so contact my by PM if interested. It will probably take a few days to do as I'd fit it in my schedule as a medium priority issue.
typo edits