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 :)

Kindle Book Development Process

convert

(note: the above isn’t my book btw – this is just a screengrab from the calibre website)

I’m done! Actually, yes. I’ve shipped my first version of the Kindle book to the client and am awaiting changes.

Sorry, but I’ve been so busy, I haven’t had time to update this page. Anyways, here is the process I’ve been working on:

  • Take the book text (I was working on a non-fiction title), and covert it to Markdown.
  • Run the book through a Leanpub.com conversion and you get a decent ‘epub’ file at the end.
  • Hooray, this has just solved a whole bunch of HTML formatting.
  • Add this epub file (it’s a book basically) to Calibre.
  • Edit the book.

Now things start to get easy or complicated depending on what you’re trying to achieve. Personally, I had a whole lot of layout issues, Table of Contents, images, references etc to deal with. You may not have this issue. Either way, I’m going to document what I can recall.

Essentially Leanpub creates a pretty good epub file, but I had a lot of files which I didn’t understand in my Calibre book editor, so to figure things out, I cleaned up my (xhtml) page code and saved it all out to new (html) files in a folder on my hard drive. Calibre doesn’t allow you to work on two books at a time, so I needed to save everything out individually. Why? Because the leanpub markdown file is singular, and the .epub file it creates is singular too. Confused? Yeah, don’t worry about it. Just keep reading!

Once I’d saved out my entire book into all the separate files I figured I’d need (css, table of contents, references, etc.) I created a brand new book. This got rid of all the weird files the Leanpub import created. I created all the individual pages I needed (naming the chapters appropriately) and pasted the page content back in from my hard drive backup. This left me with a ‘clean’ version :)

Don’t forget to add in the CSS link in the HEAD tag, and you should be set for formatting your page content.

Everything from this point was pretty easy. You will obviously need to know HTML to understand how to link up internal pages if you’re building a reference section, but if not, just crack on with tweaking page content and css code.

Don’t create your own Table of Contents as the Kindle conversion will create it’s own. This caused me a lot of headache – so don’t even bother trying until you’re experienced.

On that TOC note: once all your pages are into Calibre, you ‘build’ your TOC by going to Tools > Table of contents > Edit Table of contents. Easy to use and saves a lot of hassle.

Once you’re done save everything, close the editor, highlight your book, click to edit the book Info (meta data). Here you’ll be able to set the authors, the publication date, the tags, and comment description, and more. Once done hit Save. Now click to convert the file: in the top right drop down choose .azw3 and click convert. When that is done, connect up your Kindle and add it to your main memory. Eject it when done and check it for errors.

Once you’ve made a note of them. You’ll need to go back into the original epub file and make the changes. Be careful here as if you didn’t select .azw3 from the dropdown initially, you might have created duplicates. You’ll need to select the original epub file and edit that. Opening up a converted .epub or .azw3 file to edit will show you all sorts of page code which you didn’t write. This confused me so much, I actually removed the entire (converted) book from the Calibre library and imported my original saved epub file again. This has a downside of not saving the Meta data, but for me it wasn’t too bad to add it in again.

I ended up flipping to and from these converted and original epub files a lot in order to get to a final ‘good’ .azw3 file – but it was worth it.

Need help? Got stuck? Ping me a message. Either on here or my real website.

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 :)

Problems, Frustrations & Issues with using iBook Author

Publishing with iBook Author by O'Reilly

:(

Apple, Apple, Apple. I give in. I will start again (third time lucky) on my iPad book, and this time heed to your unforgiving, rigid, rules (limitations).

In iBook Author you cannot:

  • Cut n Paste what you like where you like.
  • Insert pages, sections and chapters where you want.
  • Edit all areas and items
  • Sometimes… you can’t even remove the images you’ve inserted (placeholders)

Thanks for that. Consistent for the reader? Yes. Intuitive for the creator? My arse.

So today, I’m about to rebuild my book again. I’m giving up trying to fudge the build. Apple just won’t let me. I can only suspect that they have decided if you want to completely control the formatting, use a PDF. If you want to create an actual book, accept there are constraints.

Usually, constraints are navigated with intellect and fudging. No. Not this time.

Pages can only go inside sections or Chapters. If you want content outside of those, you have the choice of dedications, preface, foreward, copyright, etc.. bah. I’m bored.

On a positive note: this great book, Publishing with iBooks Author by O’Reilly is Free.

Launching into iBooks (Author)

 

 

Image

 

After yesterdays full jump into Calibre, today saw none of it. Today was all about picking up my MacBook Pro and mucking about with iBooks Authors. I’ve used this software once before to create a book for the iPad and loved working with it. All day long I’ve been refreshing my memory, digging into the templates and dropping a rough PDF into it. I managed to get a lot done very quickly. 11 pages of my rough book conversion, tbh. I say ‘rough’ because, I’m keen to rebuild my entire book twice. Yes, twice. Why? Because I want to really learn to bash out a book in ultra-quick time, and I believe version 2 will be better (more consistent) that version 1. 

That’s dedication for you! What better way to learn, than on the job :) 

I might get some time to work on it more over the weekend, which I hope I can do, because I came over and said to Avila, how much I loved, loved, loved, working with iBooks Author. 

I feel like it is a great culmination of my skill set: design, development, creative writing, technology and software. I feel like I want to turn this into a full service and promote now. 

As for yesterday’s Calibre work, that’s going to sit on the back burner for a while – need to prioritise this iBook first! 

Lovin’ it – Mark :)

 

Creating an eBook from scratch

 

Image

Today I start something fun: I’m creating an eBook from scratch – and I’m going to document the entire process here for reference and everyone else to follow and learn from.

First up: I’m not writing a book, the book has already been written. I’m just converting it from a PDF to an .epub, .mobi, .azw3, and iBook file (for iPad). Tall order, hey? *gulp*

Where to start with such a project? To download Calibre eBook production software. 

More info coming soon! 

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.

WordPress 2 step authentication sucks

If, like me, you have enabled WordPress 2-step authentication recently. You, also like me, will be disabling it very, very, soon. 

The first time I had to log back into my site and be faced with these ridiculous ‘codes’ you’re going to regret setting it up. Then you might have to log in to your WordPress iOS app and you’ll be screwed. You won’t be able to get in at all! 

It freaked me out. So now it’s gone, and that wasn’t an easy process either. You have to go here: https://wordpress.com/settings/security/ and click the button to generate a new ‘Application Password’. From there it will be needed to log in to your WordPress iOS app. Do not bother trying to use you regular password – that has now gone!

Good luck – Mark

The Things A Student Will Not Receive By Doing A Degree Course In Creative Writing

Here is a list of things that creative writing students are not getting on their course:

1. The chance to focus

- Students should work on one story from first year to third year – this will reflect the effort involved and commitment from beginning to end. They currently do not. They try various things in the first year, focus on becoming employable in the second year, and get to focus in the third year.

2. Discipline

- Students should be pushed to write everyday and be marked down accordingly – this will reflect the professionalism needed to consider yourself a writer. Every writer has to learn that writing is a job. You have to work at it everyday. The students are not pushed to do this. Sure they are encouraged, but they should be pressed and marked down if they under perform. Blogging everyday for three months solid is enough to instill a routine in anyone. Peer pressure – a public leader-board – will get students to pull their socks up.

3. Rules

- Students should be given the rules of writing – they exist: why is the 3 act structure not considered until the third year? Why is plotting not covered until the third year?

4. Software and workflow guide(lines)

- Students should be given the ‘How’ element of writing. We are given the Why and the What, but How? For that we’re told to use Word and ‘see you next week with a thousand words’. Not good. There are a plethora of ways to write, and write well. The students are not given (in any formal manner) these discoveries from teachers, or told what has proven to work for established writers.

5. Mature student considerations

- If you are a mature student, you are not catered for. Eg: You will be asked to ‘get a job’ multiple times. You will be asked to write a CV multiple times. You will be asked to perform ‘teamwork’ tasks multiple times. As a mature student, you need none of these and it is largely (99%) a waste of your time.

These are just 5 ideas, and I have more, many, more.

Getting a degree at 40 is frustrating.

However, the MA course has a 100% track record of getting people published! What is the percentage for getting BA students published in their chosen course; not as copywriter, or in advertising, but selling fiction? 1%? Appalling.