Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-12-2026, 07:38 PM   #46
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,880
Karma: 64184592
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 Mr_H_Poirot View Post
5 mins is very quick, but then I guess you are very experienced.

I confess to having got intrigued. I'm not going to start editing all my ebooks but I have got some short pdfs that I may convert into epubs just to play around
I am doing mostly a CSS edit.
The editors both have a jump to link or style, so I simply right click the Class= for the object of my displeasure . For most, tat is all. For some others (not the 5min crowd), I have to work back in the nest.

Nothing I work on (fiction), is complicate (eg fixed layout)
theducks is offline   Reply With Quote
Old 07-12-2026, 08:18 PM   #47
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 15,423
Karma: 248000019
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by theducks View Post
The editors both have a jump to link or style, so I simply right click the Class= for the object of my displeasure .
In the calibre editor? I haven't been able to find such a function.

Edit: never mind, found it.

Last edited by Sirtel; 07-12-2026 at 08:26 PM.
Sirtel is offline   Reply With Quote
Advert
Old 07-13-2026, 02:10 AM   #48
Mr_H_Poirot
Connoisseur
Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.Mr_H_Poirot 's shirt has a full set of merit badges.
 
Posts: 64
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
The pdfs are 4 pages long. I am not going to convert them. Just manually copy and paste text into sigil. Essentially create from scratch
Mr_H_Poirot is offline   Reply With Quote
Old 07-13-2026, 07:23 AM   #49
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: 84,137
Karma: 153695583
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 icallaci View Post
Interesting discussion. My cleanup routine takes about 15 minutes per book on average. My rule of thumb for tags and classes has always been: if the default behavior of a tag does what I want, then I leave it alone. If I want to change the default behavior, then I define a class. Since the default behavior of <p> is non-indented, I define a class for indented paragraphs. Hearing other viewpoints and the reasons behind them is thought-provoking.
But you can override the default behavior of p in CSS. And it's a good idea to do so so you can add widows and orphans both with a value of 1. Also, if you change the default behavior of some tags, make a clip in Sigil and calibre that have all of these tags in CSS. That way you can add to the CSS when editing. When you finish and remove excess CSS, you will get rid of any of your CSS you are not using. Here's how p should look (IMHO).
Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  widows: 1;
  orphans: 1;
  text-indent: 1.2em;
}
JSWolf is offline   Reply With Quote
Old 07-13-2026, 09:34 AM   #50
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 846
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
As I said, I leave default behavior alone. You can do what you want. I do not want to change default behavior. If I need different behavior than the default, I define a class. Then I KNOW I have changed it. Simple and consistent. Since you can't change my mind, this will be my last comment on the subject, although I'd be interested in how other people handle bare tags.

Quote:
Originally Posted by JSWolf View Post
But you can override the default behavior of p in CSS. And it's a good idea to do so so you can add widows and orphans both with a value of 1. Also, if you change the default behavior of some tags, make a clip in Sigil and calibre that have all of these tags in CSS. That way you can add to the CSS when editing. When you finish and remove excess CSS, you will get rid of any of your CSS you are not using. Here's how p should look (IMHO).
Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  widows: 1;
  orphans: 1;
  text-indent: 1.2em;
}
icallaci is offline   Reply With Quote
Advert
Old 07-13-2026, 10:12 AM   #51
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 15,423
Karma: 248000019
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
I don't rename existing css classes or replace them with my own. I just change what they do. Sometimes I may add a class, then I give it a totally random name. Building a whole new stylesheet with new names is far more effort than I want to spend on a single book.
Sirtel is offline   Reply With Quote
Old 07-13-2026, 11:18 AM   #52
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 846
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Interesting, thanks. I mostly leave existing class names alone too, but I've found that in books with a ton of errors, class names like "p34," "p35," "p36," etc. make things more difficult for me. So in those cases I will rename them, but not often.

Quote:
Originally Posted by Sirtel View Post
I don't rename existing css classes or replace them with my own. I just change what they do. Sometimes I may add a class, then I give it a totally random name. Building a whole new stylesheet with new names is far more effort than I want to spend on a single book.
icallaci is offline   Reply With Quote
Old 07-13-2026, 11:43 AM   #53
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: 84,137
Karma: 153695583
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 icallaci View Post
As I said, I leave default behavior alone. You can do what you want. I do not want to change default behavior. If I need different behavior than the default, I define a class. Then I KNOW I have changed it. Simple and consistent. Since you can't change my mind, this will be my last comment on the subject, although I'd be interested in how other people handle bare tags.
Have a look at the code for the book I just posted in the library here.

https://www.mobileread.com/forums/sh....php?p=4598023
JSWolf is offline   Reply With Quote
Old 07-13-2026, 11:56 AM   #54
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 846
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Your code demonstrates why I define classes and don't use bare tags. In your CSS, you define h2 + p as non-indented, but it doesn't work because the <h2> tag is followed by <p class="ph"> and not <p>. So all of your first sentences are indented, which I assume is not what you meant to do.

Quote:
Originally Posted by JSWolf View Post
Have a look at the code for the book I just posted in the library here.

https://www.mobileread.com/forums/sh....php?p=4598023
icallaci is offline   Reply With Quote
Old 07-13-2026, 04:13 PM   #55
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: 84,137
Karma: 153695583
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 icallaci View Post
Your code demonstrates why I define classes and don't use bare tags. In your CSS, you define h2 + p as non-indented, but it doesn't work because the <h2> tag is followed by <p class="ph"> and not <p>. So all of your first sentences are indented, which I assume is not what you meant to do.
That is a mistake. I meant to go back at the end and add in the correct call to remove the indent. I have fixed it and posted a new version. The h2 + p was supposed to have been removed. But it would noy have caused any problem at all. It would have been a redundancy.

Now have another look and you'll see the corrected code. In cases where there is nothing after the chapter title and the first paragraph, h2 + p works perfectly on a bare p.

Last edited by JSWolf; 07-13-2026 at 04:20 PM.
JSWolf is offline   Reply With Quote
Old 07-13-2026, 08:05 PM   #56
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 846
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
Thanks for fixing it. Mistakes can happen in anyone's code (ask me how I know this!). I will consider your suggestions, but the thought of reorganizing all my books to incorporate your methods is overwhelming, so it's not likely to happen anytime soon. I think this discussion has shown that your method is not necessarily less error prone than mine, so I will stick with mine for now. But thanks for the discussion and examples.

Last edited by icallaci; 07-13-2026 at 08:56 PM.
icallaci is offline   Reply With Quote
Old 07-13-2026, 08:10 PM   #57
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 15,423
Karma: 248000019
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by icallaci View Post
Interesting, thanks. I mostly leave existing class names alone too, but I've found that in books with a ton of errors, class names like "p34," "p35," "p36," etc. make things more difficult for me. So in those cases I will rename them, but not often.
I have a lot of books bought from Amazon and converted from KFX. Those books have nonsense class names in their css (s1e1, szx and the like). While I do hate such absolutely uninformative names, changing them would take years, as I have many hundreds of KFX conversions. Most of them are Amazon exclusives and there's no original epub version.
Sirtel is offline   Reply With Quote
Old 07-13-2026, 09:24 PM   #58
icallaci
Guru
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 846
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
I hear you loud and clear. I'd much rather read a book than go down the rabbit hole of continuously "fixing" things that don't make a real difference in what I see on the page.

Quote:
Originally Posted by Sirtel View Post
I have a lot of books bought from Amazon and converted from KFX. Those books have nonsense class names in their css (s1e1, szx and the like). While I do hate such absolutely uninformative names, changing them would take years, as I have many hundreds of KFX conversions. Most of them are Amazon exclusives and there's no original epub version.
icallaci is offline   Reply With Quote
Old Yesterday, 04:21 PM   #59
Amalthia
Wizard
Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.Amalthia ought to be getting tired of karma fortunes by now.
 
Amalthia's Avatar
 
Posts: 1,210
Karma: 1041798
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
I edit the css mostly for consistency. It takes me about 10 minutes, however I'm only really editing the TOC, line spacing, indents, adding my own font classes.
Amalthia is offline   Reply With Quote
Old Yesterday, 05:05 PM   #60
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: 84,137
Karma: 153695583
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 icallaci View Post
Thanks for fixing it. Mistakes can happen in anyone's code (ask me how I know this!). I will consider your suggestions, but the thought of reorganizing all my books to incorporate your methods is overwhelming, so it's not likely to happen anytime soon. I think this discussion has shown that your method is not necessarily less error prone than mine, so I will stick with mine for now. But thanks for the discussion and examples.
I didn't go back and redo all my eBooks when I changed how I do it. I just started using my new way of doing going forward.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk CSS Edit? HFM1101 Calibre 21 03-21-2026 12:58 PM
How to edit the CSS of libnickel.so.1.0.0? ItalianUruguayan Kobo Developer's Corner 3 03-20-2018 06:42 AM
Is there a way to batch edit multiple epub css? stevenam ePub 10 12-30-2016 03:40 AM
ebook-edit fails to merge css files Ahmad Samir Editor 2 04-29-2014 01:57 AM
CSS files not being used?? spaze Sigil 12 03-03-2011 04:26 PM


All times are GMT -4. The time now is 02:50 AM.


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