Register Guidelines E-Books Search Today's Posts Mark Forums Read

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: 2,223
Karma: 3868686
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, iPad2, Kobo Touch, Sony PRS T3, Nexus 7
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:	68
Size:	32.5 KB
ID:	84851   Click image for larger version

Name:	K4PC.PNG
Views:	64
Size:	17.0 KB
ID:	84852  
AlexBell is offline   Reply With Quote
Old 04-05-2012, 09:57 AM   #2
theducks
Grand Sorcerer
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: 14,230
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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: 2,223
Karma: 3868686
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, iPad2, Kobo Touch, Sony PRS T3, Nexus 7
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
Grand Sorcerer
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: 14,230
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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, 42 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: 62,559
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Tables in ePub are just normal HTML tables, Alex. Nothing special about them.
HarryT is online now   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: 2,223
Karma: 3868686
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, iPad2, Kobo Touch, Sony PRS T3, Nexus 7
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: 62,559
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
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 online now   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: 2,223
Karma: 3868686
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, iPad2, Kobo Touch, Sony PRS T3, Nexus 7
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: 62,559
Karma: 40125235
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
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 online now   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: 2,223
Karma: 3868686
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, iPad2, Kobo Touch, Sony PRS T3, Nexus 7
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
Grand Muckity-Muck
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: 31,885
Karma: 94158280
Join Date: Jun 2009
Location: Chesapeake, VA, USA
Device: Kindle Paperwhite, iPad Air, iPod Nano. Other devices gathering dust.
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
Taking a break; Fed up
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: 6,512
Karma: 42609940
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
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
Grand Muckity-Muck
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: 31,885
Karma: 94158280
Join Date: Jun 2009
Location: Chesapeake, VA, USA
Device: Kindle Paperwhite, iPad Air, iPod Nano. Other devices gathering dust.
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:11 AM.


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