Leanpub author Jutta Eckstein has kindly shared the details of her experience making an index for her Leanpub book, including the details of how she dealt with also attaching an index to Leanpub's Print-Ready PDF export option, which is used by authors who want to make print copies of their books available.
If you're a Leanpub author and you have experiences of your own to share with other authors, on this or any other issue, please email us at firstname.lastname@example.org!
For the context: I'm writing the book in Markdown and use Dropbox. For generating the index I use the pdfindexgenerator (https://www.pdfindexgenerator.com).
The two toughest problems I encountered (there were a few others):
- When creating the index on the generated book (not the print-ready), the page numbers differ later on, because the print-ready ensures that parts and chapters are always starting at the right hand side (for the regular pdf parts and chapters just start on the following page)
- Generating the index from the print-ready was difficult, because the font I used (and liked) Linux Libertine appears in print-ready slightly different than in the regular pdf. The biggest difference is that 'ch' is merged to one character, so that pdfindexgenerator can't recognize them as two characters. So e.g. instead of the word 'challenge' it only finds 'allenge' not knowing what to do with the strange merged character 'ch'. (BTW this is verifiable, if you open this file and search for 'airman' place your cursor in the word and try to walk between c and h. It's not possible, it's one character... And if you open this file and look for the 'airman' you can place your cursor between c and h. So also the same font the print-ready appearance differs from the regular pdf.)
So I looked for other fonts that I liked. I'm now using Deja vu serif. Yet, this font is larger than Linux Libertine so I also changed it from 11pt to 10pt. This way my book ends up with about the same size. Note, I've only changed the body font.
The next steps are quite straight forward:
- generate a print-ready
- open pdfindexgenerator, read in the print-ready
- define your necessary settings (note these settings are stored as a "project" in the tool, and you can reuse them the next time), eg:
- page range (if you don't want to index words on pages i, ii, ...)
- define your words to include and to exclude
- define the theme that matches best your font (I'm using Times Roman, and I've liked it better with smaller font size e.g. 9pt for normal words, 11pt for header words)
- space sensitivity 0.2 (the default 0.3 seems not to match with Leanpub's output)
- paginator top left-right (that's what I have in the remainder of the book)
- generate index
- again do whatever is needed for creating the index you like, eg
- remove duplicates & plurals
- if you use header words, you might want to assign sub-headers to the header words
- write index:
- to end of book
- ensure you start the page numbering so that it fits the book page numbers
So the index is now at the end of your book and the next time you're creating a new release everything listed under (3) is already done, because it's saved in the settings.