Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-19-2015, 02:35 PM   #16
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by chaley View Post
Assuming that the rendering device is not doing something special, with that HTML there should be a single space output after the image. If the image consumes the entire screen then that space could appear on the next page.

The space is caused by the return between </p> and </body>. Does the problem happen if the HTML looks like the following?
Code:
...20af-002.jpg" /></p></body></html>
HTML ignores spaces between tags. beautify/pretty print algorithms routinely reindent the structure in order to create that exact return -- as well as many more -- with absolutely no effect on rendered layout.


Chances are it is like theducks said.
eschwartz is offline   Reply With Quote
Old 05-19-2015, 03:22 PM   #17
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,064
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A

Understand the W3C 'The Box Model'

Outer is Page
Next is Body
which contains 1 or more Block (P, Div...)
Blocks have (*but not all are visible or used)
Margin: The edges
Border:* Lines surrounding: 0 size is default
Padding:* Space from border to Text. default is small
Text/Image
You can do some fun/amazing stuff with a Single block (box) once you wrap your head around boxes
theducks is offline   Reply With Quote
Advert
Old 05-19-2015, 03:56 PM   #18
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by eschwartz View Post
HTML ignores spaces between tags. beautify/pretty print algorithms routinely reindent the structure in order to create that exact return -- as well as many more -- with absolutely no effect on rendered layout.


Chances are it is like theducks said.
Years of experience with generating HTML tells me that whitespace between tags is not ignored, but is instead collapsed. I can't count the number of times that I had to remove returns from the HTML to avoid extra spacing between elements. Google also agrees with me, with zillions of pages talking about how to avoid the extra spaces introduced by line feeds by setting various font properties on the body tag and putting the tag closing > on the next line. And in any event, the space I was referring to is not between tags, it is a first class character in the body.

However, I could easily to be wrong now. The world has moved on in the 4 or 5 years since I last did this sort of thing, and the book rendering engines could be special purpose.
chaley is offline   Reply With Quote
Old 05-19-2015, 04:05 PM   #19
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by chaley View Post
Years of experience with generating HTML tells me that whitespace between tags is not ignored, but is instead collapsed. I can't count the number of times that I had to remove returns from the HTML to avoid extra spacing between elements. Google also agrees with me, with zillions of pages talking about how to avoid the extra spaces introduced by line feeds by setting various font properties on the body tag and putting the tag closing > on the next line. And in any event, the space I was referring to is not between tags, it is a first class character in the body.

However, I could easily to be wrong now. The world has moved on in the 4 or 5 years since I last did this sort of thing, and the book rendering engines could be special purpose.
Between tags == </p> [ignoredcollapsed spaces] </body>

Considering that both calibre and Sigil explicitly add those spaces (Beautify/Pretty Print) I shouldn't think those would be a problem. Perhaps they once were?
eschwartz is offline   Reply With Quote
Old 05-19-2015, 04:19 PM   #20
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by eschwartz View Post
Between tags == </p> [ignoredcollapsed spaces] </body>

Considering that both calibre and Sigil explicitly add those spaces (Beautify/Pretty Print) I shouldn't think those would be a problem. Perhaps they once were?
Try the following html
Code:
<html>
<body>
<font color="red">hi</font>
<font color="green">there</font>
</body>
</html>
At least on Chrome you will see that there is a space between "hi" and "there". Clearly the return is not being ignored but is instead converted to white space even though it is "between tags". That space will not be there if there is no return after the first </font>. If a pretty printer adds such a return then it changes the output.

I found HTML rules for white space to be fiendishly complicated. They are dependent on the rendering engine and the semantics of the tags surrounding the white space. My experience is that if the tag does not generate white space on its own (<p> does) then one may or may not see the white space implied by the returns.
chaley is offline   Reply With Quote
Advert
Old 05-19-2015, 04:52 PM   #21
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,188
Karma: 8888888
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
For your cover change:
Spoiler:
Code:
<body>
<p><img alt="Omslagfoto Euromast af-002" src="../Images/Omslagfoto%20Euromast%20af-002.jpg" /></p>
</body>
</html>

to
Spoiler:
Code:
    <body>
        <div>
            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 xxx XXX" preserveAspectRatio="xMidYMid meet">
                <image width="xxx" height="XXX" xlink:href="../Images/Omslagfoto%20Euromast%20af-002.jpg"/>
            </svg>
        </div>
    </body>
</html>


Find the image width and height using calibre ebook editor, and enter them in-place of the xxx and XXX.

luck
bernie
gbm is offline   Reply With Quote
Old 05-19-2015, 08:01 PM   #22
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by chaley View Post
Try the following html
Code:
<html>
<body>
<font color="red">hi</font>
<font color="green">there</font>
</body>
</html>
At least on Chrome you will see that there is a space between "hi" and "there". Clearly the return is not being ignored but is instead converted to white space even though it is "between tags". That space will not be there if there is no return after the first </font>. If a pretty printer adds such a return then it changes the output.

I found HTML rules for white space to be fiendishly complicated. They are dependent on the rendering engine and the semantics of the tags surrounding the white space. My experience is that if the tag does not generate white space on its own (<p> does) then one may or may not see the white space implied by the returns.
As I understand it, whitespace (including the EOL character) is collapsed into one standard space within a block-level tag, and is ignored entirely if outside a block-level tag.

<p> is a block-level tag, and whitespace after a </p> and before a </body> is ignored, but <font> is an inline tag and spaces appear (collapsed) just like they do between words of plain text, or separated using span,em,b,i,strong, etc.

Your example has inline tags floating in a raw <body>, so I think the parser just throws up its hands and pretends there is a div or something there, but note that
Code:
<html>
<body>
<font color="red">hi</font>
<font color="green">there</font>
       
</body>
</html>
displays none of the linebreak + 7 spaces I inserted.


As for <p> generating its own linebreak, it only defines a content block, and block-level tags are separated from other block-level tags by a linebreak.
eschwartz is offline   Reply With Quote
Old 05-19-2015, 08:03 PM   #23
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by gbm View Post
For your cover change:
Spoiler:
Code:
<body>
<p><img alt="Omslagfoto Euromast af-002" src="../Images/Omslagfoto%20Euromast%20af-002.jpg" /></p>
</body>
</html>

to
Spoiler:
Code:
    <body>
        <div>
            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 xxx XXX" preserveAspectRatio="xMidYMid meet">
                <image width="xxx" height="XXX" xlink:href="../Images/Omslagfoto%20Euromast%20af-002.jpg"/>
            </svg>
        </div>
    </body>
</html>


Find the image width and height using calibre ebook editor, and enter them in-place of the xxx and XXX.

luck
bernie
Sigil/calibre editor has a tool to add a cover page, and will auto-generate an SVG wrapper with the right values.
eschwartz is offline   Reply With Quote
Old 05-20-2015, 12:31 AM   #24
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
Quote:
Originally Posted by chaley View Post
...At least on Chrome you will see that there is a space between "hi" and "there". Clearly the return is not being ignored but is instead converted to white space even though it is "between tags". That space will not be there if there is no return after the first </font>. If a pretty printer adds such a return then it changes the output.

I found HTML rules for white space to be fiendishly complicated. They are dependent on the rendering engine and the semantics of the tags surrounding the white space.....
yes, when your earlier post #9 popped up in my tapatalk app, the quoted code not display the space you were referring to. I can see it in chrome on on PC
so tapatalk renders differently to chrome, thus making your point
cybmole is offline   Reply With Quote
Old 05-21-2015, 07:43 AM   #25
Marjelle
Member
Marjelle began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2015
Device: none
About the empty pages that emerge after the Cover page and before the Register and about size. The tutorial of ComputerTotaal advised size 600x900, when I then got an empty page after the Cover I already shrunk the Cover image to size 534x800 and this had no effect, still the empty page emerged.
When I experimented with Add-in for Word, the empty page disappeared, however I problably can't use that option for other reasons.
Marjelle is offline   Reply With Quote
Old 05-21-2015, 07:54 AM   #26
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,532
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Often problems like this can be solved very easily if an example ePub with this issue is uploaded. Any chance you can upload either the ePub in question, or one that has been created solely to demonstrate the issue?
PeterT is offline   Reply With Quote
Old 05-21-2015, 07:56 AM   #27
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by PeterT View Post
Often problems like this can be solved very easily if an example ePub with this issue is uploaded. Any chance you can upload either the ePub in question, or one that has been created solely to demonstrate the issue?
... but not if it's copyrighted material, please.
HarryT is offline   Reply With Quote
Old 05-21-2015, 08:15 AM   #28
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,532
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by HarryT View Post
... but not if it's copyrighted material, please.
Which is why I suggested creation of a book solely to demonstrate the issue. I made the assumption that the author would realize it should be non copyrighted material.
PeterT is offline   Reply With Quote
Old 05-21-2015, 08:19 AM   #29
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by PeterT View Post
Which is why I suggested creation of a book solely to demonstrate the issue. I made the assumption that the author would realize it should be non copyrighted material.
I know that you meant that, Peter. Unfortunately we do sometimes get people who don't realise, though, hence the specific request. Easier to ask up front than to have the hassle of dealing with copyrighted material being uploaded.
HarryT is offline   Reply With Quote
Old 05-22-2015, 12:39 PM   #30
Marjelle
Member
Marjelle began at the beginning.
 
Posts: 21
Karma: 10
Join Date: May 2015
Device: none
Hi PeterT and HarryT, thanks for your reply. Someone has offered to help me, so I hope he finds out what exactly the problem is with the empty page that emerges after the Cover page and before the Register.
Marjelle is offline   Reply With Quote
Reply

Tags
calibre, empty page, sigil


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print page range in viewer outputs single empty page larzeb Library Management 2 04-30-2013 05:24 AM
[Old Thread] New Kobo Touch not visible in Calibre kzante Devices 6 09-16-2012 01:20 AM
How to make the book format on the reader visible in Calibre MRi Library Management 4 05-10-2011 03:45 PM
Only Page 1 Visible Problem aljud Sony Reader 3 05-04-2010 12:32 PM
PDF Fit Visible per page/landscape view jessesn Sony Reader 4 10-02-2006 10:42 AM


All times are GMT -4. The time now is 01:06 PM.


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