Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-05-2012, 02:02 AM   #1
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Border and text indent problem ePub to mobi

I'm not at all sure that this is the right forum for this query; if not, moderator please move.

The background to this query is that I prepare ebooks for the publishers below my signature - the publisher sends me a doc file, I prepare validated XHTML files, package them into an ePub file, and then convert to mobi with calibre.

In the anthology I'm working on now one of the stories contains a 'top secret report' and the publisher wants a border around it. The report contains 'headings' which should be flush left, and are followed by unorganised list.

I've made it work in ePub, as shown by the attached ADE.PNG. But it looks awful in mobi, as shown by the attached K4PC.PNG - there is no border, and the headings are not flush left.

The CSS for the div containing the report is:

div#report { padding: 5px;
margin-top: 2em;
border: 2px black solid; }

The XHTML for the 'headings' is:

<p class="flush">Potential Threat: Ballistic or Death Ray</p>

And the CSS for the 'headings' is:

.flush { text-indent: 0; }

I know mobi is quite limited as to what it can do, and I tend to rely on calibre to modify the ePub file so that the mobi versin will look more or less the same as the ePub - so far as mobi will let it. And I know that the XHTML and CSS above works since it works in other parts of the same ebook.

Is there any way of changing the XHTML and CSS so that calibre can produce the same effect in mobi as in ePub?
Attached Thumbnails
Click image for larger version

Name:	ADE.PNG
Views:	255
Size:	32.5 KB
ID:	84851   Click image for larger version

Name:	K4PC.PNG
Views:	245
Size:	17.0 KB
ID:	84852  
AlexBell is offline   Reply With Quote
Old 04-05-2012, 09:57 AM   #2
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: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I don't think border is allowed at the Paragraph layer in HTML3.2.

Border is allowed for a table 1 column wide?
theducks is offline   Reply With Quote
Old 04-05-2012, 10:02 PM   #3
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by theducks View Post
I don't think border is allowed at the Paragraph layer in HTML3.2.

Thanks

Border is allowed for a table 1 column wide?
So would be the attempt at making a border which is preventing the paragraphs to be flush left/no indent in mobi? I guess the only way to find out is to comment out the border and see if that makes a difference. It's a start.

I've never attempted to do a table in ePub, but there's always a first time.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 04-06-2012, 12:28 AM   #4
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: 29,785
Karma: 54830978
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 AlexBell View Post
So would be the attempt at making a border which is preventing the paragraphs to be flush left/no indent in mobi? I guess the only way to find out is to comment out the border and see if that makes a difference. It's a start.

I've never attempted to do a table in ePub, but there's always a first time.

Regards, Alex
Here is a test sample
Attached Files
File Type: epub TestTable.epub (1.8 KB, 220 views)
theducks is offline   Reply With Quote
Old 04-06-2012, 04:10 AM   #5
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Tables in ePub are just normal HTML tables, Alex. Nothing special about them.
HarryT is offline   Reply With Quote
Old 04-06-2012, 04:19 AM   #6
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Thanks to you both, especially for the TestTable.epub

But commenting out the border doesn't make any difference - except of course to remove the border on the ePub. The headings on the mobi are still not flush left. It must be something else.

I think I'm going to take that segment out of the anthology, and make an ebook out of it starting from scratch, testing almost at each line until I find out what's wrong.

I loathe mobi with a passion.
AlexBell is offline   Reply With Quote
Old 04-06-2012, 04:33 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Indents in Mobi are controlled with the "width=" attribute.

Eg, <p width="1em"> will give you a 1em indent, while <p width="-1em"> gives a 1em "outdent".
HarryT is offline   Reply With Quote
Old 04-07-2012, 04:55 AM   #8
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Quote:
Originally Posted by HarryT View Post
Indents in Mobi are controlled with the "width=" attribute.

Eg, <p width="1em"> will give you a 1em indent, while <p width="-1em"> gives a 1em "outdent".
I'm afraid that's not much help to me, since I markup the doc files to valid HTML, then convert these files to valid XHTML as required by the ePub standards, then package them up to valid ePubs, then convert to mobi with calibre. I doubt that the markup you've suggested will validate in XHTM, but I will try.
AlexBell is offline   Reply With Quote
Old 04-07-2012, 04:58 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
No, I suspect you're right. I do it the other way around; I start with Mobi (which my iPhone insists on wanting to change to "zombie" ) and then convert that to ePub.
HarryT is offline   Reply With Quote
Old 04-08-2012, 01:53 AM   #10
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Thanks, Harry. I have a new respect for your iPhone.

I've got it to work now - so far as I can tell, mobi choked on the div I put around the report, or the padding included in the div, or the fact that I had several tags in the div CSS. Anway, I've dumbed down the markup and it works.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 04-08-2012, 02:50 AM   #11
WT Sharpe
Bah, humbug!
WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.
 
WT Sharpe's Avatar
 
Posts: 39,073
Karma: 157049943
Join Date: Jun 2009
Location: Chesapeake, VA, USA
Device: Kindle Oasis, iPad Pro, & a Samsung Galaxy S9.
Quote:
Originally Posted by HarryT View Post
No, I suspect you're right. I do it the other way around; I start with Mobi (which my iPhone insists on wanting to change to "zombie" ) and then convert that to ePub.
I have a feeling I'm going to regret asking this, but is "zombie" an iPhone format or a joke I missed?
WT Sharpe is offline   Reply With Quote
Old 04-08-2012, 08:12 AM   #12
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,160
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by WT Sharpe View Post
I have a feeling I'm going to regret asking this, but is "zombie" an iPhone format or a joke I missed?
I think Harry is experiencing AutoCorrect when he was typing, and when he typed Mobi, AutoCorrect wanted to replace it by Zombie
PeterT is offline   Reply With Quote
Old 04-08-2012, 08:37 AM   #13
WT Sharpe
Bah, humbug!
WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.WT Sharpe ought to be getting tired of karma fortunes by now.
 
WT Sharpe's Avatar
 
Posts: 39,073
Karma: 157049943
Join Date: Jun 2009
Location: Chesapeake, VA, USA
Device: Kindle Oasis, iPad Pro, & a Samsung Galaxy S9.
Quote:
Originally Posted by PeterT View Post
I think Harry is experiencing AutoCorrect when he was typing, and when he typed Mobi, AutoCorrect wanted to replace it by Zombie
Doh!



We've had some members post some pretty embarrassing things because of auto-correct.

Last edited by WT Sharpe; 04-08-2012 at 08:39 AM.
WT Sharpe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub to mobi text wrap problem Cubeology Conversion 1 12-27-2011 10:07 AM
Image and Text problem from epub to mobi for Kindle DX congngo Conversion 0 12-05-2011 04:48 PM
Paragraph spaces in ePub to Mobi conversion disrupts indent formatting markpearl Conversion 34 09-21-2011 02:42 PM
Right edge indent problem with mobi/Kindle? bfollowell Workshop 3 12-01-2010 04:42 AM
Calibre Indent Issue When Removing Blank Lines (Converting From HTML to MOBI or EPUB) David Derrico Calibre 5 08-04-2010 12:13 AM


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


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