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 02-17-2011, 03:34 PM   #1
jpaulm
Member
jpaulm began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2011
Device: none
Diagram display in ebooks

I am a total newbie in ebooks, so I am not sure even where to put my query. Sorry!

I have an Open Office book, which I have converted to XHTML 1.0, using the Open Office Writer2XHTML extension. I process that using Sigil, and display the result using Calibre. The text looks pretty good, but the diagrams are all over the place - sometimes they are over on the right and rather small, sometimes centred and decent size. I would appreciate it very much if someone could suggest where to make changes, e.g. would be better to left-justify all diagrams, or maybe there is some attribute that should not be left automatic...? Any idea what is happening? TIA
jpaulm is offline   Reply With Quote
Old 02-17-2011, 05:14 PM   #2
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
I don't know whether this will be any help. I convert raw HTML to EPUB all the time. I use Calibre only (not Sigil).

In the HTML I make sure my <img> tag is enclosed in <p>...</p> tags and that I don't have any height or width attributes set in the <img> tag. So a typical image would look like this in the HTML:
Code:
<p class="aligncentre"><img alt="c01" src="images/c01.jpg"/></p>
with this as the relevant bit of CSS:
Code:
.aligncentre {text-align:center; text-indent:0}
Edit: I wouldn't think it would matter whether your image was aligned left, right or center in the CSS.

Last edited by jackie_w; 02-17-2011 at 05:23 PM.
jackie_w is offline   Reply With Quote
Advert
Old 02-17-2011, 05:31 PM   #3
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Open office Writer has an epub plugin. Have you tried expoting an epub with that?
Perkin is offline   Reply With Quote
Old 02-17-2011, 07:17 PM   #4
jpaulm
Member
jpaulm began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2011
Device: none
Thanks, Perkin. I tried downloading writer2epub extension and it just seems to hang my machine! I had to bring the whole machine down!

Jackie_w, sorry, how do I feed html to Calibre? Should I put it in a zip file first? I was using Sigil to chop the book up into chapters - do I not need to do that?

Thanks...
jpaulm is offline   Reply With Quote
Old 02-17-2011, 08:13 PM   #5
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by jpaulm View Post
Jackie_w, sorry, how do I feed html to Calibre? Should I put it in a zip file first? I was using Sigil to chop the book up into chapters - do I not need to do that?
Thanks...
Just drag the HTML file onto the Calibre Library window. It will automatically zip up the HTML file with any associated images and css as part of the import process.

Chapter detection is a subject with a lot of opinion and different ways of doing things. It is done as part of the Calibre conversion process (Convert - Structure Detection and - TOC and can be configured to suit your HTML). How well or easily it does it depends on your source HTML.

For example, if all your chapters are nicely tagged with heading tags (<h1>, <h2>, ... etc) in the source HTML then Calibre will create a flawless TOC with very little effort (I believe this is what Sigil does).

At the other end of the scale if your HTML tagging of chapters is all over the place or non-existent, all is still not lost. Convert - Heuristic Processing, if you enable it, has many tricks for trying to 'figure out' where new chapters start. Personnally I go for correct tagging in the source HTML, but many others find the Heuristic Processing easier because they don't know how to edit HTML themselves.
jackie_w is offline   Reply With Quote
Advert
Old 02-17-2011, 08:31 PM   #6
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
... one further thing... I use MSWord rather than Open Office to create the HTML source. If I want to make sure that titles and chapters are nicely tagged with <h1> and <h2> etc tags then I style the titles and chapter headings with the built-in Word styles 'Heading 1', 'Heading 2' etc. I don't know whether this will work for you in Open Office but it's worth a try. It may save you lots of time and effort.
jackie_w is offline   Reply With Quote
Old 02-18-2011, 02:33 PM   #7
jpaulm
Member
jpaulm began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2011
Device: none
Thanks Jackie_w, it's starting to look very good! And OOo's chapters and TOC are handled perfectly!

The only thing that isn't quite right is the cross-referencing. When I reference a page number using OOo's cross-reference function, it displays as a blue "1", but when I click on it, it jumps to the right place! This is apparently a problem with the OOo to HTML conversion - the simplest thing is probably to change the '1's to something non-specific, like "here". Has anyone run into this - and maybe has a better idea? Thanks again, Jackie_w!
jpaulm is offline   Reply With Quote
Old 02-18-2011, 03:17 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Cross-referencing isn't something I do much of, but I have a vague memory that if using ids/names in link references (<a id=...>...</a>) then ids/names must begin with an alpha character not a digit. Might this be the problem?
jackie_w is offline   Reply With Quote
Old 02-18-2011, 03:55 PM   #9
jpaulm
Member
jpaulm began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jan 2011
Device: none
Thanks, Jackie_w, that wasn't it. I think it's just some logic missing from the OOo->html converter. I have tried replacing the '1's by 'here', and it doesn't look to bad, but I may try to get a bit fancier. BTW The Seamonkey editor doesn't seem to like multiple reference targets in one place, and was dropping the targets of my cross-references, so I switched to Jujuedit. I just thought someone might have run into that problem! Thanks for all your help!
jpaulm is offline   Reply With Quote
Reply

Tags
calibre, diagrams, sigil, writer2xhtml


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create a diagram-and-character- composing EPUB? yuxi_kelly ePub 0 12-07-2010 02:19 AM
PRS-650 vizplex display or pearl display hoytlee Sony Reader 2 10-05-2010 07:34 PM
Pixel Qi 10" display will be sold as USB powered Secondary Display Dulin's Books News 8 09-28-2010 07:15 PM
Problem with PDF diagram display on DR800S DeReader iRex 11 03-11-2010 10:22 AM


All times are GMT -4. The time now is 05:13 PM.


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