Mobileread
Duplicating book layout for 'template'
#1  Tomy Awards 05-24-2020, 05:26 PM
I am just getting started with calibre and ebooks, and have come across a question I have not found yet in the forum.
I am trying to create a series of several ebooks that will all have exactly the same layout. The only differences will be their cover images, titles, the text on the pages, and the number of the pages. Otherwise they are the same.
It took some time to get the doc to epub conversion to look like I want it, so I would like to use the first one as a 'template' for the others and just change the text and cover images. Is there any way to overwrite and do a 'save-as' type of conversion on the first one?
I tried saving the file to disk, renaming it and then putting it into the calibre editor but it seems to retain the original title as part of the title bar, along with the new one. The cover image also seems to be hard to replace.
I also tried copying the entire folder and renaming it and then worked out of that folder, but it still seem to have some old data in the file. I have altered the metadata and copied the new cover image into that new folder but it still shows the old image as its cover.
Any ideas as to what I can do for this to work - it would really be a timesaver if possible. Maybe there is a function I don't understand or there is a plugin that might do this... I'm just not sure.
Thanks for any help you can give.
Reply 

#2  BetterRed 05-24-2020, 07:11 PM
Quote Tomy Awards
. . .
It took some time to get the doc to epub conversion to look like I want it, so I would like to use the first one as a 'template' for the others and just change the text and cover images.
. . .
How do you create the 'doc'? If via a word processor like Word or Writer, then it maybe easier to use a Word or Writer template, save as DOCX, and convert that. I write in Word, and for texts that are inherently reflowable all I have to do is convert and tidy up the ePub opf with the Modify plugin and Sigil's metadata edit tool.

BR
Reply 

#3  Tomy Awards 05-24-2020, 07:32 PM
Thanks for the quick reply. My 'doc' is in fact a Word .docx - I write in LibreOffice Writer .odt files (I'm on linux) but found that the import to epub was a bit more accurate if I used .docx as an intermediary. Each page has a jpg image as the top of the page, I used page breaks in bewteen, and as a result, I don't think this is a candidate for flowing text, unless I am mistaken.
What looked correct in Word is just a bit 'off' as an epub, and having fixed the look once, I was just trying to avoid doing it again, with the chance of slight variations from one book to another.
I don't really know how to save what I have in Word as a template, and since it is not quite what I need in the end, I hoped I might use the first epub as my new template.
Reply 

#4  BetterRed 05-24-2020, 08:13 PM
Current Libre Office Writer can save DOCX. The reason why I recommend it is because calibre's DOCX import and and export modules are actively maintained by Kovid Goyal, calibre's main developer

I'll leave it that for now, if you post a sample DOCX and resultant ePUB and what the issues are that might help other responders.

BR
Reply 

#5  retiredbiker 05-24-2020, 08:38 PM
I'm currently working with an Author to produce several volumes, all of which will be formatted the same. It's very highly formatted stuff...verse, images, lots of quotations, attributions, and so on. Also using Writer with Linux. Two volumes done so far. So, perfect fit.

I can't begin to describe all the hoops we've been through to get it right, but the basics are:

Use Styles in Writer, and nothing but styles, except for the odd italic word. Make yourself a style template, and stick to it like glue. Look in LO help under "styles and templates" to learn how, it is not that hard. Definitely worth the trouble! Give the styles you create good names. The second and subsequent books MUST use the exact same styles or you haven't a hope. (We are doing both epub and print versions, so its even more important.)

After the first book is just the way you want it in Writer, convert to epub. (Yes, saving to .docx is fine.) Then go into the editor, and correct or change anything you want. The conversion will probably not give a really tight well-coded book. Simplify the CSS. Give the styles meaningful names--but if you named them right in Writer, this should not be an issue. Get rid of any css classes you don't end up using. Then save (export) this css. When you do book 2, import it, replacing whatever the second conversion makes. Link it to all the files. Go through and make sure all the text is using exactly the same rules as the first book. If the styles in books one and 2 were identical in Writer, this will not be very hard.

If you want a picture at the top of each page, for your epub to work best on a range of readers, each page should be its own html file. May not be practical, so "pagebreak" codes can be used. Not sure if they come across well or not in your conversion, they always give me trouble. No problem with all that in an epub, but the text will flow, so if your user chooses a nice huge font size, the "page" will be several screens.

This doesn't begin to cover all the potential oop-es, but it is the core of our project.
Reply 

#6  BetterRed 05-25-2020, 04:31 AM
Quote retiredbiker
<snip>
Use Styles in Writer, and nothing but styles, except for the odd italic word. Make yourself a style template, and stick to it like glue. Look in LO help under "styles and templates" to learn how, it is not that hard. Definitely worth the trouble! Give the styles you create good names. The second and subsequent books MUST use the exact same styles or you haven't a hope. (We are doing both epub and print versions, so its even more important.)
<snip>
↑ ↑ ↑ ✔ ++

Ditto (word for word) for MS Word.

BR
Reply 

#7  Tomy Awards 05-25-2020, 01:51 PM
@retiredbiker – yes, you are doing the same thing on a larger scale – great advice, clear instructions, and very detailed. It will be worth the time to redo and use styles going forward, I can see that. Thank you very much for all the procedural tips, your roadmap is very clear. And thanks also @BetterRed, you led me to question my methods and with this I now have a guide. Garbage in, garbage out, I guess, once again….
I did manage to get the 2nd book to behave (I think...), but it will be easier and far more consistent doing it right than my current crapshoot. Thanks again to you both.
Reply 

Today's Posts | Search this Thread | Login | Register