This part explains how to make an ebook, that is, a valid EPUB ebook, that is, an ebook that will pass the EPUB validator.
I will provide skeletons of the required files and show where to make the changes to make your ebook. You simply make the changes and paste in your chunks of text.
I won't be explaining much about the EPUB standard because I don't know much about it. To get your EPUB geek on, go to the source. All I know is that an EPUB book is a zip compressed folder that contains two folders, META-INF and OEBPS, and a file, mimetype.
The book I will build here consists of parts of the first three chapters of The Strange Case of Dr. Jekyll and Mr. Hyde and has one picture.
You can use this folder called jekyll-hyde as the starter folder for your book. Or you can make a new folder. In this case, copy the META-INF folder and the mimetype file to your book folder and forget about them.
The OEBPS folder will contain your book.
content.opf - EPUB-specified file
toc.ncx - EPUB-specified file
chapter.html - book chapter. You will have multiple files of this type. Each one has a different name.
styles.css - CSS style file
Each chapter in the book is an HTML file. Many but not all HTML and CSS effects work in the ebook.
Below is chapter.html, change the highlighted parts.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />>
<meta name="generator" content="TextEditor" />
<link href="styles.css" type="text/css" rel="stylesheet" />
<h1 id="navigation-index">CHAPTER TITLE HERE</h1>
Change the highlighted parts. Keep the quotation marks.
"TextEditor" is the program you used to create the file.
"styles.css" is the name of the CSS file.
"navigation-index" is an identifier for the chapter and is used in the table of contents. It must be unique .
CHAPTER TITLE HERE is the chapter title.
TEXT HERE is the chapter text as valid html.
Open your html file in a browser. Edit html file, then save it and update the browser to check its progress.
In the jekyll-hyde OEBPS folder, file item_2.html is chapter 1; file item_3.html is chapter 2; and file item_4.html is chapter 3. File item_1.html is the copyright page. File item_5.html contains the credits. The last html file needed is the cover.html file. Open these files in a browser and view the source. Simply, copy and paste your text.
Create and place your book cover image cover.jpg in the OEBPS folder. The file should be in the jpg or png format. The cover size demanded by Apple iBooks is at least 1400 pixels wide. Smashwords recommends 1600 pixels wide x 2400 pixels high.
Now that the book is written, you can complete the content.opf file.
You will need a unique identifier for your book. Each EPUB book is assigned a universally unique identifier (UUID). You can get a UUID online at ITU and paste it into the content.opf file and the toc.ncx file.
<dc:identifier id="BookId" opf:scheme="">urn:uuid:8ffa02e0-1473-11e6-a727-0002a5d5c51b</dc:identifier>
<dc:title>The Strange Case of Dr. Jekyll and Mr. Hyde</dc:title>
<dc:creator opf:role="aut" opf:file-as="Stevenson, Robert Louis">Robert Louis Stevenson</dc:creator>
<dc:contributor opf:role="bkp">Scott-Thaw Company</dc:contributor>
<opf:meta name="cover" content="image_cover" />
<opf:meta name="generator" content="EPUBLib version 3.0" />
"image_cover" is id for the book cover in the manifest coming up next.
The manifest lists all of the resources, pictures, text, etc., used in the ebook.