View Single Post
Old 01-30-2024, 11:46 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,119
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Here is the Adobe help page for exporting to ePub.

As for a guide on how to cleanup what it produces… I’m not aware of one other than the various examples people use here. I’d search the threads for any specific question and then ask if you can’t find it. There are some online tools that claim to do the job automagically… beware, here there be dragons… some may work fine, others could leave you with just as big of a mess as you had to begin with. Also, be aware that you lose all control of your document whenever you upload it to the web…who knows what gets done with it?? That may be an issue if you are working with copyrighted material.

In general, you want to use correct semantic markup and keep it as simple as possible.
- Use a paragraph, <p>…</p>, to denote a paragraph… not a <div>.
- Use a header, <h1-6>…</h1-6>, to denote headers… not a paragraph or div.
- Do NOT use a header <h> just to make a section bold or centered.
- Do NOT use a class to denote the style of a standard paragraph… that should be done in the stylesheet. Eg. Use <p>, not <p class="normalpara">
- Use <em> or <i> to denote emphasized or italic text (there IS a difference) not <span class="italic">; same with <strong> and <b>.

You can use find/replace to cleanup most of that fairly easily. For example:
Find: <div class="para">(.*?)</div>
Replace: <p>\1</p>

There are plenty of techniques people use. I imagine you will get lots of (differing?) advice here. Just try and differentiate when someone is giving a styling preference vs. when they are giving a best practice.

Keeping the styles simple, and the html clean, makes the book much more likely to display properly in the widest number of devices/apps.
Turtle91 is offline   Reply With Quote