Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-10-2009, 03:01 AM   #16
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 chorpler View Post
Version 0.5.14 using oeb2mobi didn't ... I believe it translated the <guide> elements properly. I'm not sure about 0.6.5 and ebook-convert. I think it might still strip out most other <guide> entries, but last I checked it did work properly with the TOC <guide> entry.
Thanks, Chorpler, that's most helpful.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 08-10-2009, 03:09 AM   #17
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: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
When Calibre converts a Mobipocket book to ePub, it definitely "honours" the TOC that's specified in the Mobi book.
HarryT is offline   Reply With Quote
Advert
Old 08-10-2009, 08:12 AM   #18
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 GRiker View Post
Actually, I think HarryT's correct. If you add a line like this in the <guide> section of your OPF:
<reference type="toc" title="Table of Contents" href="<name of your TOC HTML file>" />
it will be written in MOBI-compliant format. At least it works on my Kindle.

G
Thanks for your response.

I looked in the OPF file and all I could find for guide was <guide />

On the basis of HTML markup and the rest of the OPF file I have added
<guide>
<reference type="toc" title="Table of Contents" href="#TOC" />
</guide>
where the markup in the book I am working on is <div id="TOC">

Does this make sense?

Now that I've made the changes in the OPF file what do I do with it? What's the next step?

Regards, Alex
AlexBell is offline   Reply With Quote
Old 08-10-2009, 12:48 PM   #19
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: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Are you wanting to build a Mobi book, Alex? If so, simply download Mobipocket Creator from http://www.mobipocket.com, double click your OPF file to open it in Mobi Creator, and click the "Build" button to create your book.
HarryT is offline   Reply With Quote
Old 08-10-2009, 11:02 PM   #20
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
Are you wanting to build a Mobi book, Alex? If so, simply download Mobipocket Creator from http://www.mobipocket.com, double click your OPF file to open it in Mobi Creator, and click the "Build" button to create your book.
Thanks, Harry. I've done (and uploaded) a couple of books from HTML/CSS to Mobipocket with Mobipocket Creator, but I want to be able to use Calibre so that I can eventually do ePub books.

In fact my long term dream is to be able to design a template in XHTML 1.1/CSS and use this as the common base from which to convert the template into Mobipocket and ePub with Calibre.

Regards, Alex
AlexBell is offline   Reply With Quote
Advert
Old 08-11-2009, 01:00 AM   #21
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by AlexBell View Post
In fact my long term dream is to be able to design a template in XHTML 1.1/CSS and use this as the common base from which to convert the template into Mobipocket and ePub with Calibre.
I do believe several people here have made similar templates...

I have a question, though. If you'll only be using Calibre for conversion, why not modify both (X)HTML and command-line so they would mesh?

I have something very similar to the following for my template:
Code:
<html>
<head>
  <title>Book Title</title>
  <link rel=stylesheet href="style.css" type="text/css">
</head>

<body>
  <div class="cover">
    <h1 class="booktitle">Book Title</h1>
    <h2 class="bookauthor">Author</h2>
    <p>Summary and other information goes here.</p>
  </div>

  <div class="chapter">
    <div class="chapterhead">
      <h1 class="chaptertitle">Chapter One</h1>
    </div>
    <div class="chapterbody">
      <p>The chapter content goes here.</p>
    </div>
  </div>

  <div class="chapter">
    <div class="chapterhead">
      <h1 class="chaptertitle">Chapter Two</h1>
    </div>
    <div class="chapterbody">
      <p>The chapter content goes here.</p>
    </div>
  </div>

</body>
</html>
Then, I just changed the command-line options to the following so it jives well with my source HTML:
Code:
html2epub --level1-toc "//*[@class='chaptertitle']|//*[@class='booktitle']" --chapter "//*[@class='chapter']" --chapter-mark "pagebreak"
Basically, I overrode all the default chapter detection expressions Calibre uses. It's fine for me since I have tight control on how the source is formatted. Note, I didn't even bother putting ID tags in the source HTML. With just the above command-line, Calibre is able to create a TOC that follows my requirements to a T. Yes, I still haven't upgraded my conversion (virtual) machine to the new version, but I rather think ebook-convert uses very similar commands.

From my discussions with Kovid earlier, the TOC and chapter detection work independently of each other. I doubt that has changed.
ilovejedd is offline   Reply With Quote
Old 08-11-2009, 08:07 AM   #22
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 ilovejedd View Post
I do believe several people here have made similar templates...
Thanks for your interest. My template is somewhat similar to yours, and I suppose to those of other people who have designed templates.

Rigthtly or wrongly, though, my (quite limited) experience in website design makes me want to have the HTML and CSS validate against W3C standards.
I firmly believe that ebooks are not print books and need not be bound by the restrictions of print books, but I have difficulty accepting that ebooks are not websites and need not be bound by W3C standards.

Anyway, I think for the moment that I'll take Harry's suggestion and go back to Mobipocket Creator. And I'll look at Sigil for ePub books - or perhaps just use Calibre to convert from prc to epub format.

Thanks again for everyone's help.

Regards, Alex
AlexBell is offline   Reply With Quote
Old 08-11-2009, 08:09 AM   #23
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: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Calibre does a nice job of converting Mobi books to ePub.
HarryT is offline   Reply With Quote
Old 08-11-2009, 08:57 AM   #24
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by AlexBell View Post
Rigthtly or wrongly, though, my (quite limited) experience in website design makes me want to have the HTML and CSS validate against W3C standards.
I firmly believe that ebooks are not print books and need not be bound by the restrictions of print books, but I have difficulty accepting that ebooks are not websites and need not be bound by W3C standards.
The two need not be mutually exclusive. Indeed, doesn't the ePUB standard make use of existing XHTML standards? The template I use (not exactly the above - it's got a doctype declaration, etc), checks with W3C.
ilovejedd is offline   Reply With Quote
Old 08-12-2009, 02:59 AM   #25
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 ilovejedd View Post
The two need not be mutually exclusive. Indeed, doesn't the ePUB standard make use of existing XHTML standards? The template I use (not exactly the above - it's got a doctype declaration, etc), checks with W3C.
Yes, ePub is based on XHTL 1.1, which is why I taught myself to do markup in this format.

Mobipocket however is definitely not compliant to W3C standards in several ways. This morning I ran the book I'm working on based on a valid XHTML 1.1 template through Mobipocket Creator. Although I got the damn TOC working some of the results in the body of the text were very disappointing.

I refuse to dumb down my markup to Mobipocket's idiosyncratic and limited HTML level. So I'll wait until my ECO reader arrives in a few days and concentrate on ePub. Back to the drawing board.

Regards, Alex
AlexBell is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TOC & other questions PatNY Sigil 41 10-02-2010 10:46 AM
TOC issues fading Kindle Formats 13 07-23-2009 07:55 AM
Getting TOC to work? enarchay Sony Reader 11 05-28-2009 05:46 AM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM
toc question zelda_pinwheel IMP 4 01-18-2008 10:49 AM


All times are GMT -4. The time now is 07:25 PM.


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