View Full Version : ePub to PubIt! Errors


christinerose
04-25-2011, 09:41 AM
:help:

I've tweaked the ePub in Sigil to where it looks perfect, but when I upload it to PubIt!, it's off.

My understanding is that PubIt! uses ePub, so who is it changing at all?

See the attached screenshots to how it looks in Sigil and how it looks in the PubIt! Nook preview.

I put in this line:
body, div, p, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }


So there wouldn't be spaces between the paragraphs, but there still are. Even before I put that line in, it looked fine in Sigil. Each time I upload it to PubIt!, the paragraphs are separated again.

Jellby
04-25-2011, 09:48 AM
Some readers have default margins or other properties that cannot be changed and that take preference over styles in the book. Try using a selector with a higher priority, such as:

body p {margin: 0; padding: 0; }

which means "all <p> tags inside a <body> tag". It should apply to all <p> tags, because all should be inside <body>, but it has a higher priority than just "p".

christinerose
04-25-2011, 10:18 AM
Thank you, Jellby; but that didn't work. :(

It's still showing space between paragraphs.

This is what I have now:

body p { margin: 0; padding: 0; text-indent:50px; }
li p {margin: 0; padding: 0; text-indent: 0; }

div, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }

JSWolf
04-25-2011, 10:29 AM
Can you please show us a snippet of the actual code? Without that, there's not a lot we can do to help.

christinerose
04-25-2011, 10:37 AM
Sure! I'll put in the entire CSS file if that helps. :)

@font-face {
font-family: "Times New Roman", Times, serif;
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: "Times New Roman", Times, serif;
font-style: normal;
font-weight: bold;
}
@font-face {
font-family: "Times New Roman", Times, serif;
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: "Times New Roman", Times, serif;
font-style: normal;
font-weight: normal;
}
body p { margin: 0; padding: 0; text-indent:50px; }
li p {margin: 0; padding: 0; text-indent: 0; }

div, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }

div.generated-style {
font-family: "Times New Roman";
}
div.generated-style-2 {
font-family: "Times New Roman";
}
p.section-header {
font-family: "Times New Roman";
line-height: 1.00em;
font-size: 1.33em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: center;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
p.subsectionheader {
font-family: "Times New Roman";
line-height: 1.14em;
font-size: 1.17em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.x3rdsection-header {
font-family: "Times New Roman";
line-height: 1.14em;
font-size: 1.17em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.x4th-section-header {
font-family: "Times New Roman";
line-height: 1.14em;
font-size: 1.17em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.x5th-section-header- {
font-family: "Times New Roman";
line-height: 1.14em;
font-size: 1.17em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.essay-title {
font-family: "Times New Roman";
line-height: 1.14em;
font-size: 1.17em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: center;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.essay-byline {
font-family: "Times New Roman";
line-height: 1.14em;
font-size: 1.08em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: center;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.chapter-title {
font-family: "Times New Roman";
line-height: 1.20em;
font-size: 1.50em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: center;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
p.general-para {
font-family: "Times New Roman";
line-height: 1.33em;
font-size: 1.00em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 1.17em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
p.boxes {
font-family: "Times New Roman";
line-height: 1.33em;
font-size: 1.00em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: center;
font-weight: bold;
font-style: normal;
color: rgb(0,0,0);
}
p.blog-posts {
font-family: "Times New Roman";
line-height: 1.33em;
font-size: 1.00em;
margin-bottom: 0.75em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 1.50em;
margin-left: 1.50em;
text-align: justify;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
p.checkboxes {
font-family: "Times New Roman";
line-height: 1.33em;
font-size: 1.00em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: -1.50em;
margin-right: 0.00em;
margin-left: 2.67em;
text-align: justify;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
p.footer {
font-family: "Times New Roman";
line-height: 1.20em;
font-size: 0.67em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
p.boxtext {
font-family: "Times New Roman";
line-height: 1.33em;
font-size: 1.00em;
margin-bottom: 0.00em;
margin-top: 0.00em;
text-indent: 0.00em;
margin-right: 0.00em;
margin-left: 0.00em;
text-align: justify;
font-weight: normal;
font-style: normal;
color: rgb(0,0,0);
}
span.generated-style {
}
h2{
font-family: "Times New Roman";
font-size: 1.36em;
font-weight: bold;
}
h3{
font-family; "Times New Roman";
font-size: 1.30em;
font-weight: bold;
}
h4{
font-family: "Times New Roman";
font-size: 1.25em;
font-weight: bold;
}
h5{
font-family: "Times New Roman";
font-size: 1.17em;
line-height: 1.14em;
font-weight: bold;
}
h6{
font-family: "Times New Roman";
font-size: 1.13em;
line-height: 1.14em;
font-weight: bold;
}
ol{
font-family: serif;
font-size: 1.00em;
font-weight: normal;
text-align: justify;
}
ul{
font-family: serif;
font-size: 1.00em;
font-weight: normal;
text-align: justify;
}

All those font faces at the top were originally other fonts as exported from InDesign CS4, but I changed them all to "Times New Roman." Same for the p.xxx near the bottom. Made all those the same text size.

Also added the h2, h3, etc., and the ol/ul.

Strangely, Sigil seems to be changing the fonts back in-line the xhtml documents automatically. But that's another issue.

:thanks:

christinerose
04-25-2011, 10:41 AM
Here is the code from the file pictured above.

See how it's putting in all the sgc- exceptions? It's adding Adobe Garamond Pro and others back in after I changed all the fonts in the CSS.

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NonFiction_eBook</title>
<link href="../Styles/template.css" rel="stylesheet" type="text/css" />


<style type="text/css">
span.sgc-1 {font-weight: normal; font-size: 16px;}

p.sgc-8 {text-align: left;font-family: 'Adobe Garamond Pro'; line-height: 1.23em; font-size: 1.08em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: bold; font-style: normal; color: rgb(0, 0, 0);}
b.sgc-7 {text-decoration: underline}
div.sgc-6 {text-align: left;}
span.sgc-5 {font-weight: normal;}
span.sgc-4 {font-family: 'Adobe Garamond Pro'; font-size: 17px; font-weight: bold; line-height: 21px}
blockquote.sgc-3 {margin: 0 0 0 40px; border: none; padding: 0px;}
b.sgc-2 {font-style: italic}

span.sgc-12 {text-decoration: underline}
span.sgc-11 {font-weight: bold}
p.sgc-10 {text-align: center;}

ul.sgc-20 {font-family: Arial; line-height: normal; font-size: medium;}
p.sgc-19 {font-family: 'Adobe Garamond Pro'; line-height: 1.23em; font-size: 1.08em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; text-align: center; font-weight: bold; font-style: normal; color: rgb(0, 0, 0);}

span.sgc-17 {font-weight: bold; text-decoration: underline}

span.sgc-23 {font-style: italic; font-weight: bold}

span.sgc-37 {font-family: Arial; line-height: normal; font-size: medium;}

i.sgc-35 {font-weight: bold}
p.sgc-34 {text-align: justify;font-family: 'Adobe Garamond Pro'; line-height: 1.23em; font-size: 1.08em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: bold; font-style: normal; color: rgb(0, 0, 0);}
li.sgc-33 {list-style: none; display: inline}






p.sgc-26 {text-align: center;font-family: 'Adobe Garamond Pro'; line-height: 1.33em; font-size: 1em; margin-bottom: 0em; margin-top: 0em; text-indent: 1.17em; margin-right: 0em; margin-left: 0em; font-weight: normal; font-style: normal; color: rgb(0, 0, 0);}
p.sgc-25 {text-align: center; font-family: 'Adobe Garamond Pro'; line-height: 1.33em; font-size: 1em; margin-bottom: 0em; margin-top: 0em; text-indent: 1.17em; margin-right: 0em; margin-left: 0em; font-style: normal; color: rgb(0, 0, 0);}
</style>
<style type="text/css">
p.sgc-57 {font-family: 'Adobe Garamond Pro'; line-height: 1.23em; font-size: 1.08em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; text-align: justify; font-weight: normal; font-style: normal; color: rgb(0, 0, 0);}



i.sgc-53 {text-decoration: underline}
p.sgc-52 {text-align: center;font-family: 'Times New Roman'; line-height: 1.33em; font-size: 1.00em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: normal; font-style: normal; color: rgb(0, 0, 0);}
p.sgc-51 {font-family: 'Times New Roman'; line-height: 1.33em; font-size: 1.00em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: bold; font-style: normal; color: rgb(0, 0, 0); text-align: center;}

div.sgc-49 {text-align: center;font-family: serif; line-height: normal; font-size: medium;}

p.sgc-47 {text-align: center;font-family: serif; line-height: 1em; font-size: 1.33em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: normal; font-style: normal; color: rgb(0, 0, 0);}



div.sgc-43 {font-family: Arial; line-height: normal; font-size: medium;}
p.sgc-42 {text-align: justify;font-family: Capitals; line-height: 1em; font-size: 1.33em; margin-bottom: 0em; margin-top: 0em; text-indent: 0em; margin-right: 0em; margin-left: 0em; font-weight: normal; font-style: normal; color: rgb(0, 0, 0);}

p.sgc-58 {text-align: justify;}

span.sgc-60 {font-style: italic}
</style>
</head>

<body>
<p class="general-para"></p>

<h2 id="heading_id_2">Part I: Publishing</h2>

<p class="general-para"><span class="generated-style">Writing a book is very hard. I know. I've done it six times now. Seven, counting this one. However, as hard as it is, writing your book is the easiest part of this process. Getting published is infinitely more difficult, especially if you go with the first of the four basic choices: a New York "Big Boy" Publisher.</span></p>

st_albert
04-25-2011, 12:37 PM
would it help to use the !important modifier, as in


body p { margin: 0 !important; padding: 0; text-indent:50px; }



Maybe that will encourage the Nook to pay attention.

Jim Lester
04-25-2011, 01:31 PM
The user style sheet that B&N uses, has a higher priority than any other CSS elements (and includes rules on the body element). So while eventually you may figure a way around this, you are only one update away from it not working the way you expect.

However, on any B&N reader if you want your styling to be used, then you need to go set 'Publisher Defaults' to 'On', which will disable the user style sheet, and get it to pay attention to your styling.

Jellby
04-25-2011, 01:59 PM
... or try adding a class to every paragraph.

Because we don't know what the B&N stylesheet looks like, do we?

Jim Lester
04-25-2011, 04:30 PM
The B&N stylesheet is programmatically generated (based upon user font selections among other things) and is subject to change at each release. Trying to work around that directly is likely to be an exercise in frustration.

christinerose
04-25-2011, 04:49 PM
Wow! Thanks for this great information!
Good to know it's not something I was doing wrong. I was going nuts! :D