View Full Version : Does it have to be XHTML 1.1 Strict?


AlexBell
07-17-2009, 05:31 AM
I'm groping towards trying to set up an ebook template in HTML/CSS so that I can put books into this template and use Calibre to generate different ebook formats from the same document.

I have a template in HTML 4.01 strict, and was able to convert a test book to adequate Mobipocket. But the same document was a disaster when converted to ePub and read with ADE. Might this be because it is HTML 4.01 Strict and not XHTML 1.1 Strict?

Regards, Alex

zelda_pinwheel
07-17-2009, 07:24 AM
short answer : yes. :)

there are a few differences between html 4.01 and xhtml 1.1 and epub is based on xhtml, so reverting to html *will* work (more or less) but will not give as good results.

on the other hand, when you say it was a "disaster" that surprises me a bit, how bad was it ?

alecE
07-17-2009, 12:49 PM
Blimey! I logged in today intending to ask an almost identical question about html v. xhtml and I find the psychic serendipity of mr has given the answer before I have even formulated the question!
Thanks
:thumbsup:

zelda_pinwheel
07-17-2009, 12:50 PM
hm, perhaps people sharing the first 3 letters of their names have some sort of psychic link ?? :inquisiti:

alecE
07-17-2009, 01:01 PM
Or down to the influence of ale? I note that 'ale' appears slightly mangled in 'Zelda' as well.

zelda_pinwheel
07-17-2009, 01:02 PM
Or down to the influence of ale? I note that 'ale' appears slightly mangled in 'Zelda' as well.

that must be it. :D

nrapallo
07-17-2009, 01:02 PM
But calibre will convert your HTML 4.01 internally to XHTML 1.1 Strict and use that for the .epub creation.

You should open the resulting .epub (with zip, winzip or winrar) and see exactly what changes calibre applied. Then you can try to "fix" your HTML to find a better work-around.

I too like using a single HTML source file to then produce many different ebooks formats from. See Creating multiple ebook formats from same source files! (http://www.mobileread.com/forums/showthread.php?t=35112) or the Perl code used with GuteBook - the Project Gutenberg eBook Maker/Front-end (http://www.mobileread.com/forums/showthread.php?t=48138) for my efforts thus far.

AlexBell
07-18-2009, 07:51 AM
short answer : yes. :)

there are a few differences between html 4.01 and xhtml 1.1 and epub is based on xhtml, so reverting to html *will* work (more or less) but will not give as good results.

on the other hand, when you say it was a "disaster" that surprises me a bit, how bad was it ?

A graphic which was centred in the Mobipocket version was flush with the left margin with ePub version, and lists which displayed adequately (not well) in the Mobipocket version displayed very poorly in the ePub version - for an unordered list there may have been bullets half hidden in the left margin, but there was no indentation, and for an ordered list there was no sign of numbers or indentation.

It's even more puzzling that my first check, where the output was very poor, was with ADE on my desktop - I don't yet have an epub reader - but when I checked the same ePub document on Calibre's built in viewer it looked fine. In fact it looked far better than the Mobipocket version. So I still don't know what's going on - unless of course Calibre changed my file to XHTML 1.1 and ADE can't or won't.

On a slightly divergent topic, I haven't yet caught up with XHTML 1.1, and none of the books I have mention it. Can you point me to a source please where I can read up on it?

And on another divergent topic, I was Alec until adolescence (a long time ago) when I met a friend who was also called Alec. So we tossed a coin and I became Alex and have remained that way since.

Regards, Alex