Linux and Open Source Software on Laptops, Netbooks and Desktops

Project Overview | Distros | Video Editing | Video on the Web | About and Contact Us | Privacy Policy

From a Linux Laptop to Lulu and iTunes

Lightning Talks and Workshops on Formatting & Publishing E-Books and Paperbacks

Presenter: Marghanita da Cruz
Author of four paperbacksShort Walk Books

Workshop | Part 1 Writing and Formatting the Book | Part 2 Interoperability | Part 3 1890s Annandale: A short Walk - The Book | 1890s eBooklulu buy now | Paperback Edition | iBookAvailable on the iBookstore | Federation Annandale and Annandale's Great War also now available

Gathering the Content

The book comprises text, photographs, a "line drawing" created from a photograph, end notes and web references.

I composed and formatted the book in Open Office. However, with hindsight this was not the best approach. It would have been better to format the document in XHTML - the basis of the EPUB Format required by Lulu.

Formatting the Book in EPUB

Tom Worthington and the four websites, listed below, were invaluable in doing this. The firefox Google Chrome EPUBReader plugin, allows you to display and read e-pub books in the browser.

The advice was to break the book up into separate files for each chapter. I chose to go with 7 files of XHTML. The W3C Markup Validation Service's Tidy was useful in converting my HTML to valid XHTML.

Each image, in the book, will be a file. A css style sheet and three other files are also required, in a specific directory format, in the E-PUB Package. Harrison Ainsworth's Epub Format Construction Guide explained this structure well.

EPUB Package Format

Meaningless Lulu Error Messages

"The following issues were found with your EPUB, which can effect its eligibility for certain channels:
* Did not pass epubcheck-1.1 validation. (the iBookstore and Barnes & Noble)
* Contains invalid creator XML. (Barnes & Noble)
* Contains invalid publication date XML. (Barnes & Noble)"

Puzzling Three Press Validator (Beta 14 Aug 2012) Messages

ERROR mimetype -1 -1 Mimetype file should contain only the string "application/epub+zip".

The mimetype file Hurdle

Useful Websites when creating an EPUB

Ebook available through Lulu

Creating the Paperback from the EPUB

Perhaps the biggest issue is the hyperlinks. Where it is sufficient to provide hyperlinks, to references and relevant material on the web, it isn't really practical for a reader of the hard copy to follow up as easily. They are also more likely to flick through the book and so, would benefit from the inclusion, or at least a description, of what is available at the link - for possible follow up.

There are limitations on the book formats (bindings, page size, number of pages) which are available, for distribution, through Lulu Channels. For Global Reach the parameters are :U.S.Trade6x9", BlackandWhite PerfectBound 48-740pages. This was more pages than my e-book, but I decided to increase the font size (14point is more readable) and include additional photographs. As these were not my photographs permission needed to be obtained.

Lulu produces paperbacks from PDF files. I used Open Office to create the PDF. In addition, if you want to include an image on the front cover of your book or control the look, you will need to do this in a JPG file. You also have the option to provide another JPG, to be included on the backpage. Lulu also lets you enter the text for the cover pages directly. I did not like where Lulu wanted to put this text, so included it in my front cover image. The back cover adjusts the text around the image you provide. There is a "new" feature in Lulu which lets you design your whole front and back page.

An EPUB provides the ability to hyperlink within the document and the Internet, eg from the Table of Contents, to referenced points in the book or from references to sources on the web. These hyperlinks disappear in the paperback. It is useful to think about this when creating your html.

Open Office has a Master Document feature. Create one of these and import each of the HTML Files.

In Open Office, you can format each page - to adjust the size (Lulu Paperback 6"x9"), specify page size, margins, footers and headers for cover, front matter, left and right pages etc. Tip - this is done by right clicking on the

In theory, it should just be a matter of linking to the HTML files published as the epub. In reality, first you have to strip the first couple of lines the EPUB format requires, then deal with the formatting challenges (in Open Office 2.4.1).

Tips for Layout

  1. Before trying to import the HTML files, Strip out the EPUB XML & XHTML references from. ie Replace <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ""> <html xmlns=""> with <html>
  2. After importing the HTML pages to your master document, assign Page Styles to individual pages (cover, index, front matter, left and right pages of your book).
  3. Try to limit your image attributes to ALIGN="LEFT" or ALIGN="RIGHT" in your XHTML
  4. Modify "HTML styles" ie Heading 1, Heading 2, text body, etc. to include things like page breaks, keep paragraphs together, orphan control, etc.
  5. Use SPAN rather than DIV to associate captions with images in your XHTML
  6. Use the Open Office Index rather than the Hyperlinked table of contents.
  7. Modify the Internet Link and Visited Link character style to hide hyperlinks

When you are happy with the display of your document export it as PDF.

Note you can save the Master File (ODM Package) - but you need to reapply the page style to the cover page, others flow on, each time you open the document. Possibly a bug in Open Office 2.4.1

I converted the images to grey scale for a Black and White only Printed book. But this may not be necessary. Lulu also provides the option (at significantly higher cost) for colour.

Part 2 Lightning Talk at SLUG 26 August 2011 - Interoperability - Formatting the PDF from the HTML source using Open Office Master Document.

Publishing as PDF

Lulu also lets you publish your book as PDF, so to do this you will need to decide whether your PDF is for printing or electronic use and change the Internet and Visited Link Character attributes back to something suitable. Also replace the printed Table of Contents with the Hyperlinked version.

Youtube: Lightning Talk at Sydney Linux Users Group (29 July 2011) © Ramin Communications 2007-11. Last modified 15 August 2012.