Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-05-2022, 02:05 PM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
A question about templates

I use a template for covers, but the header of that one is for epub3.

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
And when I have to add a cover for an epub2, the generated cover by Sigil instead of having a header for epub2

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
has the header of an epub3. My question is: how must I do in order to have TWO templates for covers, one for epub2 (for example, cover2.xhtml) and one for epub3 (for example, cover3.xhtml), so Sigil can employ cover2.xhtml if I add a cover for an epub2 and cover3.xhtml if I add a cover for an epub3.

Or maybe Sigil can handle that with only one template, by changing the respective header but I don't know how to enable that feature, if it exists.

Last edited by RbnJrg; 12-05-2022 at 02:10 PM.
RbnJrg is offline   Reply With Quote
Old 12-05-2022, 04:01 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
Yes the cover.xhtml template file came before support for epub3 was added. So only one template file is looked for and it assumes you have set its contents to work with either of epub2 or epub3, your choice.

I will look into fixing that in the future.

For now, do not include the doctype at all in your template file and instead, once loaded run Mend on just that file and the proper doctype for your epub version (2 or 3) will be added.

Last edited by KevinH; 12-05-2022 at 04:11 PM.
KevinH is online now   Reply With Quote
Advert
Old 12-05-2022, 04:18 PM   #3
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
For now, do not include the doctype at all in your template file and instead, once loaded run Mend on just that file and the proper doctype for your epub version (2 or 3) will be added.
Thanks!
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using path in templates mikiher Library Management 1 10-28-2022 04:14 PM
templates hobnail Sigil 19 09-13-2021 10:30 AM
Where to get Templates? chrismscotland Onyx Boox 1 07-25-2019 04:04 PM
Help using templates krakenmoth Library Management 2 04-10-2013 03:44 PM
templates? TAG_Keri Calibre 1 10-28-2011 02:11 PM


All times are GMT -4. The time now is 11:26 AM.


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