|
|
#16 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,334
Karma: 6686152
Join Date: Nov 2009
Device: many
|
Search does not use Python unless you are using Python function replace. So your use of external python on a Mac seems a bit strange but it is not the issue.
|
|
|
|
|
|
#17 | |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
Quote:
Sigil on my windows machine works with the file I sent you and you can't duplicate my issue on your Macs. So, I'm trying to figure out what, on my Mac, is causing the issue. The only thing that readily comes to mind is that I have a separate Python installation. Is there any way that could be causing this? I think our comments are in sync at this point. |
|
|
|
|
| Advert | |
|
|
|
|
#18 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 939
Karma: 3501230
Join Date: Jan 2017
Location: Poland
Device: Various
|
Show your "Find & Replace" window. It's probably something trivial, like the "Text" checkbox being selected.
|
|
|
|
|
|
#19 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,765
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
As a side note, hyphenation has been removed from the document. So when you run the regex, you are going to get a lot of split words.
lack of intel</p> <p>lectual integration will end up as lack of intel lectual integration There is no quick fix to that, as far as I am aware. |
|
|
|
|
|
#20 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
|
|
|
|
| Advert | |
|
|
|
|
#21 | |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
Quote:
|
|
|
|
|
|
|
#22 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,507
Karma: 62503986
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I have a whole lot of 'Join' saved searches cleanups I run.
Only the first 2 do I run as 'replace ALL' I also adjust the selector as needed. The tricky ones are honorifics. Not perfect, but it gets 90+% (copied from my sigl_searches.ini) Code:
63\Name=Cleanup/Joins/Join to upper 63\Find="([[:alpha:],][\"\x201d\xe2\x80\x9d]*)</p>\\s*<p\\b[^>]*>([A-Z\xe2\x80\x9c\"])" 63\Replace=\\1 \\2 64\Name=Cleanup/Joins/To Lower 64\Find="\\s*([a-z],*)</p>\\s+<p class=\"calibre1\">([a-z])" 64\Replace=\\1 \\2 65\Name=Cleanup/Joins/Join span Paras 65\Find="(?sm)([[:alpha:],])</span></p>\\s*<p class=\"MsoNormal1\"><span class=\"calibre5\">([a-z])" 65\Replace=\\1 \\2 66\Name=Cleanup/Joins/Upper-Upper 66\Find="([A-Z,][\"\x201d\xe2\x80\x9d]*)</p>\\s*<p\\b[^>]*>([A-Z\xe2\x80\x9c\"])" 66\Replace=\\1 \\2 67\Name=Cleanup/Joins/Trailing lower 67\Find="([a-z\\,])</p>\n\n <p class=\"calibre\\d+\">" 67\Replace="\\1 " 68\Name=Cleanup/Joins/Initials 68\Find=([A-Z]\\.)</p>\\s*<p\\b[^>]*>([\"\xe2\x80\x9c]*[A-Z]) 68\Replace=\\1 \\2 69\Name=Cleanup/Joins/RTGlwrUPR 69\Find=([a-z])([A-Z]) 69\Replace= 70\Name=Cleanup/Joins/Join lower dehyphen 70\Find="([[:alpha:],]\x9d*)-</p>\\s*<p\\b[^>]*>([a-z\x201c\x80\x9c])" 70\Replace=\\1\\2 71\Name=Cleanup/Joins/unsplit w hyphen 71\Find="([[:alpha:],]\xe2\x80\x9d*)-</p>\\s*<p\\b[^>]*>([a-z\xe2\x80\x9c])" 71\Replace=\\1-\\2 72\Name=Cleanup/Joins/LC join P 72\Find="</p>\\s+<p class=\"calibre\\d+\">((<i class=\"calibre\\d+\">)*[a-z])" 72\Replace=" \\1" 73\Name=Cleanup/Joins/Join P rem Heyphen 73\Find=([[:alpha:]])-</p>\\s*<p\\b[^>]*> 73\Replace=\\1 74\Name=Cleanup/Joins/Honorifics 74\Find="(Mr|Mrs|Ms|Dr|Prof)\\.</p>\\s+<p class=\"calibre\\d+\">([A-Z])" 74\Replace=\\1. \\2 75\Name=Cleanup/Joins/de BR punct 75\Find="([[:punct:]])<br class=\"calibre4\" />\\s+(\"*[A-Za-z\xe2\x80\x9c])" 75\Replace="\\1</p><p class=\"calibre3\">\\2" |
|
|
|
|
|
#23 |
|
Member
![]() Posts: 21
Karma: 10
Join Date: Jan 2021
Device: iBooks
|
Those are great, thanks.
|
|
|
|
|
|
#24 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,507
Karma: 62503986
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I found it was easier to make specific case S&R and step thru a book, that spend time and effort to make a Perfect solution
A Find is a 'skip' when the current view should not be replaced
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DOCX paragraphs listed as headings in navigation window | tage fredheim | Conversion | 2 | 07-26-2019 08:11 AM |
| Import an HTML or DOCX file -|- Format? | chaot | Editor | 1 | 05-19-2016 12:13 AM |
| conversion from docx to epub seems to break my paragraphs | xanguera | Conversion | 2 | 07-24-2014 01:28 AM |
| Dealing with bad formatting: "broken" lines inside paragraphs? | MelBr | Calibre | 5 | 08-26-2013 01:10 AM |
| Does Reader Memory Become Fragmented? | Michele | Sony Reader | 2 | 11-05-2006 02:44 PM |