HTML, XHTML, & CSS All-in-One For Dummies®, 2nd Edition. Published by. Wiley Publishing, Inc. River Street. Hoboken, NJ ruthenpress.info com. Published on the 07 January in Writing and tagged ebooks, self-publishing. This post is about the baffling world of ebook formats, and what I learned while wrangling my book into shape. The formats that you would ideally create for ebooks are PDF, EPUB – used by devices such. Get More and Do More at ruthenpress.info® ISBN (pbk); ISBN (ePub); ISBN Chapter 1: Sound HTML Foundations.
|Language:||English, Spanish, French|
|Genre:||Academic & Education|
|Distribution:||Free* [*Register to download]|
Ebook Basics: Understanding HTML, XML, CSS, ePub, for beginners. 1. Under the hood – Getting techie; 2. What is an ebook? Digital. Learn the relatively simple steps you can take to build an EPUB file out of HTML and XML files. Collection of free HTML and CSS books. Download (pdf, epub, mobi) and read online. Update of June collection. 7 new books.
Although the OCF file is defined as part of EPUB itself, the last major metadata file is borrowed from a different digital book standard. DAISY is a consortium that develops data formats for readers who are unable to use traditional books, often because of visual impairments or the inability to manipulate printed works.
The NCX defines the table of contents of the digital book. In complex books, it is typically hierarchical, containing nested parts, chapters, and sections. Listing 8. This element should match the dc:identifier in the OPF file. This example has only one level, so this value is 1. It's okay to be confused, as both files describe the order and contents of the document.
The easiest way to explain the difference is through analogy with a printed book: The OPF spine describes how the sections of the book are physically bound together, such that turning a page at the end of one chapter reveals the first page of the second chapter. The NCX describes the table of contents at the beginning of the book. The table of contents always includes all the major sections of the book, but it might also list sub-sections that don't occur on their own pages.
The navMap is the most important part of the NCX file, as it defines the table of contents for the actual book. The navMap contains one or more navPoint elements. Each navPoint must contain the following elements: A playOrder attribute, which reflects the reading order of the document.
This follows the same order as the list of itemref elements in the OPF spine. This is typically a chapter title or number, such as "Chapter One," or—as in this example—"Cover page. This will be a file declared in the OPF manifest. It is also acceptable to use fragment identifiers here to point to anchors within XHTML content—for example, content.
Optionally, one or more child navPoint elements. Nested points are how hierarchical documents are expressed in the NCX. The structure of the sample book is simple: It has only two pages, and they are not nested.
That means that you'll have two navPoint elements with ascending playOrder values, starting at 1. In the NCX, you have the opportunity to name these sections, allowing readers to jump into different parts of the eBook. Adding the final content Now you know all the metadata required in EPUB, so it's time to put in the actual book content.
You can use the sample content provided in Downloadable resources or create your own, as long as the file names match the metadata. Next, create these files and folder: title. This file can contain any CSS declarations you like, such as setting the font-face or text color.
See Listing 10 for an example of such a CSS file. Use this sample for your title page title. Listing 9. Sample title page title. Use IDs to refer to anchors within content. Listing 10 demonstrates a simple CSS file that you can apply to the content to set basic font guidelines and to color headings in red. Listing Sample styles for the eBook stylesheet.
If you create technical documentation, this is probably not relevant, but developers who build EPUBs in multiple languages or for specialized domains will appreciate the ability to specify exact font data. You now have everything you need to create your first EPUB book. In the next section, you'll bundle the book according to the OCF specifications and find out how to validate it. This bundle will either be a new book that you created yourself or one that uses the raw files available from Downloadable resources.
The mimetype file must not be compressed. The ZIP archive cannot be encrypted.
Using ZIP version 2. These commands assume that your current working directory is your EPUB project. In the second, you add the remaining items. The flags -X and -D minimize extraneous information in the. Make a final check with the EpubCheck package see Related topics.
It is a Java program that can be run as a stand-alone tool or as a Web application, or you can integrate it into an application running under the Java Runtime Environment JRE version 1. Running it from the command line is simple. Listing 12 provides an example. Sample errors from EpubCheck my-book. Do the stylesheets work properly?
Are the sections actually in the correct logical order? Does the book include all the expected content? Several EPUB readers are available that you can use for testing. Figure 1. ADE is not correctly rendering the title in a sans-serif font, though, which might be a problem with the CSS.
You don't have to use the cover image as your title page, but most people do. Change the highlighted part to point to your cover image: Here is a sample with two elements in the table of contents. Change the highlighted parts to your book, and add additional navPoint elements for additional sections: In your text editor, create a file called container.
The file should read: This is the file that explains what your epub book is. It includes metadata about the book like the author, publish date, and genre. Here is a sample, you should change the parts in yellow to reflect your book: We like to then go to the container directory and make sure it has a name that reflects the title and author names.
This metadata typically contains Dublin Core metadata , but can contain any metadata as long as the schema is defined. Therefore EPUB 3 can be perceived as a way to distribute web content offline and includes unique features that make the EPUB 3 format more suitable for page-by-page consumption and academic settings. EPUB 3 is a viable content distribution format because it: allows ease of offline access to content, provides native content ordering and navigation, is being consumed by an increasingly large group of people, at an increasing rate, as a result of the prominence of e-readers source , offers additional semantics that help describe text structure and function, and helps give content authors a platform to seamlessly include rich features such as text-to-speech, content narration, and media alternatives.
Due to the wide variety of personal devices available, the different environments in which users consume content, and the varying ability of each user given their context and environment, publishing a single book that can be used across this spectrum can be challenging.
To improve an EPUB 3 book's utility across all these devices, environments, and contexts - the following is a guide to help an EPUB 3 author create more inclusive publications.
Broadly, the approach to making an inclusive EPUB 3 publication takes the following into account we will go into more detail on each point shortly : Content is composed and structured in well-formed HTML 5 using standards-compliant formatting and appropriate usage of HTML 5 semantic markup and tags. Visual styling is done using CSS 2.