Contents | Start | End | Previous: Chapter 8: Creating Your Cover Design | Next: Chapter 10: Working With Pictures


Chapter 9: Understanding Configurations

Ebook publishers often have slightly different requirements, even if the same format is used. You may also wish to tailor Jutoh’s output for your own reasons. Jutoh’s configuration feature lets you change the way that ebooks are generated, so that you can tweak the output for one format or ebook platform without affecting others. You may not need to worry about configurations for a bit but once in a while you may come across the need to change configurations or even add new ones; so it’s worth at least scanning this chapter so you know where to look.

Configuration basics

At first glance, ‘configuration’ seems like a fancy name for ‘format’. In the Build tab of the Control Panel, before compiling, you select the appropriate configuration such as ‘Epub’ or ‘Mobipocket’, each of which is generally named after the format it targets.

However, configurations are much more than that. They contain a whole host of user-editable options that will be used for that configuration; and you can add as many configurations as you like. So, for example, you might like to have two Epub configurations, called ‘iBooks Epub’ and ‘Barnes & Noble Epub’, with slightly different behaviour for each.

A configuration can specify which cover design or style sheet to use – so you can have alternate versions of your book with different cover designs or formatting, without having to maintain different versions of the book.

Or you could have different configurations for generating images with different sizes, tailored for use on different kinds of reader device.

When you create a Jutoh project, Jutoh’s New Project Wizard presents you with the option to create an initial set of configurations, one per format supported. Generally you can leave the defaults as they are unless you know you definitely won’t need some of them. Later, you can add, change and delete configurations.

Important note: although you can enable different formats in the same configuration, don’t be tempted to do this for generating, say, Epub and Mobipocket files from the configuration. Jutoh optimizes these formats differently, so you need to use independent configurations.

Editing configurations

To edit a configuration, you can click on Edit on the toolbar to show the Project Properties, and then click on Configurations. Or, you can click on the Edit button next to the drop-down list of configurations in the Control Panel; this will show you the currently-selected configuration.

The Configurations page in the Project Properties dialog

Configuration properties are presented in a scrolling list, with names on the left and editable values on the right. Click on a property to see its description, displayed under the list. You can double-click on some properties (such as Notes) to show a larger text editor. To make it easier to find properties, you can type all or part of the property name in the search box at the bottom of the window; use the left and right arrows to cycle through the matches, selecting each matching property in turn. You can press the Return key to give the keyboard focus back to the property editor.

You can add a new configuration by clicking on Add – you will be given the option of basing the new configuration on an existing one (the values will be copied to the new configuration) or creating a configuration with defaults appropriate to the selected ebook format. You can delete the selected configuration with Delete , and change its name with Rename . If you want to apply the same configuration settings to a different project, you can Save selected configurations to a file and then Load them in the other project. Use the up and down arrows to reorder configurations in the list.

Using configurations

You can select the current configuration in the control panel to the left of the Jutoh editor. This configuration will be used to determine paths and other settings for Compile, Check and Launch commands.

To compile a book using the current configuration, click on the Compile button on the Control Panel, or click on the Compile button on the toolbar, or use Book | Compile menu command, or use the F7 keyboard shortcut. If you prefer, you can compile using multiple configurations in one go, using the Book | Batch Compile command; a choice of configurations to use is presented, as shown below.

Batch Compile dialog

Note that if you use the File | Export menu command to quickly export your book to a specified format, any formats specified in the currently selected configuration are temporarily overridden. All the other settings in the current configuration will be used for the export, so normally it’s best to select the best configuration for the job and press Compile.

While we’re talking about compiling, it’s worth pointing out that you can use the Update Special Book Sections dialog instead of updating the table of contents, index, or endnotes individually from their respective dialogs.

Update Special Book Sections dialog

If any of these special sections are out of date since the last compile (for example, you added headings, index entries or footnotes), you can show this dialog using Book | Update or F9, and click Update to update all checked special sections. Note that you can also elect to automatically update these sections when you compile (via controls in the Project Properties dialog), so you can be sure they are always up-to-date.

Configuration categories

Let’s look at the property categories in detail.

Locations

This category contains location-related properties. Usually you don’t need to edit these.

Metadata

This category contains just one property, Identifier.

Formats

Each configuration should have at least one format checked. You can have multiple formats checked, but this is not usually desirable. The one case where you might like to do that is in your Mobipocket configurations; if you also check Epub you will be able to check and view the source for your Mobipocket books.

These are the supported formats:

Cover Design

This category gives you control over the way Jutoh generates the cover design and cover page for your book.

Options

This category contains miscellaneous options controlling how Jutoh generates ebook output.

Styles

This category controls style-related options. More about styles can be found in Chapter 12: Working With Style Sheets.

String Tables

Jutoh’s string tables feature allows customisation of metadata, cover design text and book content per-configuration, by substituting one string for another. This category controls how the configuration uses existing string tables. For more information, see Chapter 13: Working With String Tables.

HTML Formatting

This category contains various options used for HTML-based formats.

Text Formatting

This category contains options for plain text (including Markdown) and ODT (OpenDocument Text) output.

Images and Media

This category contains options allowing you to control various aspects of image (picture) output. For more about images, see Chapter 10: Working With Pictures.

Advanced Formatting

This category contains options for controlling the way special formatting is output – whether to use special fields for the word processor to use, or by generating the content explicitly.

Chapter Separators

This category controls the output of textual separators between sections. By default there are no separators.

Fonts and Colour

This category contains options related to font handling.

Mobile

This category contains options for tailoring the way HTML pages are displayed in mobile devices.

Fixed Layout

This category contains options relating to fixed layout ebooks. Currently, fixed layout books are supported on iBooks, Kindle and Epub 3. For more information, see Chapter 18: Creating Fixed Layout Books.

Speech

This category contains an option for determining which speech profile is used for this configuration. There is always at least one speech profile, which all configurations initially use.

Navigation

This category contains options for tailoring the way navigation is supported in HTML pages (for the HTML format only). HTML templates specified here will be inserted into the HTML pages. Navigation controls can be placed at either the start or end of the page, or both. For each header or footer, there are three templates, to account for the fact that the presence of Next and Previous links will change according to whether you are currently viewing the first page, the last page, or the pages in-between. The default HTML templates give reasonable navigation between pages using text links; you could provide more fancy navigation, perhaps using images that you copy to the folder of HTML files after generation by Jutoh.

In the HTML templates, you can use these keywords: %TOCFILE%, %TOCTITLE%, %PREVIOUSFILE%, %PREVIOUSTITLE%, %NEXTFILE%, %NEXTTITLE%, %FIRSTFILE%, %FIRSTTITLE%, %LASTFILE%, %LASTTITLE%, %THISFILE%, %THISTITLE%. They will be replaced by the associated HTML file names and section titles.

Conditional Sections

This category lets you include or exclude sections from the final ebook. Note that if you use these properties to change the way sections are included in your book, you will need to regenerate the table of contents, alphabetical index, and endnotes for each configuration since these will also change according to configuration.

The last two options act on condition objects that bracket conditional content. Condition objects contain a list of tags that are matched against these options to include or exclude the content.

Commands

Sometimes you may wish to execute an external command before or after the compilation of your book. These properties allow you to specify such commands. Note that if executing a command using an interpreter such as Java or Python, you must specify the interpreter command in addition to the script to be executed.

Here’s an example command that runs the Kindlestrip program:

c:\python27\python.exe c:\apps\kindlestrip1.35\kindlestrip.py "%FOLDER%\%FILENAME%.%EXT%" "%FOLDER%\%FILENAME%_new.%EXT%"

Comments

These options control how comments are included in your ebooks.

Checking

General

These are the remaining options.

Summary

We’ve looked at configurations in some depth, and you should now know where to look when you wish to change the way Jutoh generates a particular ebook. Next, we go into the details of inserting, sizing and converting the pictures in your book.


Contents | Start | End | Previous: Chapter 8: Creating Your Cover Design | Next: Chapter 10: Working With Pictures