Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 01:19 AM   #1
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
Question for those who edit .CSS files

I see that some on here edit .CSS files to make changes to formatting of books. I have fewer books than most of you but I was wondering why there is a need to format given that things like font and line spacing and justification can usually be set on the e-reader itself

Is it mainly to take out acknowledgement pages etc and shorten the book?
Mr_H_Poirot is online now   Reply With Quote
Old Today, 03:28 AM   #2
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,390
Karma: 248000019
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
It's to take out excerpts, ads and other unnecessary crap, but also to make all books look uniform and eliminate the need to fiddle with the ereader settings every time I open a new book.
Sirtel is offline   Reply With Quote
Advert
Old Today, 03:39 AM   #3
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
Thanks Sirtel

I might look into how to edit (assume I can do in calibre) to remove the excerpts etc.

On making them look uniform, I find my kobo unifies all my books formatting as far as I can tell in terms of font etc. But I may be missing something! I'll have a look on youtube for some examples!
Mr_H_Poirot is online now   Reply With Quote
Old Today, 04:13 AM   #4
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,390
Karma: 248000019
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by Mr_H_Poirot View Post
On making them look uniform, I find my kobo unifies all my books formatting as far as I can tell in terms of font etc.
Not always. It depends on the book - sometimes publishers do really stupid things and insert rules in the css that shouldn't be there. Kepubs ignore many css rules, yes, but epubs don't, and there's also the fact that I might read on some other device in the future, not on a Kobo. I'd still want my books to look uniform.

Moreover, there are things that Kobo cannot make look nice even with kepubs - huge text indents, huge white space around chapter headings, spaces between paragraphs etc. The only way to fix those is to edit them manually.

Last edited by Sirtel; Today at 04:18 AM.
Sirtel is offline   Reply With Quote
Old Today, 04:15 AM   #5
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
Ah, I hadn't thought that kobo would treat it differently. Interesting
Mr_H_Poirot is online now   Reply With Quote
Advert
Old Today, 04:17 AM   #6
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
The one thing I have found is that when I split some omnibus books they don't always recognise the chapter headings. I was thinking there may be a way for me to edit that in calibre (although I have also seen sigil a good tool).

I shall have a play around today
Mr_H_Poirot is online now   Reply With Quote
Old Today, 04:21 AM   #7
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,390
Karma: 248000019
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by Mr_H_Poirot View Post
The one thing I have found is that when I split some omnibus books they don't always recognise the chapter headings. I was thinking there may be a way for me to edit that in calibre (although I have also seen sigil a good tool).

I shall have a play around today
Almost certainly. Personally I don't split omnibuses, though, I'm more likely to merge books into one.
Sirtel is offline   Reply With Quote
Old Today, 05:02 AM   #8
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
Brilliant. It wasn't chapters it didn't recognise but no 'table of contents' existed when I split them. I have now been able to create one with Sigil on the split book

Thanks!
Mr_H_Poirot is online now   Reply With Quote
Old Today, 06:30 AM   #9
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,100
Karma: 153695583
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I do edit my eBooks.

I remove all HTML I don't need/want such a previews, adverts, HTML Toc, and other junk.
I also remove unused CSS.

I add my own CSS. I remove the unnecessary classes such as <p class="indent">. I edit the CSS to be clean and do it how I want. I make sure all of the margins are consistent. I make sure all of the font sizes are consistent.

When I am done, I've followed the rule of making ePub eBooks. That rule is Keep it simple.
JSWolf is online now   Reply With Quote
Old Today, 07:01 AM   #10
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 357
Karma: 2581190
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on iphone and kindle cloud reader
"...but I was wondering why there is a need to format..."

Quote:
Originally Posted by Mr_H_Poirot View Post
I see that some on here edit .CSS files to make changes to formatting of books. I have fewer books than most of you but I was wondering why there is a need to format given that things like font and line spacing and justification can usually be set on the e-reader itself

Is it mainly to take out acknowledgement pages etc and shorten the book?
I do not use word processor or text editor at all and now only use the editor portion of calibre to do original writing. Nobody does this because it foregoes all convenience of modern word processors. However, there is a months-long (or even years-long) learning curve in becoming proficient with a full-fledged word processor. I migrated over to learning CSS to control all attributes of epub output so that no matter what name brand gizmo you read on, even complex text, images, lists, charts, tables, captions, headings, etc. will come out right. I do not recommend doing this at all; it is just for me and the way I like doing stuff. ebook readers vary a lot. None of them at all allow full range of CSS. The closest thing to "full CSS" is the ebook reader in calibre. One nice inadvertent outcome of me doing this is that when done I stab "c" and the epub converts into PDF for upload and printing to Amazon. The PDF output is exact also, with complex text, images, lists, charts, tables, captions, headings also. Beyond that (of course) there are margins, printer's offset, footers, table of contents. This CSS stuff is a never-ending, constantly-evolving kludge. All over the place in it are once-prevalent but now-abandoned conventions, some of them overlapped into "deprecated." For the most part, unless you are curious and willing to tweak, it is not needed to dive deeply into CSS and you should stick with auto-conversion. Nevertheless, I am so very glad I did learn all this stuff.
rjwse@aol.com is offline   Reply With Quote
Old Today, 08:45 AM   #11
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
Quote:
Originally Posted by JSWolf View Post
I do edit my eBooks.

I remove all HTML I don't need/want such a previews, adverts, HTML Toc, and other junk.
I also remove unused CSS.

I add my own CSS. I remove the unnecessary classes such as <p class="indent">. I edit the CSS to be clean and do it how I want. I make sure all of the margins are consistent. I make sure all of the font sizes are consistent.

When I am done, I've followed the rule of making ePub eBooks. That rule is Keep it simple.
That sounds like you have very neat files but it also sounds like a lot of work. I think because I only read on my kobo, the kobo itself deals with the font size and margin so I don't need to bother with any of that. You of course may well have other reasons to want that so it works for you

Being able to create new TOC in a split book today has been very handy so that's a good learning for the day
Mr_H_Poirot is online now   Reply With Quote
Old Today, 08:49 AM   #12
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: 55
Karma: 16722
Join Date: Mar 2025
Device: Kobo Clara BW
Quote:
Originally Posted by rjwse@aol.com View Post
I do not use word processor or text editor at all and now only use the editor portion of calibre to do original writing. Nobody does this because it foregoes all convenience of modern word processors. However, there is a months-long (or even years-long) learning curve in becoming proficient with a full-fledged word processor. I migrated over to learning CSS to control all attributes of epub output so that no matter what name brand gizmo you read on, even complex text, images, lists, charts, tables, captions, headings, etc. will come out right. I do not recommend doing this at all; it is just for me and the way I like doing stuff. ebook readers vary a lot. None of them at all allow full range of CSS. The closest thing to "full CSS" is the ebook reader in calibre. One nice inadvertent outcome of me doing this is that when done I stab "c" and the epub converts into PDF for upload and printing to Amazon. The PDF output is exact also, with complex text, images, lists, charts, tables, captions, headings also. Beyond that (of course) there are margins, printer's offset, footers, table of contents. This CSS stuff is a never-ending, constantly-evolving kludge. All over the place in it are once-prevalent but now-abandoned conventions, some of them overlapped into "deprecated." For the most part, unless you are curious and willing to tweak, it is not needed to dive deeply into CSS and you should stick with auto-conversion. Nevertheless, I am so very glad I did learn all this stuff.
Wowsers! I would have thought writing in Word or Libre Writer using their styles would make it easy to convert to an epub with most of the css automated? But good for you.

Yes, I only intend to use css in the very rare case there is an issue such as the TOC one I mention above
Mr_H_Poirot is online now   Reply With Quote
Old Today, 09:53 AM   #13
Loosheesh
Wizard
Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.Loosheesh ought to be getting tired of karma fortunes by now.
 
Loosheesh's Avatar
 
Posts: 1,764
Karma: 3253179
Join Date: Dec 2010
Location: Jianghu
Device: PW5, iPhone 13 Pro, iPad Pro 2021, iPad Air 2025
Whenever I see any posts about editing CSS etc, I get a strong sense of to each his own. I've been reading ebooks since 2009 and only once felt compelled enough to edit the formatting, which was just plain nasty. When I'm reading, I rarely get bothered by anything except text alignment—it must be justified or else I feel like I'm getting cross-eyed

I buy lots of Delphi Classics collections and I sometimes have to tweak the TOC when I split a book out of a collection. And that's all I do. I tend to get obsessive about things, so if I had to get into editing CSS et al, I'd have little time to actually read. I'm happy that this is one place my unpleasant perfectionism does not rear its ugly head
Loosheesh is offline   Reply With Quote
Old Today, 10:56 AM   #14
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,100
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 Mr_H_Poirot View Post
That sounds like you have very neat files but it also sounds like a lot of work. I think because I only read on my kobo, the kobo itself deals with the font size and margin so I don't need to bother with any of that. You of course may well have other reasons to want that so it works for you

Being able to create new TOC in a split book today has been very handy so that's a good learning for the day
It sounds like more work then it actually is depending on the source. When you remove the excess p classes and change the the space breaks to <hr/> and the chapter headers to <h2>, you only have classes left that either need to be edited or not. I search for class=" then I skip all the HTML with no classes as I know that's OK.

And one other thing I do that I forgot to mention is I use the Modify ePub plugin before editing. Here are my Modify ePub settings. You usually have to run it three times before it says there is nothing left to change (on the third run).

Click image for larger version

Name:	Modify ePub.jpg
Views:	1
Size:	178.4 KB
ID:	224356
JSWolf is online now   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 11:00 AM.


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