Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 01-26-2011, 03:07 AM   #16
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 theducks View Post
Is there some stray <p>&nbsp;</p> or similar between the <body> and the first <h#> ? (or <div> or <br /> )
That just isn't right
does a stray, empty div tag pair add white space above the header, then ?

i see stuff like
Code:
<body class="calibre">
  <div class="calibre2" id="ch05">
    <div class="calibre2">
      <h2 class="halfTitlePageTitle" id="heading_id_2"><span>5</span></h2>
( where calibre 2 is defined as {block} in the stylesheet

but had not thought to remove the div bits
a) 'cos I wasn't sure what they were doing
b) 'cos then contained no text or whitespace & thus I rashly? adjudged them to be harmless ?

what also confused the issue for me, is that code like the above displays well in calibre mobi viewer yet seems to have more whitespace when it is actually on my Kindle

often, also, there is stuff in those div lines that changes each time , so each book needs its own find+ replace construct to remove them
cybmole is offline   Reply With Quote
Old 01-26-2011, 04:34 AM   #17
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,556
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Maybe the CSS code for div.calibre2, or for #ch05, or for div:first-child... has some top margin?
Jellby is offline   Reply With Quote
Advert
Old 01-26-2011, 04:55 AM   #18
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 Jellby View Post
Maybe the CSS code for div.calibre2, or for #ch05, or for div:first-child... has some top margin?
in my example the calibre 2 definition is just BLOCK - nothing else.

also , as a test I stripped out all div lines before my H2 tags, made no difference to appearence in Kindle

pretty sure that Kindle is hard coded to add space around h2 tags, which is what it looks for when you press navigate left or right
cybmole is offline   Reply With Quote
Old 01-26-2011, 06:08 AM   #19
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,556
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
But the Kindle is a different beast, it does not read ePUB, but Mobipocket, so whatever the ePUB says is meaningless, all that counts is what goes into the Mobipocket. You are using some converter, that converter might add something or not, it might override the default or not... If you were creating the Mobipocket directly, I'd tell you to use:

Code:
<h2 height="0em">2</h2>
since in Mobipocket pseudo-HTML, "height" means "space above".
Jellby is offline   Reply With Quote
Old 01-26-2011, 06:29 AM   #20
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 Jellby View Post
But the Kindle is a different beast, it does not read ePUB, but Mobipocket, so whatever the ePUB says is meaningless, all that counts is what goes into the Mobipocket. You are using some converter, that converter might add something or not, it might override the default or not... If you were creating the Mobipocket directly, I'd tell you to use:

Code:
<h2 height="0em">2</h2>
since in Mobipocket pseudo-HTML, "height" means "space above".
yes I am using calibre to convert epub to mobi
cybmole is offline   Reply With Quote
Advert
Old 01-26-2011, 10:32 AM   #21
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,095
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by cybmole View Post
yes I am using calibre to convert epub to mobi
I only do EPUB

My solutions are aimed at that END.

I would say that <div class="calibre2"> causes a block to be inserted (with inherited: first case, body (margins) attributes).
Thus the behavior Jabby saw.
I would have to see where (Warning: DON'T POST copyrighted material) each of those Div tags closed, but if they just surround the chapter title block...rip those suckers out.

Start with the inner-most pair. See what you get.
Save if good... Remove the next pair

Last edited by theducks; 01-26-2011 at 10:40 AM.
theducks is online now   Reply With Quote
Old 01-27-2011, 01:19 AM   #22
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by theducks View Post
Is there some stray <p>&nbsp;</p> or similar between the <body> and the first <h#> ? (or <div> or <br /> )
That just isn't right
I thought the same thing - but there is nothing there. Here is a cut and paste.

<body class="noline" style="">
<h2 class="noline" id="heading_id_2" title="A-A"></h2>

<h3 class="authors" id="heading_id_3">Aguilera, Caroline Garcia</h3>

If I take out the style="" in the first line it makes no difference since Sigil puts it right back in.

Regards - John
Jabby is offline   Reply With Quote
Old 01-27-2011, 04:50 AM   #23
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,556
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Ah, so you have an empty <h2>? Try with "h2.noline { height: 0; margin: 0; padding: 0; }"

Or "h2.noline { display: none }" (though I'm not sure how links no non-displayed elements work.
Jellby is offline   Reply With Quote
Old 01-27-2011, 09:26 AM   #24
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by Jellby View Post
Ah, so you have an empty <h2>? Try with "h2.noline { height: 0; margin: 0; padding: 0; }"

Or "h2.noline { display: none }" (though I'm not sure how links no non-displayed elements work.
I've tried every combination of values for ".noline" I could think of and only two work; display:inline or margin:0 and you MUST have the class=noline in both the "body" and the "h3" definition.

BTW, I choose "display: inline" because this works best if you want give an image (a cover?) a TOC entry.

Regards - John

P.S. If anybody wants a file to play with I'd be happy to upload a shortened version of the file I'm using.
Jabby is offline   Reply With Quote
Old 01-27-2011, 10:35 AM   #25
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,095
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jabby View Post
I've tried every combination of values for ".noline" I could think of and only two work; display:inline or margin:0 and you MUST have the class=noline in both the "body" and the "h3" definition.

BTW, I choose "display: inline" because this works best if you want give an image (a cover?) a TOC entry.

Regards - John

P.S. If anybody wants a file to play with I'd be happy to upload a shortened version of the file I'm using.
Jelby has it.
You have an "Empty" (nothing shows on the screen) H2 (That is only used to put a title in the TOC). It still has the Height of a visible H2

You need to override its normal properties and shrink it to 0 (4 things make up vertical space used:Margin Border, Padding, and Text-size(content)
http://www.w3.org/TR/CSS2/box.html to see a model of what you are trying to manipulate,"Your way"
theducks is online now   Reply With Quote
Old 01-27-2011, 11:14 AM   #26
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
And that's only if the reader handles those properties correctly.
Perkin is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another TOC question, I think Jabby Sigil 0 11-23-2010 10:18 AM
TOC question Todd Calibre 6 07-15-2010 08:22 PM
6.0 TOC question Amalthia Calibre 3 07-30-2009 12:45 PM
BD TOC Question Novasea Workshop 5 10-27-2008 11:38 AM
toc question zelda_pinwheel IMP 4 01-18-2008 10:49 AM


All times are GMT -4. The time now is 10:23 PM.


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