Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-28-2010, 03:55 PM   #1
pedz
Nameless Being
 
"metadata" (toc) in HTML documents

The documents I am trying to make into epub format have a nice TOC in them. Can I tell calibre (or ebook-convert in particular) to just use that TOC?

Thank you,
Perry
  Reply With Quote
Old 03-28-2010, 04:04 PM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by pedz View Post
The documents I am trying to make into epub format have a nice TOC in them. Can I tell calibre (or ebook-convert in particular) to just use that TOC?

Thank you,
Perry
My wife makes documents for her organization in Microsoft Word. She marks the chapters with Heading1 format, tells Word to make a TOC, saves it out as HTML filtered and drags it into Calibre. Calibre makes a beautiful EPUB TOC that's identical. Your question would be easier to answer if you said something about your source document.
Starson17 is offline   Reply With Quote
Advert
Old 03-28-2010, 06:02 PM   #3
pedz
Nameless Being
 
I'm trying mostly to get the w3.org and whatwg.org documents. Here is one: CSS 2.1
  Reply With Quote
Old 03-30-2010, 12:08 PM   #4
pedz
Nameless Being
 
Anyone care to help here?
  Reply With Quote
Old 03-30-2010, 01:00 PM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
I just did it by:
  1. downloading the zip version of the document and unzipping it to a temp folder
  2. adding cover.html in that folder to calibre
  3. starting a convert to epub of the ebook resulting from #2
  4. setting table of contents level 1 detection to //h:h1
  5. letting the convert run
I got a nice epub with a level 1 toc. If you also want level two, put //h:h2 into the table of contents level 2 detection box.
chaley is offline   Reply With Quote
Advert
Old 03-30-2010, 01:52 PM   #6
pedz
Nameless Being
 
That wasn't my original question. My question is how do I specify a TOC to use -- not how calibre can find the toc entries. Someone asked me for an example (which didn't make sense to me at the time).

So... to repeat, how do I tell calibre what to use for the TOC? i.e. how do I give it a list of TOC entries?
  Reply With Quote
Old 03-30-2010, 01:53 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,867
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Write an opf+ncx file use the automatically generated ones as a base

or stick special class attributes on all the elements you want in the toc in the source html files and use the toc autodetection options
kovidgoyal is offline   Reply With Quote
Old 03-30-2010, 02:35 PM   #8
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
or stick special class attributes on all the elements you want in the toc in the source html files and use the toc autodetection options
The html file already uses H? tags. The TOC (which is not actually a TOC, but is a section in the cover page) appears to be automatically generated by finding H? tags and generating a reference to the <a > anchor within the H tag. That is why I thought that doing the same thing (finding the H? tags) would satisfy the need.

Last edited by chaley; 03-31-2010 at 06:00 AM. Reason: typo correction
chaley is offline   Reply With Quote
Old 03-30-2010, 09:23 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,867
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by chaley View Post
The html file already uses H? tags. The TOC (which not actually a TOC, but is a section in the cover page) appears to be automatically generated by finding H? tags and generating a reference the the <a > anchor within the H tag. That is why I thought that doing the same thing (finding the H? tags) would satisfy the need.
It should. calibre can also create a TOC from <a href> elements, so with a little fone-tuning, the OP could even use the TOC section in the HTML
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting calibre to detect "Prologue" and "Epilogue" for TOC sherman Calibre 2 09-20-2010 02:21 AM
e-Books show in "My Computer" Kindle 3 documents folder tcreek Calibre 1 09-03-2010 10:34 AM
Sub folder in "Personal Documents" CoolDragon iRex 12 04-06-2010 09:26 AM
Guide for you can see correctly the pdfs "comics, images, documents" in ereaders sony computersexperto LRF 2 11-29-2009 06:13 AM
reflowable documents: what does "page" mean? sic Reading and Management 3 02-15-2007 02:44 PM


All times are GMT -4. The time now is 09:49 PM.


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