MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   ePub Chapters vs. Stanza Chapters (https://www.mobileread.com/forums/showthread.php?t=55960)

kjk 09-08-2009 02:12 PM

ePub Chapters vs. Stanza Chapters
 
Hi,
I used your handy "insert chapter" tool on a book that Stanza loaded in as one chunk of text...I added about 20 chapters total.

But Stanza does not seem to recognize these chapter breaks-still loads the book as one huge chunk.

What does constitute a "chapter" in ePub format? Is this just a case of Stanza not recognizing it?

Valloric 09-08-2009 03:15 PM

Quote:

Originally Posted by kjk (Post 584873)
Hi,
I used your handy "insert chapter" tool on a book that Stanza loaded in as one chunk of text...I added about 20 chapters total.

But Stanza does not seem to recognize these chapter breaks-still loads the book as one huge chunk.

What does constitute a "chapter" in ePub format? Is this just a case of Stanza not recognizing it?

Well EPUB books will always be displayed to the user as "one chunk of text". Chapter breaks split the text in two XHTML flows, but this should appear to the user (in a Reading System) as a page with a "page break". That is, the text after the break will appear on the top of a new page and continue from there. The term "chapter break" is probably used only in Sigil and is meant to indicate that it is usually used to split text where the user wants a new chapter to start. As I've said, it will split the XHTML flow into two separate flows at that point. This is important to note, since long flows slow down the display of the book on portable reading devices (slower page turns etc). There are also other technical reasons why you should keep the size of a flow to a minimum.

If you want to have some sort of text saying "Chapter #", then just add a heading with that text after such a chapter break. There is no built-in semantic concept of a chapter in the EPUB specification (and there doesn't need to be one).

I suggest you read up on the EPUB format if you want to know the details (perhaps in the EPUB subforum on this site). I also suggest analysing how other EPUB books are made. There are many right here on MobileRead.

kjk 09-13-2009 11:28 PM

Ok, I think I understand...a bit.
What I decided to do was to use H2 tags to separate my chapters, because I believe(?) Calibre correctly converts these to chapters.

So, I set my Chapter numbers/titles to H2, and that seems to work great-the iPhone sees these as chapters correctly.

So, my next question is...in Sigil I can assign Heading 1, Heading 2, Heading 3, quite easily using the Style dropdown menu. These correspond to H1, H2, H3 tags, right?

When I use H2 for my chapters, I get a BOLD, larger typeface than the rest of the document for the Chapter number/title that is within the H2/H2 tag

Where in the styles section of the document (the CSS) are H1, H2, H3 called out?
I don't see H2 in the CSS portion of the code, calling out text decoration: bold or anything.

What am I missing? :p

Here is the CSS:
Quote:

<style type="text/css">
/*<![CDATA[*/
@namespace h "http://www.w3.org/1999/xhtml";
.calibre {
display: block;
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
page-break-before: always;
text-align: justify
}
.calibre1 {
display: block;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
margin-top: 1em
}
a {
color: inherit;
text-decoration: inherit;
cursor: default
}
a[href] {
color: blue;
text-decoration: underline;
cursor: pointer
}

@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
div { margin: 0pt; padding: 0pt; }

@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }

img.sgc-1 {height: 100%}

/*SG DO NOT MODIFY.
This style is used by Sigil.
It will be removed on export
along with the "sigilChapterBreak" HR tags. SG*/
hr.sigilChapterBreak {
border: none 0;
border-top: 3px double #c00;
height: 3px;
}

span.sgc-2 {font-style: italic;}
/*]]>*/
</style>
span.sgc-2 is italics, it seems (I used your Italics button to set some lines to italics, so I understand why font-style: italics)

The chapters are tagged as:

<h2>Chapter 2: The Wolf and the Lamb<br /></h2>

And show up as larger typefaces, in BOLD.

But I don't see h2 in the CSS? And i don't see any font style: bold setting?

CleverClothe 09-14-2009 02:39 AM

Headings (the H# tags) have different default styles. Here is a good simple explanation:

http://www.mediacollege.com/internet/html/heading.html

kjk 09-14-2009 11:50 AM

Quote:

Originally Posted by CleverClothe (Post 591246)
Headings (the H# tags) have different default styles. Here is a good simple explanation:

http://www.mediacollege.com/internet/html/heading.html

thanks, CleverClothe!

So if i want to change them, I can set the H1 H2 values in the styles section to override those defaults? Awesome.


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.