Fixing Smashwords Epub validation errors

validator

Wow! I’ve just landed my clean HTML code with a load of epub validation errors!

Here’s what they mean:

tags! tags! tags!

First thing to do is to double (triple) check all your code is good. I found 1 closing div tag out and I got err’s. So check them all!.

1. img tag problems? Make sure there is no space between the last ” and the end of the closing tag. Eg:

 img src="#" alt="" height="100%" /> <-- bad
 img src="#" alt="" height="100%"/><-- good

Oddly, this only appeared to error on my first image of the page. So I recommend adjusting one and then running a validation check

2. em tags. Nope. Get rid of them. I had blockquotes too. In the end I got rid of them and added some font styles to replace the em tags, eg:

 div id="blockquote" style="text-align: center; font-size: 150%; font-style: italic;"

3. sup tags! Kill sups – add the following css:

style="vertical-align:super;font-size:.6em;"

Wait up a minute…

I’ve already managed to get my file to validate – Hooray?! I’m confused because many of the errors completely disappeared by making small changes. For example: errors appear to be created by blockquote and em tags (once corrected) vanished from the rest of file. I expected an inconsistency to be, erm, consistent. But no. em and sup tags are throughout my file, but the validator doesn’t care. Certain tags appear to cause issues: I’m looking at you em tag!

This place https://code.google.com/p/epubcheck/wiki/Errors didn’t appear to be much help in figuring out what the errors meant. Ahh well, at least my file has passed validation. If the validator link above passes, then it is extremely likely that the Smashwords meatgrinder will too – as it is based on the same thing.

Done – Mark 🙂

Advertisements

Important reading for creating the perfect iBook

accessibility

That title there basically means, I’ve completed my ibook. It’s off for its first review and inspection.

It’s been a massive learning curve with lots of annoyances. Here’s a few of them to save you a headache:

  • Portrait mode and Landscape mode can display different content. However…
  • Depending on what page (Chapter/section/page) you’re working on, some changes will carry across to the Portrait mode, whilst others won’t. Therefore, keep checking!
  • Portrait mode can’t hold any body copy images. However, the very first page of the chapter can – so pick and place your images carefully.
  • On that point, when you first view your page in Portrait mode in iBook Author (iBA) there’s a blue guide line at the top to indicate the first chapter page content. Be sure to drag this down by as much as you need in order to house some graphic(s) – as no other Portrait mode pages can!
  • If your file has its own contents page – delete it. Seriously, Apple creates its own contents page anyway which you are not able to customise (much), so it’s best not to even bother trying. Plus, it’s pointless having two contents pages as it will only confuse your reader.
  • Images cannot be links. Yes, you heard correctly. Images cannot be links. You can trick iBA by placing transparent text on top of an image though. However, this text may still be viewable when viewing the contents page. The best way to avoid any readable text is to type a series of dots ‘………’ and then space them out until they fill the entire image.
  • Duplicate the template chapter/section/page you want to use and edit them carefully. In some cases you may want to wipe the pages completely, however, you may regret that as you will have also removed the automatic page-numbering area. For my book I had different formats for chapters, sections and pages, that spanned 3 different colour schemes (grey, yellow, and blue), therefore, I had to make three copies of each template chapter/section/page and choose the correct colour scheme when I needed it.
  • Do not save the iBA you’re working on. Choose, ‘Save as Template’ always. Only then will all template changes be preserved.
  • Some sections of template files will be ‘locked’. To edit them, go to: View > Show Layouts, find the template element you want to change, click it, then go to, Arrange > Unlock.
  • The Landscape view graphics on the contents page appear consistently no matter which chapter you’re viewing: pick your graphic wisely.
  • You can drag and drop sections and pages around in the left hand ‘thumbnail’ view of Landscape mode in iBA. However, you have to watch for a little horizontal blue line with a ball on the left to indicate where exactly the move is ending up. For a while I was frustrated at nesting pages in chapters, when I didn’t want to.
  • You cannot embed a video from Youtube. You can only add a video to the .ibook file (which bloats the file considerably). A workaround for this is linking to a video – see the point above about linking from images.

I now consider myself a bloody good iBA operative – so contact me today if you’re interested in converting a PDF or a file to iBook.

Mark 🙂

Things the modern writer should request…

It is likely that the modern writer will want to:

– publish through amazon. The software should indicate where the 10% line falls in the text – as this is the sample cut-off point.
– write in Markdown. This will enable ebook ready text, quickly.
– rearrange their words. Please make this very easy.
– work with multiple texts. Allow them to import docs and group them accordingly.
– export their work to somewhere safe. Dropbox is perfect.
– word counts
– syntax identifiers and options.

Things a writer does not need:

– Fonts. Just a few simple options is enough.
– formatting tools
– ‘how long it takes to read this’ counters.
– lots of file format saving and importing options: txt and .md is fine.
– colours. Nothing in writing needs colour options, ever.
– images. Writers don’t need them – imagery is someone else’s job.

That’ll do for now. I will have more, eventually.