Contents | Start | End | Previous: Chapter 24: Advanced Topics | Next: Chapter 26: Understanding Ebook Formats and Platforms


Chapter 25: Troubleshooting Your Book

Once you’ve compiled your book, you need to check it and fix any formatting or other errors that might be present. This chapter explains why you need to do this, what errors are likely to crop up, and how to fix them. You can supplement the information in this chapter by typing keywords into the Search Help field in the Jutoh toolbar, to search the application help and the Jutoh ‘knowledge base’.

What errors can occur?

If you’re lucky, your ebook will be perfect the first time you compile it. In the real world, however, it may contain flaws. These are the seven categories of error or imperfection that we can identify:

The optional third-party Epub checker can highlight syntax and structural errors, while Jutoh itself checks for some structural, formatting and platform errors during book compilation.

How Jutoh displays errors

The errors that Jutoh can detect (or can detect via EpubCheck and Kindlegen) are listed in the Errors tab after you have pressed Compile or Check:

The Errors tab

Issues are divided into errors, warnings, and tips. Errors need to be dealt with to avoid problems, while warnings may be either fixed or ignored. Tips are shown if Reporting is set to High, and give extra information that will help you improve the formatting of your project. Double-click on a message, or press the Debug button or information button to view the selected message in the Details tab. This will often give you much more information. You may be offered links to the documentation and clickable command links, for example to help you edit a style, set a configuration option, build a table of contents, or update your document’s footnotes. This can make light work of fixing a problem.

The Details tab showing an error, and associated hints and links

Click Locate to see the error in context. If the error was found by Jutoh during compilation, and there is a particular location for the error, the relevant document will be shown and the problem paragraph highlighted.

If the error is from EpubCheck, and relates to a specific point in the Epub file, then the Epub HTML or XML file will be shown at the relevant point. See below for more details on that.

In the Details tab, you can also navigate between errors with the left and right arrow buttons, and copy the message and hint text to the clipboard using copy button.

If you want to see the Details tab and Errors tab simultaneously, drag the Details tab to the right of the window until you see a blue rectangle appear – the notebook containing the tabs will split in two.

To sort the messages alphabetically, right-click (or control-click on Mac) and choose Sort Alphabetically from the context menu.

Next, we will look at the different error categories. Let’s deal with each of these categories in turn.

Syntax errors

When you click on Compile in Jutoh, and you have an Epub configuration selected, an Epub file is created that contains a variety of XML and XHTML files.

Jutoh takes great care that the files are well-formed, but occasionally errors may be introduced. For example, you might delete a bookmark needed for a link, or you might enter bad metadata such as a date in the wrong format. Or, if you have inserted verbatim XHTML into your book using the special “HTML” style, the error could be badly-formed XHTML syntax such as a missing angled bracket.

This is where Epub checking comes in. You can use the Check button in the Control Panel, or the Book | Check menu command, or the F8 key, or the Check toolbar button:

The Check toolbar button

Click it to run the third-party EpubCheck tool (written by Adobe, in the Java language) which is bundled with Jutoh.

It’s recommended that you enable automatic checking after each Epub compile, by going to Preferences, and in the General Preferences page, enable the Check Epub after compiling option. This will save you from forgetting to check the file, and will also combine the Epub errors together with errors that Jutoh itself spots.

Assuming Java has been installed, checking will either give a clean bill of health, or will show errors that have been identified in the Epub. These errors are listed in the Error tab at the bottom of Jutoh, as discussed above.

If you click on an error, you can see part of a tip underneath the list. You’ll see the Book Viewer window:

The Jutoh Book Viewer

This is a separate window (but still part of the Jutoh application) that displays the hierarchy of files inside your Epub, with a viewer for the XHTML and other files. The errors and tips are displayed at the bottom, and by clicking on each error, you can see the context of the problem and the relevant tip.

Incidentally, you don’t have to have errors in your book to examine your Epub file. At any time, so long as the Epub file exists, you can use the Book | Examine menu command (F6) to browse the Epub file. You can also use the File | Examine Epub command to examine an arbitrary Epub file that’s on your disk, even if it wasn’t created by Jutoh.

Now, you can’t actually edit the XML and XHTML source directly. You need to deduce the source of the error (such as a missing bookmark) and correct it in the Jutoh project, before running another check. The reason for this is that some information is lost when generating the Epub, and it wouldn’t be possible for Jutoh to precisely reconstruct that information from the generated and hand-edited XML and XHTML. But you should be able to get used to tracking down problems by examining the Epub files, for the small number of occasions that errors make it into the Epub and weren’t identified by earlier Jutoh error messages that lead you directly to the context. If you see errors from both Jutoh and EpubCheck, look at the Jutoh errors first since they show you where in the text they occur; fixing these may also fix the Epub errors.

These are some of the more common errors that can be flagged up by EpubCheck.

You can apply Epub checking to Mobipocket configurations, since Jutoh generates Epub-like files before converting them to Mobipocket, but you will need to check Generate Epub in your Mobipocket configurations. Note that the generated Epub will initially have the same file name as that generated by your Epub configuration, so to avoid a clash, you may want to change the Book file name property in your Mobipocket configuration, to perhaps %FILENAME%_Mobipocket.

Note that checking a Mobipocket file can result in a lot of spurious ‘a’ tag (bookmark) errors because Jutoh optimizes the location of bookmarks in Mobipocket configurations in a way that EpubCheck doesn’t like. You can ignore these spurious errors. To labour the point, if both Epub and Mobipocket options are enabled within a configuration, then the Epub file generated by this configuration will be Mobipocket-oriented and therefore should only be used for checking purposes, and not delivered to customers.

The chances are high that if your Epub configuration passes the EpubCheck test, then files generated by your Mobipocket configuration will also be good, from a syntactic point of view at least. Also, Jutoh will catch most common errors, and the Kindlegen compiler will catch further fatal errors. So you may be content to use EpubCheck for your Epub configuration only.

Structural errors

Structural errors are overall problems with the project, some of which may be flagged by Jutoh at the end of the compile.

Here are some common structural errors.

Formatting errors

Some formatting problems are merely subjective aesthetic issues, and some will cause actual problems in your book.

I’m going to emphasize one particular issue before I list potential formatting problems, because this is crucial and sometimes hard to get across. The most common formatting mistake is using ad hoc styles throughout the document instead of planning ahead and creating styles for particular formatting needs, such as “Centred Picture”. Ad hoc (‘direct’) styling – applying different attributes such bold, centre, font size and so on directly to your text without selecting a named style – makes it very hard to change formatting throughout your document later, it introduces amateurish-looking inconsistencies in the project, and it generally makes editing the book difficult. So, please plan ahead and have a set of named paragraph styles you use for each formatting situation, for example headings, pictures with captions, pictures without captions, emphasized paragraphs, first paragraph after a heading, subsequent paragraphs, book title text, and so on.

Here are some of the issues you might have surrounding formatting.

Jutoh has a way to help clean up project formatting documents – it’s the menu command Book | Document Cleanup, which will show you the following dialog:

The Document Cleanup dialog

This will give you the option of removing erroneous spaces, ad hoc (automatic-style) font and size styling within spans of text, empty paragraphs, line breaks, and automatically-generated or unused bookmarks. It can also replace missing styles with specified ones, and convert blank lines to proper style-based spacing. Use this feature with caution since it can make a lot of changes to your project – back up your project first.

Another handy way of correcting styles is to use style find and replace, via the Edit | Find command, to do mass replacement of one style with another throughout your project.

You might want to use the Formatting Palette: show or hide it using the Format | Formatting Palette command or Alt+P. It gives you a list of styles to apply and makes it easy to see just what style has been applied at the current cursor position. It also has a tab listing all the favourite commands, styles and symbols that you have defined. For more on this, see Chapter 6: Editing and Formatting Content.

Content errors

Obviously there is a limit to what Jutoh can do about general content problems (writing style, typos, inaccuracies, and so on). However, there are a few features that can help:

Finally, it’s worth remembering that other people will usually be able to spot mistakes in your book much more easily than you can, so enlist the help of further pairs of eyes if you can.

Platform errors

Some publishing platforms have requirements over and above the usual ones, and can be picky about some style and content issues. We’ll look at several of the main platforms.

Smashwords errors

More general information about Smashwords can be found in Chapter 26: Understanding Ebook Formats and Platforms, so here we will confine ourselves to some of the errors that Smashwords might alert you to.

Kindle errors

Apple Books errors

When you submit your Epub for Apple Books to the iTunes site, you may find the book is rejected even though the file doesn’t cause problems with other retailers. See also Chapter 26: Understanding Ebook Formats and Platforms.

Lulu errors

Import/export errors

Import errors

You may sometimes get unexpected results when importing into Jutoh. Here are some potential issues.

Export errors

This is not really about Jutoh errors, so much as things that can go wrong in a chain of conversion starting with Jutoh output.

If you generate an ODT and wish to convert to, say, a Microsoft Word file, you can use OpenOffice or LibreOffice to convert it. However, the results can vary in quality depending on which version of the word processor you use, and what version of Word you choose to export to. If you have a copy of Word, you can experiment with what combination works best. In particular, if there are problems with list bullets, you can adjust the bullet font and Unicode symbol used for each kind of bullet, from the Options page on Jutoh’s Project Properties dialog.

It’s worth checking through a file exported by Jutoh and then converted to a different format before submitting to a distribution site such as Smashwords, to fix any errors such as the above. The majority of ebooks probably won’t encounter them anyway, particularly fiction books.

Expectation errors

While not exactly an error, this class of problem still causes head-scratching and support questions. If you come to Jutoh (and ebooks in general) with expectations of PDF-like complex layout, you will probably think there’s something wrong with the application when it refuses to import this kind of file. Because Epub and Mobipocket files are reflowable, they don’t tend to use absolute positioning and complex layouts. Likewise, Jutoh can’t import such files with much fidelity. If you have a book with elaborate layout, you will need to think about redesigning it to make use of simpler cues such as small images (such as ), indentation, colour, spacing, and pictures laid out simply.

If you want custom web-like features, this isn’t possible in Jutoh and indeed most ebook readers wouldn’t support it anyway. (Having said that, Jutoh Plus allows you edit HTML and JavaScript to create interactive ebooks if you have the necessary programming skills.)

It’s been my experience that users often want Jutoh to work in the particular way that their own favourite word processor works; customising shortcuts can help a bit there, but Jutoh is a specialist ebook creation tool and inevitably it works slightly differently than other applications. Your expectations, background, and the kind of book you will be creating with Jutoh can lead to quite different experiences with Jutoh but with a little use you should soon find it intuitive.

Third-party troubleshooting tools

We’ve mentioned the Epub checker, which will give you the assurance that you don’t have syntax errors in your books.

For previewing your Epub and Mobipocket (Kindle) files, you can download Adobe Digital Editions and Kindle for PC or Mac. They will become the default viewers when you click on Launch in Jutoh.

If you’re going to be creating Mobipocket books, another essential tool in your armoury is Kindle Previewer 3, which you can download for Windows and Mac from Amazon’s site. On Windows, you can get Jutoh to download and install Previewer automatically using Jutoh’s Setup Wizard available from the View menu; or you can click Help Me Install Kindlegen or Help Me Install Kindle Previewer in Preferences/Helpers. Previewer shows your book in an emulator for Kindle devices. There can be small differences in the display and navigation behaviour compared with Kindle for PC or Mac, plus you get to see what your book will look like on a much smaller screen, which might influence formatting decisions. On Windows, you can configure Kindle Previewer as a helper application (see Appendix B: Configuring Jutoh) so that when you click on Launch you have a choice of Default (Kindle for PC/Mac, if you have installed it) or Kindle Previewer.

You can install Nook and Kobo desktop applications to preview your Epubs though they don’t co-operate well with Jutoh and you’ll have to open books directly in these tools. In my view they’re pigs to use for local files, and are geared towards getting you to part with money for books in their catalogues. So you may be content to use Adobe Digital Editions to preview your work.

If you are distributing your book on Smashwords, the Meatgrinder application that runs when you submit the book may give you some information about the quality of formatting in your book.

Finally, of course, you can get a variety of ebook reader hardware as they’re getting ever cheaper, and test your files on these.

When using external reader applications alongside Jutoh, such as Kindle for PC, be aware that if the book is open in that application, Jutoh may not be able to create it again until you quit the book or close the application. Also, you should delete the book from the application’s library before launching it again because quite often you can end up looking at the old version of the book and wondering why nothing seems to have changed.

When all else fails

Don’t forget to use the Search Help field in the Jutoh toolbar to search for keywords. This searches the application help and also a ‘knowledge base’ with over a hundred short articles that answer specific questions without having to wade through all of the documentation. If you still can’t figure out what is going wrong with your book, do contact us (see the Support page for contact details), preferably sending your Jutoh project or a suitable sample and a detailed description of the problem. You never know, it might be a bug in Jutoh; in any case, we want to help you fix your problem if nothing in this chapter has helped. You can also join the anthemion-writingtools mailing list and raise the issue there. Don’t suffer in silence!

Summary

This chapter has armed you with the knowledge and tools to correct errors that you may encounter as you create your books. In the next chapter, we describe specific ebook formats and distribution platforms.


Contents | Start | End | Previous: Chapter 24: Advanced Topics | Next: Chapter 26: Understanding Ebook Formats and Platforms