View Single Post
Old 12-12-2021, 02:22 PM   #2
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by roland1 View Post
Hi folks. First post.
Hey. Welcome to MobileRead!

Quote:
Originally Posted by roland1 View Post
I'm using SIGIL to create an ebook for a non-fiction book that I've already released in paperback and hardcover. It has a fairly extensive index with a lot of sub-topics and cross referencing.
1. What's the original format? DOCX? InDesign?

2. Is this a plain Index? Or is it a fully linked Index?
  • Plain Index
    • You just have a formatted list of terms + page numbers.
  • Fully Linked Index
    • The exact location of your words/terms are marked within the text.
    • You can "update" the Index, then Word/InDesign/whatever will generate all new page numbers + formatting for you.

(If "parrots" moved from page 100->120, will you have to manually update everything? Or will the source file update itself?)

Quote:
Originally Posted by roland1 View Post
P.S. I'm also a web designer so the ebook xhtml stuff is a breeze. But the logic behind using SIGIL for this one index task remains a mystery.
Fully linking Indexes in ebooks is... very intensive + arguably not that beneficial (see all the in-depth links/topics far below).

- - -

1. If you don't mind a plain index:

Then insert it into the ebook as is.

(This is what I do.)

2. If you insist on fully linking your index:

Go back to the source files and generate Real Page Numbers (RPNs).

(While you're at it, you can generate the EPUB PageList!)

3. Don't insert the index file into the ebook at all.

(Many publishers decide to do this. I don't agree. A dumb/plain index is better than no index at all... even if "an ebook has search"... Indexes serve completely different purposes.)

Quote:
Originally Posted by roland1 View Post
Q. What is the best way to add "See also" lines to the index? Also, each time I update the index, are those new lines going to get overwritten again? (I don't want to create new file; I want everything written into one file and to stay there).
Don't use Sigil's Index Editor.

Work from what you already have:
  • the source files
  • the print book's Index

If you still want to go through with this...

- - -

Your best bet is probably:

Step 1. Recreate Real Page Numbers (RPNs).

(Marking the HTML with a <a id="page123"></a> where the pagebreaks occur.)

PDF:

Code:
This is an example that was split

-----------------

between two pages.
HTML:

Code:
<p>This is an example that was split<a id="page123"></a> between two pages.</p>
Step 2. Take your current plaintext Index, then use regex to convert all the numbers into links:

PDF:

Spoiler:
Code:
Animals
	cats, 5
	dogs, 123
	parrots, 200
[...]
Mammals. See also Animals.


HTML (Plain Index):

Spoiler:
Code:
<p class="index">Animals</p>
<p class="indextwo">cats, 5</p>
<p class="indextwo">dogs, 123</p>
<p class="indextwo">parrots, 200</p>
[...]
<p class="index">Mammals. <i>See also</i> Animals.</p>


HTML (Linked Index):

Spoiler:
Code:
<p class="index">Animals</p>
<p class="indextwo">cats, <a href="../Text/merged.xhtml#page5">5</a></p>
<p class="indextwo">dogs, <a href="../Text/merged.xhtml#page123">123</a></p>
<p class="indextwo">parrots, <a href="../Text/merged.xhtml#page200">200</a></p>
[...]
<p class="index">Mammals. <i>See also</i> Animals.</p>


Step 3. Convert your HTML <a href="page123"> links into:
  • EPUB2 (pageList)
  • EPUB3 (page-list)

You can then use Doitsu's "PageList" plugin for Sigil to generate the required RPN files for your EPUB.

- - - - - -

For more detailed information, see some of the recent topics on this:

If you need even more information, you may also want to look this up in your favorite search engines:

Code:
RPNs Tex2002ans site:mobileread.com
RPNs Hitch site:mobileread.com

Indexes EPUB Tex2002ans site:mobileread.com
Indexes EPUB Hitch site:mobileread.com
Me and Hitch (and others) have discussed this to death over the years.

We even covered how useful linked Indexes in an ebook even are... if the relevant text could be multiple "screens" away. For example, the famous:

Quote:
Originally Posted by roland1 View Post
I've managed to get everything to work except that I'm not sure how to approach adding "See also (topic here)" after the index topic.
Sigil's Index Editor really isn't meant for generating things like that.

It was designed to (dumbly) link to all references of a word/term.

It wasn't designed to generate complicated Indexes + Index formatting like:
  • See also
  • 123ff.
  • 123n
  • 123n10
  • 123–150
  • [...]

- - -

Side Note: I'd argue that this "concordance" (a list of all usages of a word) is even worse than no Index at all!

Side Note #2: I'd even argue this form:

Code:
example [1], [2], [3]
word [1], [2], [3]
is also completely unhelpful for actual readers.

Last edited by Tex2002ans; 12-12-2021 at 03:34 PM.
Tex2002ans is offline   Reply With Quote