Mobileread
Kobo right-aligns italicized
#1  Cepheus 05-11-2020, 10:46 AM
I have created an e-Pub that has no issues on other devices. On a Kobo though something very strange happens. In the attache image you can see that it has right aligned the italicized phrase at the end of the paragraph. It has also removed the period that is at the end of the sentence. This doesnÂ’t happen with every italicized word/phrase but it does happen frequently thought the book. I put the XHTML and CSS below. Has anyone else had this experience with their ePubls and does anyone know why this happens?

Any insight is appreciated.

XHTML
<para>I shook my head back and forth as Rosie sat in her chair like Scheherazade, the famous Persian storyteller of <citetitle>1001 Nights</citetitle>.</para>

CSS
em, em.citetitle, em.emphasis, em.foreignphrase {
font-family: inherit;
font-style: italic;
font-weight: normal;
text-align: inherit;
}
right-aligned italcs.jpg 
Reply 

#2  DNSB 05-11-2020, 12:11 PM
Quote Cepheus
I have created an e-Pub that has no issues on other devices. On a Kobo though something very strange happens. In the attache image you can see that it has right aligned the italicized phrase at the end of the paragraph. It has also removed the period that is at the end of the sentence. This doesn’t happen with every italicized word/phrase but it does happen frequently thought the book. I put the XHTML and CSS below. Has anyone else had this experience with their ePubls and does anyone know why this happens?

Any insight is appreciated.

XHTML
<para>I shook my head back and forth as Rosie sat in her chair like Scheherazade, the famous Persian storyteller of <citetitle>1001 Nights</citetitle>.</para>

CSS
em, em.citetitle, em.emphasis, em.foreignphrase {
font-family: inherit;
font-style: italic;
font-weight: normal;
text-align: inherit;
}
Do you actually have <para>...</para> being using instead of <p>...</p>? You need to use the correct tags.

Ditto for <citetitle>...</citetitle>

<p class="para">....<em class="citetitle">...</em></p>

Though using just <em> would work from the part of your CSS you posted. I would lose the font-family: inherit, font-weight: normal and text-align: inherit from the css as well. If you wanted to bold an citetitle, the font-weight would block or not block depending on the order applied.

Code
<p class="para">I shook my head back and forth as Rosie sat in her chair like Scheherazade, the famous Persian storyteller of <em class="citetitle">1001 Nights</em>.</para>
p.para { display : block; font-size : 1em; padding : 0 0 0.2em 0; margin : 0 0 0 0;
;
em, em.citetitle, em.emphasis, em.foreignphrase { font-style: italic;
}
If you have the rights to do so, you might want to post the book itself either attached to a message in this thread or possibly a new thread in the Epub forum. If you are worried about the contents of the book, use the ScrambleBook plugin for calibre to scramble it before posting.

Edit: And what device are you reading on?
Reply 

#3  JSWolf 05-11-2020, 12:56 PM
Code
body { widows: 1; orphans: 1; margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; text-align: justify;
}
p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em;
}
em, em.citetitle, em.emphasis, em.foreignphrase { font-style: italic;
}
That's better CSS code to use instead of what you are using. You don't need <p class="para"> for most paragraphs. You just need <p>.

Change this...<p class="para">....<em class="citetitle">...</em></p> to...

<p>....<em>...</em></p>

Much simpler code.
Reply 

#4  DNSB 05-11-2020, 01:36 PM
Thanks for the input, Jon.
Reply 

#5  JSWolf 05-11-2020, 02:32 PM
Quote DNSB
Thanks for the input, Jon.
Happy to help.

I never could understand why publishers use code such as <p class="para"> for the most use paragraph when <p> worked perfectly as long as the CSS was correct. Then again, I don't get why in some eBooks there can be hundreds of unused CSS classes in an eBook.
Reply 

#6  DNSB 05-11-2020, 03:11 PM
Quote JSWolf
Happy to help.

I never could understand why publishers use code such as <p class="para"> for the most use paragraph when <p> worked perfectly as long as the CSS was correct. Then again, I don't get why in some eBooks there can be hundreds of unused CSS classes in an eBook.
Most corporate ebooks use their generalized stylesheet(s) which often have multiple styles that don't occur in a specific ebook. OTOH, take a look at Sigil's report for a Vellum created ebook. It's not the mass of unused classes which makes sense in a way since they use their corporate style sheets but the sheer number of unused classes in the xhtml files.
Reply 

#7  JSWolf 05-11-2020, 03:52 PM
Quote DNSB
Most corporate ebooks use their generalized stylesheet(s) which often have multiple styles that don't occur in a specific ebook. OTOH, take a look at Sigil's report for a Vellum created ebook. It's not the mass of unused classes which makes sense in a way since they use their corporate style sheets but the sheer number of unused classes in the xhtml files.
Do you have a title that was created using Vellum? I've not had the pleasure of having looked at one. I can grab a sample from Amazon and see how it looks.

Is Vellum CSS as bad as InDesign CSS?
Reply 

#8  DNSB 05-11-2020, 04:10 PM
Quote JSWolf
Do you have a title that was created using Vellum? I've not had the pleasure of having looked at one. I can grab a sample from Amazon and see how it looks.

Is Vellum CSS as bad as InDesign CSS?
In it's own weird way yes. There will be two stylesheets, one with @media wappers trying to cover a mass of different resolutions for Kindle devices and ghod alone knows what else.
Reply 

#9  JSWolf 05-11-2020, 04:13 PM
Quote DNSB
In it's own weird way yes. There will be two stylesheets, one with @media wappers trying to cover a mass of different resolutions for Kindle devices and ghod alone knows what else.
I don't know the source, but I've seen some code from a self-published eBook on Amazon that was dreadful. I think Amazon should make sure that all code is not that bad before allowing it to be for sale.
Reply 

#10  DNSB 05-11-2020, 07:53 PM
Quote JSWolf
I don't know the source, but I've seen some code from a self-published eBook on Amazon that was dreadful. I think Amazon should make sure that all code is not that bad before allowing it to be for sale.
If the book passes the inbound error checks, Amazon relies on customer feedback to decide if a book should be pulled for formatting or other errors. So far, the best luck I've had with complaints has been directly to the author when the author is accessible. Though one ebook I purchased from Amazon several years back is still getting reviews commenting on the number of misspellings, homonym misuse, etc. I've never bothered to read another book from that author -- when you can't keep your alien race names consistent from chapter to chapter, why would anyone waste their time to try to read your book?

As for use of Vellum, I find it more in my XYL's ebooks than in the ebooks I read.
Reply 

Today's Posts | Search this Thread | Login | Register