E-publishing: Technical guidelines for Publishers in Wales

Welsh Books Council

E-publishing: Technical guidelines for Publishers in Wales

1

E-publishing: Technical guidelines for Publishers in Wales

Produced by Bangor University’s Languages Technologies Unit for the Welsh Books Council

Version 1: February 2012 

Part I: General Guidelines

I.1 Overview

I.2 EPUB: standard and format

I.3 Digital Rights Management (DRM)

I.4 Gardners Distributors

1.5 Creating EPUB files

I.6 Adobe InDesign

I.7 Opening and converting EPUB files

I.8 Contents of an EPUB file

I.9 Converting EPUB to other formats

I.10 Character Encoding

Part II: Instructions for creating an EPUB eBook in InDesign

II.1 Creating a document

II.2 Creating the text field

II.3. Adding pages

II.4 Add title and copyright text

II.5 Setting the basic style for the eBook text

II.6 Setting a style for the title and copyright text

II.7 Add page break

II.8 Adding text paragraphs

II.9 Adding accented characters

II.10 Adding bold, italic and underline etc. styles

II.11 TOC (Table of Contents)

II.12 Producing the EPUB eBook

II.13 Validation

II.14 Further checking 3

Part I: General Guidelines

I.1Overview

The Welsh Books Council intends to offer eBooks to the public through its Gwales website, and to encourage booksellers who have commercial websites to do likewise. To this end it has appointed Gardners as its eBooks supplier. Gardners will accept files in EPUB format from publishers to be published as eBooks using the Adobe DRM system to ensure that their digital rights are protected.

The aim of this document is to provide instructions and guidelines to help Welsh publishers produce EPUB format files that can be transferred to Gardners for encryption and distribution. Creating books in EPUB file format will also aid publishers to produce eBooks in other common eBook formats.

Some previous experience of HTML and CSS would be beneficial to those preparing the EPUB files.

I.2 EPUB: standard and format

An eBook file is considered to be in EPUB format if the file and its contents conform to the EPUB standard developed by the International Digital Publishing Forum.

This standard is being continually developed. Version 3.0 of the EPUB standard was published as this document was being written. These guidelines, however, will concentrate on version 2 of the EPUB standard as it remains the most commonly implemented version of the standard.

The EPUB standard is developed through consensus by the IDPF members. Membership of the IDPF includes organisations such as Apple, Adobe, Barnes & Noble, Google, Disney, and Nokia. Membership is open, and anyone may join the forum on payment of an annual fee by filling the application form on this web page: http://idpf.org/membership/application. Although it is not necessary to become a member in order to use the EPUB standard, membership allows the possibility of influencing the development of the standard in future (e.g. in order to include features which may be important the publishing industry in Wales).

EPUB is an open standard. This means that:

it is available for all (http://idpf.org/epub)

there is no need to pay a licensing fee in order to use it

it is not owned by a commercial company or organisation

it is possible to contribute to it, if desired.

4

The structure of the contents within EPUB files is based on a restricted subset of HTML, the technology commonly used to create website structure and content. By restricting the format to a subset concerned with the features needed for presenting book contents, EPUB 2.0 ensures that EPUB eBooks can be shown on fairly simple eBook reading devices. The EPUB standard aims to define an open, standard format that enables text, images and book pages to flow and reflow appropriately on many different types of e-readers, both hardware and software, whatever their size, the nature of their interface, the type of screen used, or their ability to display colour etc.

II.3 Digital Rights Management (DRM)

DRM is the acronym for software that enables the owners of intellectual property rights for specific digital medium items (such as music and eBook files) to control their distribution beyond their initial transfer to the customer. For example, DRM may function by restricting the number of copies that can be made of an item, or by restricting the number of different devices that the item may be shown or played on. The DRM used for eBooks tends to be independent of the eBook format. For example, several DRM types are available for the EPUB format, but DRM does not have to be used at all if it is not required.

The eBook DRM provided by the Welsh Books Council through agreement with Gardners is Adobe DRM. This is the DRM used by many leading companies.

At present, of all eBooks protected by DRM, EPUB with Adobe DRM is the one supported by the widest variety of e-reading devices and software on the market.

A list of the current e-readers and software compatible with Adobe DRM may be found on the following website:

http://blogs.adobe.com/digitalpublishing/supported-devices

If the publisher does not consider digital rights management to be a priority, it is possible to publish EPUB files without any DRM. This means that the eBook would work with e-readers or software that support EPUB but are not compatible with Adobe DRM. Also, the Calibre program can be used to convert an EPUB file into a MOBI format. This will permit it to be distributed without DRM on Kindle e-readers or software. Any publisher who intends to do so should consider the implications of this decision carefully; once copies are distributed without DRM it will not be possible to use DRM on them in future. 5

Amazon is the only company that can distribute eBooks for Kindle devices or software with DRM enabled on them. Other providers can create eBooks that may be read using the Kindle, independently of Amazon, but DRM cannot be installed on these books.

I.4 Gardners Distributors

Publishers wishing to distribute their eBooks through the Welsh Books Council’s Gwales website need to make arrangements with Gardners to transfer their EPUB files to them. Gardners will provide publishers with further directions on how to do this.

To make arrangements with Gardners for file transfer, contact:

Ali Balaban

Gardners Books Ltd

eBook Buyer

1 Whittle Drive

Eastbourne

East Sussex

BN23 6QH

Work: 01323 521555 Est 42052

Mobile: 0788 7951280

ali.balaban@gardners.com

Gardners will install DRM on the eBook enabling it to be distributed though the Gwales website, bookshop websites, and libraries that have accounts with Askews.

The DRM installed on the eBook imposes restrictions on every copy bought by customers on the Gwales website.

See the FAQs section of Adobe Digital Editions for further details:

http://www.adobe.com/products/digitaleditions/faq/

There is a risk attached to providing Gardners with Welsh-language books as PDFs or images, despite the following information on their website:

Digitise your hard copy using a proven process of scanning, OCR proofing and tagging. This process has an accuracy level of less than 20 defects in a million characters which amounts to 99.998% accurate content.

http://www.gardners.com/gardners/content/Publishers/Digital_Warehouse/Digital_Corp_Brochure.pdf

This process is not suitable for Welsh, as the OCR scanning software used was trained on English letter combinations. 6

1. The text within a PDF document may be saved as an image of the text rather than a series of digital characters.

2. PDF documents tends to save document text line by line, placing hard stop at the end of each line. This stops text from flowing when converting from one format to another.

Although Gardners are correct in saying that the results from using OCR software are very good for English, it is not perfect method. For example, in the Amazon eBook version of A Clash of Kings: Book Two of A Song of Ice and Fire by George R. R. Martin, there is an example of the word ‘litter’ wrongly converted as ‘Utter’:

and a mother cat with a Utter of new-born kittens.

Location 3750 3754

This error is typical of scanning errors. To the computer, 'li' looks similar to ‘U’. A human editor would not have added this error. For the reasons listed above, we recommend that PDFs of Welsh books are not sent to Gardners for converting to eBooks by using OCR.

I.5 Creating EPUB files

Although EPUB files can be created manually by using a simple text editor such as Notepad [jedisaber.com epub], it is usually quicker and easier to use software created or adapted just to produce eBooks in that format.

In order to convert a book already prepared for printing into an eBook, traditional desktop publishing software such as Quark and InDesign are now able to produce eBook versions of their print-ready documents.

An eBook may still be created in Quark or InDesign even where no version has been previously prepared for printing. Alternatively, Sigil, a free software package designed solely for the creation of eBooks, can be used. Sigil’s interface is much simpler than that of Quark and InDesign, as it focuses only on those features which are transferable to an eBook. Because of this Sigil has a fairly simple interface, similar to a basic word processor. It is therefore very useful for creating eBooks where there are no plans to publish concurrent print versions. Sigil also includes many features which make it a useful tool to refine the code of eBooks generated by InDesign and QuarkXpress. 7

QuarkXpress is not covered in detail in these guidelines, but see http://www.youtube.com/watch?v=7t6g4kdXL3Y for a video tutorial on how to produce eBooks using QuarkXpress 9.

Another option would be to create a book in another program such as Microsoft Word, and save a copy of that book in HTML format.

File > Save As > Save as type: > Web, Filtered

That HTML document can be opened within a text editing program such as Notepad++ (which is available free from the web) and copy the code over to Code View Sigil (View > Code View), and edit the text in SIGIL from then on.

Unlike Quark and InDesign, it does not try to provide for print publication.

Sigil is also useful for editing eBooks generated by other programs, e.g. InDesign, because it allows you to look inside the EPUB file in order to edit the file code directly and see the results of those changes immediately.

Detailed information on the process of transferring text to Sigil in order to create an EPUB eBook may be found in the following websites:

http://www.paulsalvette.com/2011/08/turning-manuscript-into-clean-xhtml.html#c6 http://www.jedisaber.com/eBooks/

I.6 Adobe InDesign

InDesign is the desktop publishing program used internally by the Welsh Books Council.

InDesign is currently the most popular desktop publishing program on the market. At the time of writing, the current version of Indesign is CS 5.5, and we suggest that any publisher who intends to use InDesign to produce eBooks updates to the latest version to benefit from the latest e-publishing features.

InDesign CS 5.5 can produce an EPUB file from an InDesign document. This feature is available by clicking on File > Export and selecting EPUB from the drop-down Save as type: (note: this differs from the way it is done in InDesign CS 5, which is to click on File > Export for > EPUB ). However, before using InDesign to generate a document in EPUB format, the content needs to be preprepared to produce a clean file.

When preparing a document using desktop publishing software, named styles can be specified for use with paragraphs, headings, and elements such as bold, italic and underline. It is important that these styles are used when creating a document that will be converted into an eBook. 8

InDesign divides these styles into two types, namely character styles and paragraph styles. Character styles are used on individual phrases, words and letters within paragraphs in order to style them bold, italic or underlined without changing the style of the entire paragraph.

Paragraph styles are used to manage the style of entire paragraphs, e.g. in order to set the paragraph’s line height or the size of the first line indent.

When creating an eBook from a document, it is essential that the paragraph and character styles have been thoroughly and consistently applied throughout the entire document. Doing so will ensure that the eBook is correctly generated.

Detailed instructions for using InDesign to create EPUB files may be found in Part II of this document.

I.7 Opening and converting EPUB files

You can view the content of an EPUB file by opening it with Sigil (see I.5 above), or following the instructions below to do so manually by converting the file into a ZIP folder.

Converting an EPUB file into a ZIP file

An EPUB file is essentially a ZIP file with an .epub extension rather than the usual .zip one. This may be demonstrated by changing the EPUB file extension from .epub to .zip.

You may need to change your operating system settings to show file extensions in order to do this:

For Windows Vista, Windows 7, and Windows Server 2008

Open Windows Explorer.

Click on Organize.

Click on Folder a search options.

Click on the View tab.

Scroll down at Hide extensions for known file types, and untick the tick box.

Click on OK.

For Windows 2000, Windows XP, and Windows Server 2003

Open Windows Explorer.

Click on Tools and then on Folder Options.

9

Scroll down and click on Folder a search options.

Click on the tab View.

Scroll down to Hide extensions for known file types, and un-click the tick box.

Click on OK.

For the Mac OS X, click on:

Finder > Preferences > Advanced > Show all file extensions

For example, if the file name is changed from example.epub to example.zip it could be uncompressed and opened as an ordinary ZIP file. The .epub file therefore operates as a container for a number of sub-folders and individual files that have different roles.

I.8 Contents of an EPUB file

After changing the ordinary .epub file extension to .zip, uncompressing and opening it, you will find two folders inside, namely OEPBS (Open eBook Publication Structure) and META-INF, as well as one small but important file called mimetype.

OEPBS

Within the OEPBS folder the main content of the eBook is kept. The content is divided into a number of folders and files, some of them mandatory and some optional.

It is the content of this folder that is shown in the left hand window of Sigil.

‘Fonts’ folder for fonts (optional folder)

Specific fonts can be placed within an EPUB file so that they are available for use within the eBook. Not every hardware or software e-reading device will allow the eBook to set the font used when showing the eBook content. If fonts are embedded in the eBook, it is customary to keep those fonts in a Fonts folder within the OEBPS folder.

EBook contents in the form of HTML files

Within the OEBPS folder there are loose .html files, for example chapter1.html, chapter2.html. These files contain the eBook pages and text. Usually these individual XHTML files correspond to individual book sections or chapters. Dividing the book contents in this way lessens the load on the memory of the e-reader, and the book contents may be divided in a more arbitrary manner without the divisions being obvious to the reader. According to the EPUB standard, these individual files should be less than 300kb each, since using larger files could slow down the e-reader or software. 10

Content table – toc.ncx ‘Toc’ stands for table of contents, and this is the name given commonly to a .ncx file found in the OEBPS folder. Most e-reading devices and software are able to show a navigation panel with the eBook content table in the form of links enabling users to jump immediately to specific sections or chapters. The toc.ncx file sets the structure of this navigation panel.

‘Images’ folder

The ‘images’ folder within the OEBPS folder is where any images in the eBook are kept. The images may be kept as gif, jpg or png files.

CSS ‘Styles’ Folder

The visual eBook styles are controlled by a .css file or files. These are usually kept within a folder named Styles within the OEBPS folder. When creating an eBook using InDesign, it will convert the paragraph and character styles into CSS styles. These are usually kept with the other necessary styles in a file called templates.css.

CSS stands for ‘cascading style sheet’. A CSS file contains styles for different elements of the eBook. The ‘cascading’ element refers to the fact that a supra element style flows over to its sub elements. CSS files are also commonly used to control website layouts, and will be familiar to those with web design experience. A useful EPUB file is available from the following website for testing how the different styles appear in different e-readers: http://rufus.deuchler.net/2010/10/css-and-xhtml-tags-for-epub.html A comprehensive discussion of CSS is outside the scope of these guidelines, but a number of useful resources are available free on the web, e.g. W3schools: http://www.w3schools.com/css/default.asp

A word of warning – although they may adhere to the CSS standard, all e-readers do not always decipher CSS in the same way.

content.opf

This is the file which includes the eBook’s details. These details include the following:

Metadata

e.g.

eBook title

book cover file details

11

eBook author(s)

eBook subject keywords

book description

publisher details

publication date

copyrights

language details

unique identifier number (e.g. ISBN)

etc.

Manifest

A list of every resource file used in the eBook, file type, and location within the EPUB container.

Example of a manifest record for the eBook cover:

<item id="clawr.gif" href="images/clawr.gif" media-type="image/gif"/>

Spine

List of XHTML documents that includes the book text. The individual XHTML files usually correspond to the eBook’s individual sections or chapters. They are listed in their reading order.

META-INF

The main file in this folder is the container.xml file. The main purpose of this file is to direct the e-reader to the file that includes all the eBook details (usually the content.opf in the OEPBS folder), including metadata such as author’s name and publisher, as well as a list of all the files used by the eBook.

The folder can also include other files (such as encryption.xml if the eBook includes encryption fonts), but container.xml is the only required file.

mimetype

This insignificant little file is the one which tells the system what type of file it is. One of the common errors when creating an EPUB file by hand (rather than in a program such as InDesign) is to compress this file when compressing the EPUB folder. When creating an EPUB file manually, this file should be added to the ZIP without compressing it. 12

For further information, see:

http://wiki.mobileread.com/wiki/EPub

I.9 Converting EPUB to other formats

Creating an eBook in EPUB format is also a good starting point for converting to one of the other main eBook formats. For example, the open source Calibre program can convert a book in EPUB format to an AZW or MOBI format file. Both formats are essentially the same, since Amazon’s AZW format is based on the Mobipocket (.mobi or .prc) eBook format developed by a company of the same name bought by Amazon in 2005. The main difference between AZW files and Mobipocket files (with a .pcr or .mobi extension) is that AZW files can include Amazon’s DRM. Amazon is able to receive eBooks in EPUB format from publishers and convert them into AZW format.

At present, Amazon has not enabled their e-reading devices or their software to work with the EPUB format or DRM by external providers. The only way a publisher can publish an eBook protected with DRM for the Kindle is to submit it to Amazon and sell it on the Amazon website.

They now accept Welsh-language books and may be contacted directly for further help if needed.

I.10 Character Encoding When moving text from one document to another, care needs to be taken that the character encoding (letters, numbers etc) is not changed by accident, as this may lead to losing the accents on the ŵ and ŷ, or that those letters are represented by ?.

A number of different character sets exist, for example ASCII which includes non-accented letters only, and ISO-8859-1 which includes the accented letters found in the major European languages, but which has no provision for ŵ and ŷ.

When you copy text that includes ŵ and ŷ to text editing programs such as Notepad++ ensure that the encoding used by the program is set to UTF-8 or the accents may be lost. 13

See http://www.fileformat.info/info/unicode/ for a searchable list of the glyphs found in UTF-8, or http://unicode.org/charts/PDF/U0100.pdf for a PDF document that lists them.

Inputting special characters to code

Various codes may be used to represent these special characters in code:

For example, the entity name &wcirc; and the entity number &#x175; both represent the letter ‘ŵ’. The entity name is more practical for users.

Ŵ &Wcirc; U+00174 &#x174; &#372; ŵ &wcirc; U+00175 &#x175; &#373; Ŷ &Ycirc; U+00176 &#x176; &#374; ŷ &ycirc; U+00177 &#x177; &#375;

Paul Salvette suggests converting characters to HTML entity names in code. But the HTML 4 standard did not include HTML entity names for ‘ŵ’, ‘Ŵ’, ‘ŷ’ and ‘Ŷ’ and as a result entity names such as &wcirc; and &ycirc; do not work with eBook files, although &acirc; for example, does.

Importance of fonts

Remember also that ŵ and ŷ will not show correctly even if you have chosen the correct encoding if the selected font does not have glyphs (images that represent letters) for ŵ and ŷ.

Printer characters

The above Unicode resources may also be used to find the correct codes for punctuation characters e.g.:

Ellipsis

Dash ( ?, –, —,)

66 and 99 quotes ( ‘ ’, " " )

See also:

http://en.wikipedia.org/wiki/Dash 14

II Instructions for creating an EPUB eBook in InDesign

II.1 Creating a document For the new user, the first step is to create a test document in order to experiment. To create a new document in InDesign, click on: File > New > Document

We will create a document that will form the basis of both a printed book and an eBook, so mark your intent as Print: Intent: Print

If you wish to see the contents of the book as two open pages, tick the box next to Facing Pages.

? Facing Pages

For the test document, we will set the Number of Pages: as 1 (more pages may be added as we go on). The options in terms of page size, number of columns and margins and orientation of the page are irrelevant for the eBook, so use what is appropriate for setting a printed book. If the intention is to publish in eBook format only, you may choose a document size which fits neatly onto your screen, or which corresponds to the main e-reader that you wish to target.

II.2 Creating the text field

The next step is to add a text field to the page. To choose the text tool (which enables you to create a text field), click on the button illustrated with the T image on the toolbar on the left in InDesign.

In InDesign, the area within the page margins is shown with a pink outline. It is advisable to place the text field within these defined margins, therefore to create a text field, click and drag from the upper left corner of the pink outline to the lower right hand corner, then release the mouse button. If needed, the text field may be further adjusted by clicking on one of its corners and dragging to the correct position.

II.3 Adding pages

In the window of the Pages menu on the right-hand corner of the screen (click on Windows > Pages if it is not visible), right-click on the page icon, then choose Duplicate Page from the menu in order to create a copy of the page. If Duplicate Pages is not yet available, choose Duplicate Spread. 15

Once an additional page is created, the text fields need to be set so that they flow from one page to the next. This is done by clicking on the text field on the first page in order to select it, then clicking on the small blue square on the text field frame, just above its lower right corner.

This will cause the pointer to change to an icon. The text field for the next page should now be clicked. This will cause the text to flow from the first page to the next page when the first page is filled with text.

You can click on View > Extras > Show Text Threads in order to display lines that indicate which text fields are connected in this way (note that you must have clicked on a text field for them to be visible).

Create six pages in your document as described above, remembering to add text fields to them, and to link each text field to the next.

II.4 Add title and copyright text

The next step is to add text to the document. Add the following text to page 3 of the document, which is the title and copyright page:

Title

by Author’s Name

Copyright © 2011 Copyright Holder

(Feel free to change the title, author’s name, year, and details of the copyright holder for the appropriate text if you wish)

II.5 Setting the basic style for the eBook text

When a new document is created, that document already contains a basic paragraph style called [Basic Paragraph]. We will use this style as the basis for other styles. We may set the font and text size for this style, and all the styles that we will create will inherit that font and font size.

This font must include glyphs for ŵ and ŷ if you want those letters to show correctly in the eBook.

The usual Adobe Digital Editions font does not include glyphs for ŵ and ŷ. For those letters to show correctly in Adobe Digital Editions, you must:

select a font which has a glyph for ŵ and ŷ

use it as a font for your eBook text

install a copy of that ŵ ac ŷ font in the eBook

16

If you are going to embed fonts in your eBook, you will need to use fonts for which you possess a licence to distribute. Some fonts’ licence requires obfuscation. Fonts that are free of charge and can be distributed free with eBooks may be found here:

http://scripts.sil.org/cms/scripts/page.php?item_id=CharisSIL_download

http://en.wikipedia.org/wiki/Liberation_fonts

https://fedorahosted.org/liberation-fonts/

http://en.wikipedia.org/wiki/DejaVu_fonts

http://dejavu-fonts.org/wiki/index.php?title=Download

Some of these files have been compressed as tar.gz files. If you are not familiar with tar.gz files, you may have to install an extraction file such as ZipGenius to open some of these files: http://www.zipgenius.it/

II.6 Setting a style for the title and copyright text

The next step is to create a specific style for the title that will increase the font size used for it, centre it, and change the font weighting to bold. This is done correctly through the Paragraph Styles window. If this window is not visible in the InDesign right-hand window, click here to open it:

Window > Styles > Paragraph Styles

At the bottom of the Paragraph Styles window there is an icon which looks like a squarish page with the bottom corner of the page turned up. This is the Create new style icon. Click on it to create a new style called Paragraph Style 1 which will appear in the list of styles shown in the window.

Double click on the style name.

Type ‘Title’ in the Style Name: box over the current title.

Click on Basic Character Formats in the left-hand menu.

Change Font Style: to Bold.

Change Size: to 24pt.

You can also select a font at this stage, but there is not much point in doing so for eBooks as most e-readers will ignore your choices.

In order to centre the Title text:

Click on Indents and Spacing in the left-hand menu and then select Centre from the Alignment menu.

17

Click on OK.

You should now have created a paragraph style called Title. The next step is to place that style on the title.

To do that, select the title text so that all of it is highlighted, then click on the title style in the Paragraph Styles window. This will cause the title to move to the centre of the page, increase in size, and change to use a bold font weight.

You have now created your first paragraph style.

Paragraph styles for the author’s name line and the copyright details are created in a similar manner.

Author’s name

Create a style and give it a suitable name in the Style Name box.

In Basic Character Formats in the left-hand menu:

Change Font Style: to Regular.

Change Size: to 16pt.

In Indents and Spacing in the left-hand menu:

Change the Alignment setting to Centre.

Copyright details

Create a style and give it an appropriate name in the Style Name box.

In Basic Character Formats in the left-hand menu:

Change Font Style: to Italic.

Change Size: to 10pt.

In Indents and Spacing in the left-hand menu:

Change the Alignment setting to Centre.

Result

Once you have created and set those styles, the text on the page should look like this:

Title

by Author’s Name

Copyright © 2011 Copyright Holder 18

Setting spaces between the lines

The lines above are rather close together. When working on a printed book in InDesign, you may be tempted to add additional blank lines between the lines of text by pressing Enter multiple times to create a number of line breaks.

However, although these additional line breaks would show in a print version, they will not transfer to an EPUB eBook.

An alternative method is therefore required to insert space between lines.

Editing styles in order to create line spaces

One way to create an empty space beneath a paragraph is to add a ‘space after’ value to its style.

To edit a style, double click on that style’s name in the Paragraph Styles window.

This will open the style menu. To add space to the end of the paragraph, click on Indents and Spacing in the menu on the left and increase the value shown in Space After: to one of your choosing.

Using styles to control the spacing between paragraphs will ensure the spacing will transfer correctly to the EPUB eBook.

II.7 Add page break

When preparing a document for printing in InDesign, the usual practice when a new page is needed without the current page being filled with text is to use a page break, e.g.:

Type > Insert Break Character > Page Break

Use the method above to set a page break after the copyright line.

Unfortunately, line breaks of this nature will not transfer to an EPUB eBook. However it is important to continue to use line breaks so that they will appear within the final print version as well as within the InDesign document you’re working on.

In order to create page breaks that will work within EPUB eBooks, paragraph styles have to be used.

When producing an EPUB from the InDesign document (File > Export > Save as type: EPUB ), the EPUB Export Options window will appear. Under Contents the Break Document at Paragraph Style: can be found. When the tickbox beside that line is ticked you will be able to choose from amongst your document’s style paragraphs. The style you choose will operate as a line break, splitting the contents into two separate pages ahead of text for which that style has been selected. 19

Using paragraph style to denote line breaks

There are two possible options when choosing paragraph styles to denote line breaks.

1. Create a specific 'Line Break' paragraph style

The first choice is to create a paragraph style to be used specifically in the same way as ordinary line breaks are used.

This may be done by following the steps below:

1. Create a new paragraph style and name it Page Break.

2. Create a new line (by pressing Enter) where you wish to place the line break.

3. Select the new line, and place the Page Break style on it. To all intents and purposes, this will convert that line into a page break within the eBook.

4. When the finished document is ready to be produced as an eBook:

a. File > Export > Save as type: EPUB

b. Click on Contents

c. Tick the box next to Break Document at Paragraph Style

d. Select Page Break from the Paragraph Style drop down.

2. Cause chapter titles to act as page breaks

Instead of creating a specific paragraph style for page breaks, an alternative method is to use Break Document at Paragraph Style to set page breaks tied to a title paragraph style for each chapter.

In order to achieve this we need to add a chapter title to the document.

Click in the text field on the first empty document page, type ‘Chapter 1’ and then press Enter.

The next step is to create styles for it. To create a style for the document’s chapter titles, follow these steps:

1. Click on the Create a new style icon in the Paragraph Style window

2. Double click on the style name to open the Paragraph Style Options windows

3. Type ‘Chapter Title’ over the existing title in the Style Name box

4. Click on Basic Character Formats left hand menu

5. Change Font Style: to Bold

6. Change Size: to a suitable size, e.g. 18pt

7. Click on OK.

8. When the finished document is ready to be produced in eBook format:

20

a. File > Export > Save as type: EPUB

b. Click on Contents

c. Tick the box next to Break Document at Paragraph Style

d. Select Chapter Title from the Paragraph Style drop down.

II.8 Adding text paragraphs

Then type or paste text from another source until you have half a page worth of text in three or four paragraphs. Test text may be generated on websites such as http://www.lipsum.com and http://www.adhesiontext.com/ if necessary.

Paragraph followed by a space

Since the EPUB eBook format does not display line spaces created by pressing Enter twice, a paragraph style needs to be created in order to create add space after paragraphs where necessary.

To create a ‘space after’ style, take the following steps:

1. Click on the Create a new style icon in the Paragraph Style window

2. Double-click on the style name created to open the Paragraph Style Options window

3. Type ‘Space After Paragraph’ over the current title in the Style Name box

4. Click on Indents and Spacing in the left-hand menu

5. Change Space After to an appropriate size, e.g. 5mm

6. Click on OK to save your changes

We can use this paragraph style as a basis for additional features, for example paragraphs that start with an indent.

Paragraph with an indent in the first line

In fiction books, paragraphs that follow the first paragraph in a section have their first lines indented.

We can reproduce this effect by creating a new paragraph style where the first line is indented. We will base this paragraph style on the Space After Paragraph style. It will therefore inherit its ‘space after’ value, so that the space after value of both styles will always be consistent with each other.

To create the style, click on the Create a new style icon in the Paragraph Style icon.

1. Double click on the style name to open the Paragraph Style Options window.

2. Type ‘Indent Paragraph’ over the present title in the Style Name box.

21

3. Click on Based On and select the Following Space Paragraph style.

4. Click on Indents and Spacing in the left hand menu.

5. Change First Line Indent to an appropriate size, e.g. 10mm.

6. Click on OK to save your changes.

Setting the paragraph styles on the appropriate paragraphs

Set the Space After Paragraph style on the first paragraph as we do not want the first line of that paragraph to be indented.

For the second paragraph and those following within the same section, set the Indent Paragraph style on them.

Hyphenation

The majority of tested e-readers do not hyphenate eBook text (some e-readers, such as Kobo, are exceptions to this rule). It is customary to leave the right-hand edge of the text unjustified while the left is justified. It is possible to experiment with using soft hyphens (http://en.wikipedia.org/wiki/Soft_hyphen) on long words, but e-readers are inconsistent in their support of them. Bear in mind that appropriate hyphenation varies from one language to another. Hyphenation rules that were formed for English hyphenate Welsh words in the wrong places, splitting digraphs such as ‘dd’, ‘ll’ a ‘rh’, for example. This causes Welsh words to be misread and should be avoided.

Export Tagging For those who are comfortable editing CSS, the Export Tagging menu in the Paragraph Style Options and Character Style Options windows allow you to set specific CSS styles to correspond to the styles that you have used in your document. Further information can be found in the following web pages:

Export Tagging to the Rescue! http://www.creativeprogression.com/taking-the-cs5-5-epub-plunge-export-tagging-to-the-rescue/

Preparing your InDesign files for ePub Export http://labs.oreilly.com/Bilodeau-IDtoEPub.pdf

II.9. Adding accented characters

You may use your usual method for adding accented characters such as ŵ and ŷ to the document directly into the text field.

Here is a summary of the methods for adding them with various systems: 22

Windows

If not already set, the UK Extended Keyboard needs to be selected:

Windows 7 Start > Control Panel > Change Keyboards or other input methods > Change keyboards > United Kingdom Extended

When this is done, an accented letter may be selected by simultaneously pressing Alt Gr and an accent key followed by the key for the relevant letter.

A letter with a circumflex letter may be created by pressing Alt Gr and 6 together and then pressing the key for the relevant letter. For example, for ŷ, press:

Alt Gr a 6, then y giving ŷ

An accented capital letter may also be created:

Alt Gr a 6, then Shift and y to create Ŷ

Here is a list of the combinations using the letter y as an example:

Alt Gr and y to give ý

Alt Gr and 2, then y to give ÿ

Alt Gr and 6, then y to give ŷ

` and then y to give ?

(` is the key under Escape to the left of 1 on the keyboard)

Mac OS X

A Welsh keyboard is available for the Mac OS X from 10.3 onwards. This can be found under Systems Preferences in the Apple menu. For further information on creating accented letters on Apple computers, please refer directly to Mac OS help.

To Bach Software

Another option is to use the To Bach software by Draig, working on Windows and facilitating the installation of accented characters. It can be downloaded from http://www.draig.co.uk/en-GB/download-27.aspx. When it is installed you can create letters with accents by holding down the Alt Gr key and pressing the letter which requires the accent.

Alt Gr and y to give ŷ

Alt Gr and /, then y to give ý

Alt Gr and 2, then y to give ÿ

23

InDesign

Accented letters such as ŵ and ŷ may be added to the document in InDesign by using the Glyphs window. If it not shown on the right-hand side of the screen, you can open it by clicking on:

Window > Type & Tables > Glyphs

In the Show menu the appropriate set of glyphs may be selected.

The accents for a, e, i, o and u are found in the Basic Latin and Latin 1 set, while the accents for w and y are part of the Extended Latin A set.

Accents which occur in Welsh

The following accents occur in Welsh:

á é í ó ú ? ý

â ê î ô û ŵ ŷ

ä ë ï ö ü ? ÿ

à è ì ò ù

Usually the troublesome characters are ŵ, ŷ, Ŵ, and Ŷ. This may be because:

the accented letters were not used in the first place

the accented letters were used, but the document was converted from UTF-8 encoding or similar (where they are included) to a set such as ISO 8859-1 which does not include them. This may happen inadvertently when files are converted from one format to another.

the font being used does not include the glyph (image of a letter) for these letters. This is surprisingly common.

Add the accents above to the paragraphs in your document if you have not already done so. This will allow you to check whether the accents have converted correctly when creating the EPUB version of the document later on. A test document was created in order to assist with identifying problems with accented characters.

II.10 Adding bold, italic and underline etc. styles We have already described paragraph styles, i.e. the styles used to set text styles at a paragraph level. In order to style individual parts of text (rather than the entire paragraph) character styles should be used.

The most common use of character styles is to set bold, italic and underline on a word or words within the text. 24

The Character Styles menu shares the same window as the Paragraph Styles window. It is possible to change between them by clicking on the tabs at the top of the window. If the window is not in view, it may be made visible by clicking on:

Windows > Styles > Character Styles

http://help.adobe.com/en_US/indesign/cs/using/WS60910FA3-2BD7-449d-9904-05CFA551665Da.html

Bold

To create a character style for bold text, follow these steps:

1. Click on the Create a new style icon in the Character Style window

2. Double click on the style name created to open the Character Style Options window

3. Type ‘bold’ over the current title in the Style Name box

4. Click on Basic Character Formats in the left-hand menu

5. Change Font Style to Bold

6. Click on OK to save your changes

You will now be able to use this character style with any letter, word or sequence of words shorter than a paragraph which require the bold style.

Italics

To create a character style for italic text, take the following steps:

1. Click on the Create a new style icon in the Character Style window

2. Double click on the style name created to open the Character Style Options window

3. Type ‘italic’ over the current title in the Style Name box

4. Click on Basic Character Formats in the left-hand menu

5. Change Font Style to Italic

6. Click on OK to save your changes

You will now be able to use this character style with any letter, word or sequence of words shorter than a paragraph which require the italic style.

Underline

To create a character style for underlined text, follow these steps:

1. Click on the Create a new style icon in the Character Style window

25

2. Double click on the style name created to open the Character Style Options window

3. Type ‘underline’ over the current title in the Style Name box

4. Click on Basic Character Formats in the left-hand menu

5. Change Font Style to Italic

6. Click on OK to save your changes

You will now be able to use this character style with any letter, word or sequence of words shorter than a paragraph which require the underline style.

Select a couple of individual words or groups of words within the paragraphs on the page and set the styles you have just created on them.

II.11 TOC (Table of Contents)

An EPUB eBook may include a file which lists the book’s chapters and sections in the form of links which enable the user to jump directly to that specific part of the book. Most eBook readers and e-reading software can show this information in a navigation panel which is independent of the window that displays the book’s main text. InDesign can create this file automatically based on the paragraph styles you used to create the headings for your document.

To create a TOC file, go to:

Layout > Table of Contents

In the Title page give a title (something like ‘Contents’) to the page where the contents table will appear, and select a paragraph style for the Style field in order to set how it will look.

The next step is to select the paragraph styles which denote the chapters or main sections for your book. In this document, the main paragraph style is Chapter Title, so select Chapter Title from the Other Styles list and then tick on Add in order to move them over to the Include Paragraph Styles list.

We can also choose sub-sections to appear in the contents table. Select Heading 1 from the Other Styles list and then click on Add in order to move them also over to the Include Paragraph Styles list.

If you so wish, you can also set the style of various elements in the list, and use the Level field to manage their hierarchy.

After you’ve clicked on OK, the pointer’s icon will change. The created contents table can be placed by clicking on an appropriate page in your document. Remember to add a page break after it. 26

II.12 Producing the EPUB eBook Now that we have content in the document, it is time to turn to preparing the document for conversion into an eBook.

Adding Metadata

First of all, information about the book needs to be added to the document as metadata. This includes the name of the author, ISBN number, etc.

In InDesign, it is possible to add this data to the document by clicking on:

File > File Info

This will open the File Information window for the document.

It is a good idea to fill in all the fields under the Description tab if it is possible. The available fields are:

Document Title

Author

Author Title

Description

Rating

Description Writer

Keywords

Copyright Status

Copyright Notice

Copyright Info URL

All the data will be added to the eBook in order to help with its correct distribution and cataloguing, and it will help users to find it when doing relevant keyword searches. It is the information given here that will be used by e-readers and websites distributing the eBook to show details such as the author’s name, title, etc. NOT the contents of the document itself.

Note that the name of the publisher will be added in a further step. The date of publication will be added automatically.

Installing E-reading Software

Secondly, you need to ensure that e-reading software is installed on the computer. Adobe Digital Editions and Calibre are programs that may be downloaded and installed on your computer free of charge. 27

With Adobe Digital Editions you can read EPUB files that have Adobe DRM on them on your computer. It is important to verify the appearance of the book in this program as many users are likely to use it.

Calibre is a useful open source program. It will not be able to open the EPUB file once Gardners have put DRM on it, but it is a vital program for checking and examining the metadata settings of the EPUB file before sending it to them.

We suggest that you install the above programs on your computer. This will allow you to open the finished eBook once it has been produced and examine it in detail.

Options for creating EPUB

A feature for producing an InDesign EPUB file is available by clicking on File > Export and then choosing EPUB from the Save as type drop down.

Clicking on Save opens a EPUB Export Options window which has a range of options to set how the EPUB will be produced.

These are the settings that we recommend as a starting point:

‘General’ Tab

EPUB

EPUB Cover It is advisable to provide a cover for your eBook, and there are two practical options, namely:

1. Convert the first page of your InDesign document into an image and use it as a cover.

If the first page of your document is an image from your book cover, this facilitates the use of that cover as the eBook cover.

If your cover is text, that text will be converted into an image of the text and used as a cover.

To choose this method, click on: Rasterise First Page.

2. Note the location of an image of a cover created outside i InDesign and incorporate it in the eBook in order to use it as a cover.

The size recommended usually by eBook distribution companies is 600px (width) by 800px (height). It is usually recommended that the file size should be kept between 80 and 200KB. Having said that, the size and resolution of e-readers are evolving continuously.

Ordering

28

Formatting Options

View EPUB after Exporting

To choose this method, click on Use Existing Image File and set the path to the file you wish to use.

‘Image’ Tab

Leave these as they are.

Tab ‘Contents’

Format for EPUB Content

Contents

o Place a tick by Break Document at Paragraph Style

o Choose an appropriate paragraph style:

? Page Break, if you have used the Page Break style to mark where pages should be separated because you need to manage that feature in detail

? Chapter Title, if you have a simple book where a page break is only needed before chapter titles.

CSS Options

o Generate CSS and place a tick next to Include Embeddable Fonts

(Embedding a suitable font will ensure that e-readers such as Adobe Digital Editions show ŵ and ŷ correctly)

Once you are happy with the options, tick the box for View EPUB After Exporting and click the OK button in order to generate the EPUB file.

If you have installed Adobe Digital Editions on your computer as the default for opening .epub files, your eBook will open in Adobe Digital Editions. You may now look at the contents of the book to try to identify any problems with the setting. This may include instances where the correct paragraph style or character style were not used, or where there is no page break at the correct place.

If you find a problem, go back to the file in InDesign to rectify it, close Adobe Digital Editions, and generate the EPUB again. Repeat these steps until you are happy with your eBook. 29

II.13 Validation

It is possible to check whether an eBook conforms to EPUB standards by using dedicated programs that compare the eBook code with that prescribed in the standard.

There are websites that offer eBook validation services, e.g. http://threepress.org/document/epub-validate, but these are not in reality suitable for commercial use as they entail passing an unsecured copy of the eBook contents to a third party.

A better option is to use validation programs that may be installed locally on your computer, e.g. FlightCrew: http://code.google.com/p/flightcrew/, as your file will not leave your computer when using them.

A validation feature is also available in Sigil, a free program for creating and editing eBooks. It uses exactly the same code as FlightCrew.

II.14 Further checking

EPUB validation programs are only able to provide technical validation. The fact that an EPUB eBook passes the validation process does not mean that the eBook will appear exactly as you intended in every e-reader or program since the way different e-readers interpret the EPUB standard varies. Most e-readers have a few quirks, and it is therefore recommended that you check the appearance of the eBook that you have generated on as many e-readers and in as many e-reading programs as you can, giving priority to the most popular devices.

E-readers that work with Adobe eBook DRM

A list of devices and software that have a licence to show EPUB eBooks with Adobe DRM may be found here:

http://blogs.adobe.com/digitalpublishing/supported-devices

Here is a list of those that are available for mobile multi-purpose devices:

Android

Aldiko

Biblet

BlueFire

DL Reader

Emviem

ePagine Reader

30

Gato Sabido

Google Books

Kalahari.net eReader

Sony Reader App

TookBook

iOS

Book Shelf

Bertelsmenn

BlueFire

DL Reader

aNobii Reader

Kobo

Libranda

Emviem

Numilog Reader

Biblet

txtr

Problems found when testing eBooks on these e-readers can vary from issues with the appearance of the eBook (styles not deployed correctly, missing accents, elements such as tables and images broken) to more serious problems that prevent the eBook from opening successfully.

We recommend concentrating on ensuring that the eBook works on Adobe Digital Editions. Discussions are ongoing to see whether it is possible to develop a version of Bluefire Reader that would be suitable for Welsh, but at the present time the software favoured by Gardners is Digital Editions.

Known issues with e-readers

The font used by Adobe Digital Editions does not include ŵ and ŷ. In order for Adobe Digital Editions to show ŵ and ŷ rather than ?, a special font has to be embedded. 31

Every e-reader does not support the embedding of fonts. If you are creating an eBook with an embedded font in order for the ŵ and ŷ to show correctly, some e-readers would ignore that font or, in some rare instances, refuse to open the eBook at all.

Date last updated: 21 Jun 2013