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 05-17-2018, 04:26 AM   #1
1v4n0
Zealot
1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.
 
Posts: 108
Karma: 28458
Join Date: Oct 2013
Device: kindle
[BUG] Index lists all words starting with string

Sorry for the obscure title. I just discovered a bug, not sure if it's specific to the latest version or if it was there already.

The index creator lists all the instances of words that start with the "text to include", as opposed to what it should do, that is listing only the instances of that specific string on its own.

That is, if I add an index entry with "text to include" just the letter "a", the index lists all the occurrences of words that start with "a", whereas it should only list the occurrences of word that are exactly a.

Hope I was clear.

Also, I'd like to know if the index is case-sensitive.
1v4n0 is offline   Reply With Quote
Advert
Old 05-17-2018, 10:22 AM   #2
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,935
Karma: 1922532
Join Date: Nov 2009
Device: many
No, it is not a bug. It is working as designed. The "Text to include" is a pattern (ie regex). Please see the Sigil User Manual about using the Index Editor.

One possible pattern to look for the single character word "a" might be the following: \sa\s
where the \s indicates any amount of whitespace
KevinH is offline   Reply With Quote
Old 05-17-2018, 10:25 AM   #3
1v4n0
Zealot
1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.
 
Posts: 108
Karma: 28458
Join Date: Oct 2013
Device: kindle
Aha ok. I had thought about the whitespace, but then it would miss the instances where the word is followed by punctuation, right?
1v4n0 is offline   Reply With Quote
Old 05-17-2018, 10:27 AM   #4
Tex2002ans
Guru
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: 976
Karma: 5860817
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by 1v4n0 View Post
Aha ok. I had thought about the whitespace, but then it would miss the instances where the word is followed by punctuation, right?
Then you should be able to use:

Code:
\ba\b
\b is a "word boundary".

You can read about it on Regular-Expressions.info's page on Word Boundaries.
Tex2002ans is offline   Reply With Quote
Old 05-17-2018, 10:38 AM   #5
1v4n0
Zealot
1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.
 
Posts: 108
Karma: 28458
Join Date: Oct 2013
Device: kindle
Thank you. I just tried it and it almost works: it unfortunately matches accented letters as if they were word boundaries:
Code:
\ba\b
matches ŗa, aŤ, etc.
1v4n0 is offline   Reply With Quote
Old 05-17-2018, 10:44 AM   #6
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,935
Karma: 1922532
Join Date: Nov 2009
Device: many
You could try:

[\s'"]a[\s."'!:;]

or whatever set of punctuation marks you want.

Last edited by KevinH; 05-17-2018 at 10:46 AM.
KevinH is offline   Reply With Quote
Old 05-17-2018, 10:46 AM   #7
1v4n0
Zealot
1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.
 
Posts: 108
Karma: 28458
Join Date: Oct 2013
Device: kindle
Thank you, that seems to do the trick, even though I was hoping for something more direct, to match any non-letter string.
1v4n0 is offline   Reply With Quote
Old 05-17-2018, 11:01 AM   #8
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,935
Karma: 1922532
Join Date: Nov 2009
Device: many
Using regex is about the only way to generate a controlled list of words to index. A more precise way to is manually mark each word to be included in the index.

Sometimes for complicated index entries I use Find/Replace in regex mode and then manually mark the ones I actually want in the index as opposed to minor references.
I do this as a final step while proofing a near final document.

You can also right click in the Index Editor and open a tab separated "word" list (really pattern list) and build the list of patterns that way.

As I read/proof I sometimes simply add text patterns for words I want indexed to an open text editing window instead of marking them directly.
KevinH is offline   Reply With Quote
Old 05-17-2018, 12:03 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 18,162
Karma: 93500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by 1v4n0 View Post
Thank you. I just tried it and it almost works: it unfortunately matches accented letters as if they were word boundaries:
Code:
\ba\b
matches ŗa, aŤ, etc.
Turn on the Unicode Character Properties for \B\b \S\s \W\w with the (*UCP) modifier.

Instead of merely:
Code:
\ba\b
Use:
Code:
(*UCP)\ba\b
Then unicode characters shouldn't be detected as word boundaries.

Last edited by DiapDealer; 05-17-2018 at 12:06 PM.
DiapDealer is online now   Reply With Quote
Old 05-17-2018, 01:28 PM   #10
1v4n0
Zealot
1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.1v4n0 solves Fermatís last theorem while doing the crossword.
 
Posts: 108
Karma: 28458
Join Date: Oct 2013
Device: kindle
It works! Thank you.
1v4n0 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reader HTML/CSS bug lists nabsltd Which one should I buy? 3 07-20-2017 05:51 AM
Setting another series starting index RotAnal Library Management 8 03-06-2017 09:21 AM
Formatting bug in iPad KIndle App - ordered lists Oxford-eBooks Kindle Formats 7 11-30-2015 06:09 AM
string index out of range when setting foldename jomaweb Calibre 13 05-23-2010 04:49 AM


All times are GMT -4. The time now is 10:04 AM.


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