Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-31-2025, 05:02 PM   #1
fogice
Addict
fogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Time
 
Posts: 254
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
Searching within stylesheet.css?

Is there a way to search through the stylesheet for certain elements? For instance, I have a book where the author decided that everything needed lots of space between the lines. So I want to search stylesheet.css for 'line-height' and delete those lines. But the Calibre Editor says that "No matches were found".

Anyone know how to accomplish this?
fogice is offline   Reply With Quote
Old 03-31-2025, 05:18 PM   #2
Comfy.n
want to learn what I want
Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.Comfy.n ought to be getting tired of karma fortunes by now.
 
Posts: 1,611
Karma: 7891011
Join Date: Sep 2020
Device: none
Tools -> Filter style
Comfy.n is offline   Reply With Quote
Advert
Old 03-31-2025, 05:21 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,741
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by fogice View Post
Is there a way to search through the stylesheet for certain elements? For instance, I have a book where the author decided that everything needed lots of space between the lines. So I want to search stylesheet.css for 'line-height' and delete those lines. But the Calibre Editor says that "No matches were found".

Anyone know how to accomplish this?
It may not be line height. It may bea margin settings. Looks at the average paragraph and see what the class is.
JSWolf is online now   Reply With Quote
Old 03-31-2025, 05:51 PM   #4
fogice
Addict
fogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Time
 
Posts: 254
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
Quote:
Originally Posted by Comfy.n View Post
Tools -> Filter style
Perfect, thanks!
fogice is offline   Reply With Quote
Old 03-31-2025, 05:52 PM   #5
fogice
Addict
fogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Time
 
Posts: 254
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
It may not be line height. It may bea margin settings. Looks at the average paragraph and see what the class is.
I was looking at the stylesheet, and individually deleting the 15 different line-height classes worked, but that was the hard way.
fogice is offline   Reply With Quote
Advert
Old 03-31-2025, 05:57 PM   #6
rwmcafee
Connoisseur
rwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it isrwmcafee knows what time it is
 
Posts: 56
Karma: 2024
Join Date: Apr 2011
Location: Southern Idaho
Device: Samsung Galaxy Tabs
I just had a book that had a <p class> with a hidden space between each normal paragraph. Which then changed every few chapters.

So, you might have this problem too. You have to search for these code(s) and leave the replace with a blank.
rwmcafee is offline   Reply With Quote
Old 03-31-2025, 06:06 PM   #7
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by fogice View Post
But the Calibre Editor says that "No matches were found".
For future reference, all you need to do is change the search mode to "All style files".
See image...
Attached Thumbnails
Click image for larger version

Name:	SearchMode.jpg
Views:	74
Size:	32.3 KB
ID:	214783  
Karellen is offline   Reply With Quote
Old 03-31-2025, 06:10 PM   #8
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by fogice View Post
Is there a way to search through the stylesheet for certain elements? For instance, I have a book where the author decided that everything needed lots of space between the lines. So I want to search stylesheet.css for 'line-height' and delete those lines. But the Calibre Editor says that "No matches were found".

Anyone know how to accomplish this?
Quality Check Plugin: Search ePubs: <choice of where> <expression>,,,
Attached Thumbnails
Click image for larger version

Name:	QCsearch.JPG
Views:	81
Size:	31.3 KB
ID:	214784  
theducks is offline   Reply With Quote
Old 04-01-2025, 10:16 AM   #9
fogice
Addict
fogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Time
 
Posts: 254
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
Quote:
Originally Posted by Karellen View Post
For future reference, all you need to do is change the search mode to "All style files".
See image...
Another good option, thank you!
fogice is offline   Reply With Quote
Old 04-01-2025, 10:17 AM   #10
fogice
Addict
fogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Time
 
Posts: 254
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
Quote:
Originally Posted by theducks View Post
Quality Check Plugin: Search ePubs: <choice of where> <expression>,,,
I keep trying to learn Regex, and it just doesn't stick. But this might help someone else.
fogice is offline   Reply With Quote
Old 04-01-2025, 01:02 PM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by fogice View Post
I keep trying to learn Regex, and it just doesn't stick. But this might help someone else.
There are a couple of good tutorials here at MR.
Get yourself a REGEX cheat sheet.

The majority of my REGEX is basic level with a few intermediate

My Kobo hates letter spacing (OK I hate the results)
This is the simple REGEX I use to find book I have not fixed.
Code:
\s\s\sletter-spacing
The reason for the \s Any White space) is I comment out that line with the editor
Code:
\* letterspacing: the value; *\
, so it will not find again, but leave a note about the way it was.
theducks is offline   Reply With Quote
Old 04-04-2025, 05:46 PM   #12
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by fogice View Post
I was looking at the stylesheet, and individually deleting the 15 different line-height classes worked, but that was the hard way.
Calibre Editor > tools > transform styles

See the attached picture
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	78
Size:	45.6 KB
ID:	214851  
capink is offline   Reply With Quote
Old 04-04-2025, 06:18 PM   #13
Highroller
Zealot
Highroller has a complete set of Star Wars action figures.Highroller has a complete set of Star Wars action figures.Highroller has a complete set of Star Wars action figures.Highroller has a complete set of Star Wars action figures.
 
Posts: 143
Karma: 338
Join Date: Nov 2004
Device: Ebookwise 1150, Jetbook Lite, Slick Er-701
Sometimes the Calibre Editor doesn’t search the way you’d expect. You might try opening your stylesheet in a different text editor like Notepad++ or Sublime Text.
Highroller is offline   Reply With Quote
Old 04-08-2025, 10:43 AM   #14
fogice
Addict
fogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Timefogice possesses cleverness exceeding the boundaries of Space and Time
 
Posts: 254
Karma: 49504
Join Date: May 2014
Device: Kobo Libra 2
Quote:
Originally Posted by capink View Post
Calibre Editor > tools > transform styles

See the attached picture
That's a pretty elegant method, thanks.
fogice is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking to CSS stylesheet mossman26 Sigil 2 07-16-2020 02:38 PM
pagestyle.css extra / integrated in stylesheet.css / or not at all? chaot Workshop 14 02-24-2017 11:10 PM
stylesheet.CSS anyone? ProDigit ePub 81 12-26-2015 01:43 PM
Converting cm to em in css stylesheet roger64 ePub 41 06-13-2014 01:00 PM
Where is the stylesheet.css? roger64 Sigil 4 03-23-2010 02:12 PM


All times are GMT -4. The time now is 01:00 PM.


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