View Single Post
Old 01-09-2022, 08:44 PM   #11
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by KevinH View Post
What I typically do in Sigil is as follows:
1. open each epub in Sigil and use the ReRenamer tool to prefix file names in one go to add something like Book1, etc and save it.
2. Open Book1, and then use Add Existing ... to add the html files in Book2 (it will pull in linked images and stylesheets automatically)
Make sure to rename each CSS file to be unique: book1.css.
Unless you are sure you used identical css files for all books.
Also images.

You can leave it at that, each file or set of files will have its own CSS, I see a lot of commercial omnibi do that.
I try to unify them.

First make a new CSS file and link it to all html files.
Open one of the other CSS files and copy in the base styles: body, p, headings, to the new file.
Do a "Delete unused classes" to begin.
Open a file in book1.
Look at a body text para. Click to go to its CSS defn.
if it's reasonable, cut (not just copy) that from the CSS and paste it in your new stylesheet.
Now open a file in book2.
Look at its body text para. If different to that in book 1, select all the book2 files, S&R
"bodytext2" to "bodytext1" -- including the quotemarks.
"Delete unused classes" should remove Bodytext2 definition.

Need to take more care if you get a set of files with calibreNN stylenames that have different definitions in each book.
Only use S&R on "Selected files" in that case.

After each new style added to your master file, delete unused styles until the other files are all empty, then delete the files and the links to them.

Tedious at times, but then you can restyle the book and keep it consistent.
For title pages, can be faster to just copy one of them and paste the title text into it rather than mess with styles.

Last edited by AlanHK; 01-09-2022 at 08:48 PM.
AlanHK is offline   Reply With Quote