01-21-2011, 03:39 PM | #1 |
Member
Posts: 11
Karma: 176
Join Date: Jan 2011
Device: Kindle/iPad
|
HTML-EPUB: no justified alignment in iPad (iBooks)
Update: Please ignore the question. It was my own mistake, I overlooked the Full Justification item in iBooks settings. I'm sorry.
--------- I spent hours yet and I still haven't found solution of this justify issue: I prepared very simple text in HTML and I want to have the common paragraphs <p> justified. So I made a CSS file with: Code:
p {text-align: justify; text-indent: 1.1em; } Well, iBooks probably isn't able to justify text. No, it is. When I add simple <b> tag to some paragraphs to make them bold, they appear bold... and justified. Please look at picture attached. There is also HTML code which was used as source for the EPUB in the second picture - just very simple, nothing complicated. What am I missing? Why the basic text has only left alignment and after I add bold, it will justify? Thank you Last edited by marekl; 01-21-2011 at 04:39 PM. |
01-21-2011, 03:45 PM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I only know basic HTML, but when I look at the markup, it's identical for the bold and normal paragraphs apart from the bold tags. Might this be an iBooks issue? How does the text render in other viewing programs, like the Calibre reader? What does the actual XHTML in the ePub look like for those paragraphs?
|
Advert | |
|
01-21-2011, 03:55 PM | #3 |
Member
Posts: 11
Karma: 176
Join Date: Jan 2011
Device: Kindle/iPad
|
This is funny: If I use code text-align: right in the CSS file, all paragraphs in iBooks are correctly aligned to the right. :-)
I see all paragraphs justified in Calibre viewer. Here is the Calibre command I use for conversion: /usr/bin/ebook-convert aaa.html aaa.epub --output-profile=ipad --input-encoding=utf-8 --disable-font-rescaling --extra-css=styles.css --chapter="//h:h1" --chapter-mark=pagebreak --page-breaks-before="//h:h1" --author-sort="Me" --authors="Me" --comments="no comment" --language=CS --pubdate="2011 01 21" --publisher="me" --title="aaa 11" -v -v -v The EPUB result is attached to the reply. Last edited by marekl; 01-21-2011 at 04:01 PM. |
01-21-2011, 04:16 PM | #4 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Here's a snippet of text from the ePub:
Code:
<p class="calibre3">Nulla viverra viverra odio, ut euismod arcu ultrices ut. Sed laoreet blandit turpis quis dictum. Donec rutrum tellus at nulla aliquet feugiat consectetur sem suscipit. Suspendisse non turpis mauris.</p> <h2 class="calibre4">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h2> Code:
.calibre3 { display: block; font-weight: normal; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: justify; text-indent: 1.1em } .calibre4 { display: block; font-family: sans-serif; font-size: 1.5em; font-weight: bold; margin-bottom: 0.83em; margin-left: 0; margin-right: 0; margin-top: 0.83em; text-align: left } However, I don't know why this is so. I'd suggest you wait for someone more knowledgeable to show up. |
01-21-2011, 04:24 PM | #5 |
Member
Posts: 11
Karma: 176
Join Date: Jan 2011
Device: Kindle/iPad
|
Hi, the .calibre4 style is used for H2 headings. The base text paragraph with bold looks like this in EPUB:
<p class="calibre3"><b class="calibre6">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas est odio, consequat vel pretium id, vestibulum eu quam. Maecenas sed risus purus, ac blandit nisi. Aenean a tellus nisl, ullamcorper condimentum lorem. Curabitur pellentesque varius sem, at fermentum libero semper vitae.</b></p> And the styles definitions are: .calibre3 { display: block; font-weight: normal; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: justify; text-indent: 1.1em } .calibre6 { font-weight: bolder } Last edited by marekl; 01-21-2011 at 04:27 PM. |
Advert | |
|
01-21-2011, 04:37 PM | #6 |
Member
Posts: 11
Karma: 176
Join Date: Jan 2011
Device: Kindle/iPad
|
I'm very sorry to disturbing you with this question. It was my own stupid mistake. There is "Full Justification" item in iBooks settings and it was switched off
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
iPad iBooks epub on Nook? | yanathin | ePub | 3 | 08-15-2010 05:41 AM |
iPad iPad epub reader that isn't iBooks? | frameset | Apple Devices | 4 | 05-12-2010 08:57 PM |
Text wrap in epub for ipad iBooks | dblatner | ePub | 3 | 04-24-2010 06:16 PM |
Jobs confirms DRM free epub books can be loaded and read via iBooks on iPad | stustaff | News | 14 | 03-25-2010 09:24 AM |
calibre: HTML to LRF conversion, problem with justified text | Juggle4Evr | Sony Reader | 6 | 07-12-2009 07:19 PM |