Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-21-2013, 11:02 AM   #1
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
Sigil Indexing problem

I am in the middle of creating a multi-layer Index for the first time and have run into a problem.

Using the Sigil Index Editor here is the text I have selected to include and the Index Entries

HMS&nbsp;<em>Brighton</em> - Ships/UK
HMS&nbsp;<em>Illustrious</em> - Ships/UK
FF&nbsp;<em>Floréal</em> - Ships/Francs
SPS&nbsp;<em>Santa María</em> - Ships/Spain
SPS&nbsp;<em>Canarias</em> - Ships/Spain

The html code is used to a) keep the prefix and name together, b) <em> for local style.

The resulting rlevant lines in the generated index.html are:

Code:
<div class="sgc-index-entry">
      Ships

      <div class="sgc-index-entry">
        UK <a href="../Text/Chapter01.xhtml#sigil_index_id_7">1</a>, <a href="../Text/Chapter01.xhtml#sigil_index_id_20">2</a>
      </div>
    </div>
As can be seen, only the Words UK and Ships are being shown along with their location links. There are no names of ships.

I have other similar lists in my index which one of which is three levels and is working okay.

I've checked the code between them and don't see anything obvious.

What am I missing here? Please tell me.
mjmuk is offline   Reply With Quote
Old 02-21-2013, 01:23 PM   #2
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Try a "/" at the end of the entry, e.g. Ships/UK/

Without a slash it thinks you've given it a name to use as is. With a / it knows its a group and should use the name in the index field as the default name.
meme is offline   Reply With Quote
 
Advertisement
Old 02-21-2013, 04:38 PM   #3
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
Hi,

Thanks for the reply, I have added a / to the end of the each of the entries, and re-run the index, but now not even the Ships UK word are appearing in the index!!

So have taken out the / I added and rerun the index and still have nothing for this entry!

Is there some database somewhere that has got corrupted?

This is very frustrating.
mjmuk is offline   Reply With Quote
Old 02-21-2013, 04:51 PM   #4
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Are you using Mark for Index, or the Index Editor. You can't include html code in the Index Editor as it looks for non-html words.

How are your entries marked in HTML?
meme is offline   Reply With Quote
Old 02-21-2013, 05:08 PM   #5
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
Hi,

I am using only the Index Editor.

I am selecting the text from the main body of test then pasting it into the index editor.

These are the entries as they appear in the Index Editor

HMS Brighton - Ships/UK
HMS Illustrious - Ships/UK
FF Floréal - Ships/France
SPS Santa María - Ships/Spain
SPS Canarias - Ships/Spain

Regards

Mike
mjmuk is offline   Reply With Quote
Old 02-21-2013, 05:20 PM   #6
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
If you are using "HMS Brighton" in the Index Editor, then it will look for "HMS Brighton" and not "HMS&nbsp;<em>Brighton</em>". The <em> will invalidate a match.

You can use Mark for Index around the phrase manually each time it occurs in the book and it will work. More exact, but more tedious.

I'm not sure I can adapt the Index Editor to work with included HTML tags. Will give it some thought.

A workaround could be to change every "HMS&nbsp;<em>Brighton</em>" to "HMS Brighton", run the Create Index, then change them back to "HMS&nbsp;<em>Brighton</em>". But that's probably a one shot approach.
meme is offline   Reply With Quote
Old 02-21-2013, 05:30 PM   #7
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
On second thought try it with the em tags.
meme is offline   Reply With Quote
Old 02-21-2013, 05:40 PM   #8
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
I may have confused the issue by showing the coding around the Ships name in the original post. I'll try your suggestion and come back to you tomorrow.

regards

Mike
mjmuk is offline   Reply With Quote
Old 02-22-2013, 07:24 AM   #9
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
Hi, I have carried out some more tests and if I remove the &nbsp; from between the HMS and Ships name in the HTML content, then the Index is created correctly.
mjmuk is offline   Reply With Quote
Old 02-22-2013, 07:43 AM   #10
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
BTW I have tried using Entity Number * as a substitute for the &nbsp; but that gets stripped out when I run the Create Index, I guess Sigil does not support that method or am I getting too confused!
mjmuk is offline   Reply With Quote
Old 02-22-2013, 08:13 AM   #11
exaltedwombat
Evangelist
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 464
Karma: 1703930
Join Date: Nov 2011
Device: none
There's a strong argument that a simple list, along with the device's Search function is more useful in an eBook than a linked Index.
exaltedwombat is offline   Reply With Quote
Old 02-22-2013, 10:36 AM   #12
mjmuk
Junior Member
mjmuk began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Kobo
@exaltedwombat Yes that is true. But I am going to use the generated index.html source for some futher processing.
mjmuk is offline   Reply With Quote
Old 02-22-2013, 12:50 PM   #13
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
@mjmuk

After checking, the issue turns out to be &nbsp; as you worked out, but in a slightly different way.

The way the Indexer works is to collect all the text from a paragraph, for example, and then compare your Index Editor entry against that text. So it only sees and compares against text - not HTML code. Just copy the text as you see it in Book View and paste into the Index Editor. Don't use the string "&nbsp;" or HTML codes "<>" in the Index Editor.

But, unfortunately, the Index Editor converts all &nbsp; characters into spaces. So when it goes to match the space against the &nbsp; character in your text, it fails. I will change the program to automatically convert &nbsp; to a space before comparing to work around this in the next release.

There's another issue I found in testing this - if you use Mark for Index in Code View and select HTML tags (or type tag symbols in the dialog). It doesn't convert the & < > / correctly into the title attribute so it can produce invalid HTML if you select text containing HTML tags to use with Mark for Index, so that will need to be corrected as well.

It's may be that I will have to remove the functionality of using a semicolon ";" to allow multiple entries per line on an Index entry, since its required for HTML entities. Another character isn't as suitable and may have similar issues. But I don't think its a critical feature as you can just put one per line, which is more readable anyway.
meme is offline   Reply With Quote
Reply

Tags
code, errors, index, levels

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle indexing problem when using 'Send to Device' option soulfuldog Devices 3 12-22-2012 02:41 PM
Books indexing problem caused by the device. sirostr Amazon Kindle 1 07-08-2012 05:53 PM
Problem with Sigil bobcdy Sigil 4 10-26-2010 01:16 PM
Sigil problem or ???? crutledge Sigil 0 05-21-2010 05:47 PM


All times are GMT -4. The time now is 09:00 AM.


MobileRead.com is a privately owned, operated and funded community.