Big News!

InDesign CC has live ebook indexing! But, you may not care for the default indenting in the EPUB index output.

This is how we would like things to look, nicely indented:

normal spacing

But this is what InDesign CC is doing with the index:

indent

Those second level entries, modern and old style, are just barely indented. If you would like a bigger indent, edit the idGeneratedStyles.css file in your EPUB. You can make it look nicely indented with a few quick fixes.

Find these sections in the CSS file, and note the text-align value of left, margin-left values, and the text-indent values for each style.

p.Index-Level-1 {
color:#000000;
font-family:"Times New Roman", serif;
font-size:0.833em;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:1.2;
margin-bottom:0;
margin-left:2.25em;   <<<<---------- change this to this value
margin-right:0;
margin-top:0;
orphans:1;
page-break-after:auto;
page-break-before:auto;
text-align:left;   <<<<---------- and this
text-decoration:none;
text-indent:-2.25em; <<<<<<<<<-------- and this
widows:1;
}
p.Index-Level-2 {
color:#000000;
font-family:"Times New Roman", serif;
font-size:0.833em;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:1.2;
margin-bottom:0;
margin-left:3.75em; <<<<<<--------- and this
margin-right:0;
margin-top:0;
orphans:1;
page-break-after:auto;
page-break-before:auto;
text-align:left;   <<<<<<<---------- and this
text-decoration:none;
text-indent:-2.25em;  <<<<<<------------ you get the idea
widows:1;

For p.Index-Level-3 it should have a left margin of 5.25em and a text-indent of -2.25em.
For p.Index-Level-4, it should have a left margin of 7.00em and a text-indent of -2.25em.

That will give you bigger indents on every ereader.

For those of you who are sticking with CS6, you need to know that InDesign CS6 and prior versions have the unfortunate feature of stripping out embedded index entries when it exports to ePub. As more and more publishers want to produce epub versions of their books, this has become an issue: how do we get linked and active indexes as an output from InDesign?

Olav Martin Kvern has written a set of Creative Commons scripts for InDesign to help publishers get around this issue. With the help of Joshua Tallent of eBookArchitects.com, the first book has been completed and tested. Take a look at Playborhood, by Mike Lanza. (Kindle version: http://amzn.to/KvQZJr) A conversion house such as eBookArchitects.com will be needed to convert the epub files and matching index into validated epub format and Kindle formats.


The scripts allow you to build an index outside of InDesign - one that does not use InDesign's markers. Instead, professional indexing software is used (Cindex, Macrex or Sky). You could probably even use Excel, but you won’t have an index compiler.

The InDesign scripts put hyperlinks, and notes showing the hyperlink anchor's text, in each paragraph of a book's files. There must be a book file. If the script hits a long paragraph, it puts in a mid-paragraph anchor.

Once the anchored hyperlinks are inserted, there is a script that checks to be sure each hyperlink reflects the current page number. This allows the publisher to freeze the InDesign files, and develop both the print and the epub index from one file.

There is a script for removing notes and starting over, in case of page number errors.

The final script takes an exported index from professional indexing software saved as .txt, and checks each link in the index to be sure there is a matching link in the InDesign files. No typos... therefore hopefully no bad links.

For the print version of the index, there is a GREP routine for making the hyperlinked index into a regular print-style index, so it can be laid out in InDesign, and go to print. This only works if the publisher freezes the files and allow no text rolls in the files while indexing is ongoing. This allows both the print index and the epub index to be created from one file.

Advantages:
The InDesign files can go back to the publisher after the first two steps. As long as major text changes are not done in-house at the publisher’s, and the hyperlinks not removed or corrupted, the files can go through last minute copy edits and art tweaks. Text content has to be maintained where it was, or at least on the same page. If text tolls to other pages, the index will be off. Communicating with the indexer can allow the index to be corrected.

When the files are exported by InDesign as epub, the notes are removed, but the hyperlinks remain. With the associated hyperlinked index file generated by the indexing software, a conversion service such as eBookArchitects.com can create a linked index for the ebook, one that links to the paragraph level.

At the same time the scripts allow for a print index for the print run.

Rigid file control is required, but the result is a hyperlinked index to the paragraph level in epub, and a matching print index.

Disadvantages:
Hyperlinked PDF indexes exported from the InDesign files would only be available with the use of Sonar Activate. There are no InDesign index markers in the files.

If the files have to be changed, reflowed, or edited heavily, the index will have to be updated manually. But, because the index is in professional indexing software, it can be viewed and sorted in page-number or link-number order, and adjusted. These kinds of changes should be minimized, though, because large changes get really tedious and costly.

The scripts rely on professional indexing software, or using Excel to build the index. Using Excel won't deliver a print edition of the index, but it can be done for an epub-only index.

There is more documentation to come for Macrex users and for creating an Excel-based index.

If you use the scripts, it is only fair that you buy Ole Kvern a beer. He has graciously released these for free under Creative Commons, and it would be nice for him to have a “Thank you” from everyone who uses them.

Buy Ole a Beer!







To use the scripts, you can download them at
http://dl.dropbox.com/u/2248375/AddRemoveIndexNotes.zip.
Documentation for the scripts can be downloaded at
http://dl.dropbox.com/u/2248375/Script%20documentation.pdf
Exporting instructions that update the information above can be downloaded here:
http://dl.dropboxusercontent.com/u/2248375/Exporting%20instructions%20Indesign%20Scripts.docx

Contact Wright Information at jancw@wrightinformation.com, or call 505-281-2600