![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
|
Some searches don't respect "all text files"
I have several books with this in each file, in the <style> part of the file header:
Code:
.para-center { font-size: small; text-indent: 0; font-family: serif; text-align: center; } But, If I just search for "small" or "font" or "family", it finds everything in all the files - Ctrl-N gives the right number, and I can step through them all, whether they are in the headers or the text. I tried searching for the whole block of text...it found and replaced 27 out of 58 occurrences, which is even worse than just doing one file, because you don't really know what it's done. I finally resorted to regex (.para-center{.*?}), and that seems to work reliably. Anybody have any idea what could be blocking the multi-file search? Thanks! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,355
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Your files might look identical but they are not atually identical. There might be extra spaces or invisible characters, etc
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,220
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
And I would suggest moving those styles to a single stylesheet just to make it easier to manage and edit.
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,060
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
![]() |
#5 |
Book E d i t o r
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
|
One trick that works for me all the time is to hit the Beautify Files button and then do the search. When I don't do that, the search will not find all occurrences.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
|
Thanks everyone...
Yep, I agree that styles belong in a css file, not a text file. That's what I ended up doing. I just hit this weird behaviour while I was trying to figure out how this particular book worked, and it bugged me no end. And yes, beautifying files can help...along with "\s+" in the right places to allow for variable spaces and lines. Sometimes I'll even do a regex: replace \n with a space character, then replace two space characters with one until the replacements hit zero...that really cleans up a raggety file. I've hit other odd - very odd - cases where the "select all files" did not seem to work, but this was the first one that seemed to have some consistency to it, enough that I could try and figure it out. Still confused, but at a higher level! Last edited by retiredbiker; 06-23-2018 at 09:48 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre-generated epub (from .docx) gives "e21027" "multiple opf files" on KindleGen | GhostRider | Conversion | 2 | 08-28-2024 10:14 AM |
Find / Replace does not respect "down" setting | DrChiper | Editor | 24 | 01-26-2014 06:10 PM |
CSS to "wrap" text between two .xhtml files? | december | Sigil | 28 | 12-06-2013 03:29 PM |
KT "Ghost covers/files" again at 670 books, "stale" image entries in firmware | VirgoGirl | Kobo Reader | 4 | 04-06-2012 02:10 PM |
"Settings," then "311" - Int'l Kindle searches for wireless providers in the area | Dr. Drib | Amazon Kindle | 2 | 08-28-2011 10:27 AM |