![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
Indexing question
I am using indexing for the first time.
In the user guide (admittedly for 0.7.2) it states: To find indexed words you can search in Code View. Or you can highlight them in Book View in color by adding the following CSS temporarily to your stylesheet: [class="sigil_index_marker"] { color:#335500; } I have tried doing this and it doesn't work - or at least I can't get it to work. I have simply copied "[class="sigil_index_marker"] { color:#335500; }" into my stylesheet - is that right? I notice that some of the index entries in the text take the form of <a class="sigil_index_marker" title="XXXXXXXX" id="sigil_index_id_1">, but most take the form of <cite id="sigil_index_id_8"> or <p id="sigil_index_id_7">. Am I doing it right? Has something changed fro 0.7.2? Is there a way of highlighting indexed words in book view? Thanks Phil |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
Those instructions assume you have already built the index. To build the index you simply mark each word you want to add to the index (using the index menus) and then build it. It will create an index entry under each starting letter of the word in a new xhtm file called index.html.
Then once you have the index built you can see the indexed words in BV with your colouring css trick. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm honestly not familiar with the user guide, but if elements indeed exist in the html with a class attribute value of "sigil_index_marker", then I would expect to see something like:
Code:
.sigil_index_marker {color:#335500}; (provided the color is not being overridden somewhere else) Though there's technically nothing wrong with the way the guide suggests (provided the index has been already been generated as Kevin mentioned.) Last edited by DiapDealer; 12-14-2015 at 07:10 PM. |
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
I wonder if it would not be possible to make it using the spelling list. Let me comment this idea. When we check the spelling, we get an alphabetic list of all the words missing in the current dictionary. So, if we switch to a rare language, we can have this way a list of all the words in the book. To create an index then, the easiest would be to select on this alphabetic spelling list any candidate word we wish to index and click on a button named "Index this" which would create an index entry around all the occurrences of this selected word in the text files. Once we have selected and indexed this way all the needed words, we could click on another button "make index" which would build the index file. And then switch back to the original language (presumably with a last click ![]() Last edited by roger64; 12-14-2015 at 08:03 PM. |
|
![]() |
![]() |
![]() |
#5 | ||
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
Quote:
Thanks for your prompt reply. Yes, index already built, by a combination of "Mark for Index", and "Index Editor". Once I had it looking like I wanted, I then created the index, and it generated a new html file in the sidebar called "index.xhtml". However, when I used index editor, I went very broad, so would like to now go in an edit it down. I thought this would be easier if I could highlight the index marks in the text, hence my question. Quote:
Thanks. Yes, I thought something similar - I will have a play around with it some more. However, my suspicion is that I can get the ones in this form: "<a class="sigil_index_marker" title="text here" id="sigil_index_id_1">" to highlight, but I can't see a way to get the ones in the form: "<cite id="sigil_index_id_8">" or "<p id="sigil_index_id_7">" to highlight. Does anyone have any experience of this? Thanks all. |
||
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
So far as I know, the css trick in the manual:
Code:
[class="sigil_index_marker"] { color:#335500; } Entries that were indexed automatically using the Index Editor do not get wrapped in their own individual anchor tags. So the css trick will not highlight those words. You should be able to easily remove entries from the Index Editor that you no longer want by right-clicking on the entry (in the Index Editor), choosing 'Delete', Save, and then regenerating your index. Using the Index Editor will not affect any of the words you've manually marked for indexing. You can still find those by using the css trick you mentioned (or by using F&R in regex mode in Code View and searching for "sigil_index_id_\d+"). Once you find them, you can remove the index anchor tags from around them and then once again, regenerate your index. Last edited by DiapDealer; 12-14-2015 at 09:44 PM. |
![]() |
![]() |
![]() |
#7 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
Quote:
I appreciate your help. |
|
![]() |
![]() |
![]() |
#8 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
Gents,
There is a little bug in the indexing modules of Sigil. Its only very minor, so thought it wasn't worth a new thread, so I'll just post it here. Any "&"'s or "&"'s in the text (it doesn't matter which form they take), using either "manual" (mark for index) or "automatic" (using index editor) indexing are converted to "&"'s in the index, and thus throw up an "xmlParseEntityRef: no name" error each time the index is created. It's easy enough to fix - just by changing the "&" to "&" in the index....just very slightly inconvenient. Phil |
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
I'll take a look at it. Thanks for the bug report!
KevinH |
![]() |
![]() |
![]() |
#10 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
I have a fix for this, I will test out tonight and if it works, commit it to master. So it will appear in the next release.
|
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 67
Karma: 136594
Join Date: Jan 2013
Location: Hong Kong
Device: Kindle DX, Paperwhite, Paperwhite II, and Voyage
|
Thanks Kevin.
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,623
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
Congratulations for this brand new tool which is both handy and very easy to use. ![]() At least there is an easy way to create a real index!!! Up to now, if I am not wrong, if we wish to create an index in an EPUB out of a paper book which already has an old-fashioned index, we need to copy one by one each entry. Some books have very large indexes and this is an ungrateful work. One way to make it much quicker would be to be able to import say a csv file of entries or some ordered list. I can imagine that the entries would be made alphabetically (all the As, the Bs and so on.) Do you think it would be possible some day to import in the index editing window a list of entries? Under the button add one entry, we would have another, add a list of entries. Last edited by roger64; 12-21-2015 at 10:48 AM. Reason: typo - alphabetic list |
![]() |
![]() |
![]() |
#13 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
Since the location you mark in the text needs to be there as well, this is something better done in a plugin. The plugin could take the list of words, search and mark anywhere they are found in the text (not including index.html) and then a user would simply rebuild the index.
This is definitely doable in a plugin. Perhaps making a request on the Plugin Developers thread might prove useful. |
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#15 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,680
Karma: 23983815
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
1. Create a two-colum table in a spreadsheet and save it as a tab-delimited file and change the extension to .txt. (The second column is optional.) 2. Select Tool > Index > Index Editor or press CTRL+ALT+I. 3. Right-click in the white box, select Open from the menu and select your index file. 4. Click Save, Close and then select Tools > Index > Create Index. For more information, see the online help. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about indexing on basic e-reader | bonacker | Amazon Kindle | 9 | 02-01-2015 04:15 AM |
Troubleshooting Indexing | latepaul | Amazon Kindle | 13 | 01-15-2013 05:22 PM |
Question about disable indexing permanently by disabling access to "Search Indexes" | WS64 | Kindle Developer's Corner | 1 | 12-17-2011 05:51 PM |
kindle 3 indexing question | kpfeifle | Amazon Kindle | 2 | 09-06-2010 12:07 AM |
Question about indexing | Dragoro | Amazon Kindle | 4 | 02-25-2009 03:39 PM |