View Full Version : Annoying


GeoffC
10-16-2009, 09:45 AM
The file Poetry.ePub here (http://www.mobileread.com/forums/showpost.php?p=626364&postcount=458), generated with Sigil, looks good on the Sigil editor screen. The html code has been checked using Sigil and Evrsoft.

(spurious div.sgc-1 {font-size: 19px;}
div.sgc-2 {text-align: left;}
div.sgc-3 {text-align: center;} removed [makes no difference left in or removed] ).

I can only check the result in ADE, and it is appalling - can anyone see where there is a 'problem' with the code ?

The ADE import seems to be ignoring the <br /> tags - which it also does on the front page of Further Ramblings .... but these tags are inserted by Sigil - not me....

I've created and re-created this file umpteen times with no improvement and I am getting very annoyed with this ....

GeoffC
10-16-2009, 10:03 AM
mmmm perhaps I should use <p> tags or go back to manually inserting <pre> tags ?

JSWolf
10-16-2009, 10:12 AM
In ePub, don't use <pre></pre> tags. They don't wrap and it's possible for things to be shoved off to the right past the endge of the screen or past the edge of ADE. Use <div></div> instead of <pre></pre>.

GeoffC
10-16-2009, 10:53 AM
In ePub, don't use <pre></pre> tages. They don't wrap and it's possible for things to be shoved off to the right past the endge of the screen or past the edge of ADE. Use <div></div> instead of <pre></pre>.


Thanks Jon,

in that case I'm even more unsure as to why the file doesn't look right in ADE (unless it is ADE that is causing the problems).

JSWolf
10-16-2009, 12:29 PM
When I get a chance, I'll have a look and see if I can see what might be wrong.

pdurrant
10-16-2009, 05:50 PM
It seems that ADE doesn't like a div that contains only a <br /> - it ignores it and doesn't allocate any space for it.

You could use & n b s p ; instead of the <br .>, but I'd recommend re-coding with more semantic mark-up, rather than explicitly putting a blank line between verses. Perhaps like this:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../styles/style001.css" type="text/css" />
<title></title>
</head>
<body>
<h3 id="heading_id_14">....and memories too.</h3>
<div class="verse">
<p>Id rather go, where the crowds be thin,</p>
<p>no hustle, bustle, and other such din.</p>
<p>Somewhere where the sun shines,</p>
<p>and the wines</p>
<p>dont make my head spin.</p>
</div>
<div class="verse">
<p>Id rather go, where the air is pure,</p>
<p>water clear, and pains can cure.</p>
<p>Somewhere where my heart can rest,</p>
<p>and the best</p>
<p>of all, to be good and sure.</p>
</div>
<div class="verse">
<p>Id rather go, where pace of life is slow,</p>
<p>no fast moving cars, nor brats in tow.</p>
<p>Somewhere not too far away</p>
<p>but far enough to avoid the fray.</p>
<p>Id rather go and just lie low.</p>
<p>just me and you</p>
<p>and memories too.</p>
</div>
<div class="copyright"> 28 May 2009</div>
</body>
</html>

and then in the CSS have

div.verse { margin: 1em 0 }
div.verse p { text-indent: 0; margin: 0 }


The file Poetry.ePub here (http://www.mobileread.com/forums/showpost.php?p=626364&postcount=458), generated with Sigil, looks good on the Sigil editor screen. The html code has been checked using Sigil and Evrsoft.

(spurious div.sgc-1 {font-size: 19px;}
div.sgc-2 {text-align: left;}
div.sgc-3 {text-align: center;} removed [makes no difference left in or removed] ).

I can only check the result in ADE, and it is appalling - can anyone see where there is a 'problem' with the code ?

The ADE import seems to be ignoring the <br /> tags - which it also does on the front page of Further Ramblings .... but these tags are inserted by Sigil - not me....

I've created and re-created this file umpteen times with no improvement and I am getting very annoyed with this ....

GeoffC
10-17-2009, 03:56 AM
Thanks Jon; much appreciate your input and time.

Thanks pdurrant very much appreciated. It means a lot of re-writing, but you've increased my knowledge of html a wee bit more ....

HarryT
10-17-2009, 04:12 AM
It seems that ADE doesn't like a div that contains only a <br /> - it ignores it and doesn't allocate any space for it.


I reported this on this very group a while ago :).

A "DIV" with a few spaces in it works just fine, crude though it may be.

GeoffC
10-17-2009, 05:10 AM
I reported this on this very group a while ago :).

A "DIV" with a few spaces in it works just fine, crude though it may be.


some of us come to these things later than others ...... :2thumbsup

also part of a learning trajectory .

JSWolf
10-17-2009, 09:16 PM
I reported this on this very group a while ago :).

A "DIV" with a few spaces in it works just fine, crude though it may be.
I do think a <br/> might work. have to check to be sure.

GeoffC
10-18-2009, 06:39 AM
I do think a <br/> might work. have to check to be sure.


there were <br /> tags in the original and they seemingly did not work.

i do not know how the 'book' looks in a 'normal' reader - no one has said whether it is ok or not ....

JSWolf
10-19-2009, 02:28 PM
I did fix it... I replaced all the <br /> with <div>&nbsp;</div> and it worked fine as far as getting line spaces.

GeoffC
10-22-2009, 08:22 AM
I got there in the end ....

A great way to learn by making mistakes.

I could not understand errors from epubcheck _ until I started thinking more outside of the box...

errors
epub xhtml files with internal css stylesheet ...
image extension JPG instead of jpg
file names Contentxx instead of contentxx
navpoint instead of navPoint

Discovered SciTe to be useful editor for .opf file and the toc

Terisa de morgan
10-22-2009, 09:08 AM
So case sensitive, I see :D

GeoffC
10-22-2009, 10:06 AM
So case sensitive, I see :D


jUst LikE mE ...... :chuckles:

GeoffC
10-26-2009, 03:16 PM
Change of topic (slightly)....

Renaming a .epub file extension to .zip - can someone explain how to do that on WIN7 !! (without resorting to magic and the command prompt ... :chinscratch:)....

Valloric
10-26-2009, 08:52 PM
Change of topic (slightly)....

Renaming a .epub file extension to .zip - can someone explain how to do that on WIN7 !! (without resorting to magic and the command prompt ... :chinscratch:)....

Open an Explorer window. Now, go to Organize->Folder and search options->View tab and then untick "Hide extensions for known file types". Now you will be able to see the extensions of files, and then be able to just rename for instance "Example.epub" to "Example.zip".

GeoffC
10-27-2009, 07:34 AM
Open an Explorer window. Now, go to Organize->Folder and search options->View tab and then untick "Hide extensions for known file types". Now you will be able to see the extensions of files, and then be able to just rename for instance "Example.epub" to "Example.zip".


Yep - it was that easy ..... (once I got onto my PC ....:angry:)