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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-28-2010, 04:55 PM   #1
pedz
Member
pedz began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2010
Device: nook
"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
pedz is offline   Reply With Quote
Old 03-28-2010, 05: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
 
Advertisement
Old 03-28-2010, 07:02 PM   #3
pedz
Member
pedz began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2010
Device: nook
I'm trying mostly to get the w3.org and whatwg.org documents. Here is one: CSS 2.1
pedz is offline   Reply With Quote
Old 03-30-2010, 01:08 PM   #4
pedz
Member
pedz began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2010
Device: nook
Anyone care to help here?
pedz is offline   Reply With Quote
Old 03-30-2010, 02:00 PM   #5
chaley
"chaley", not "charley"
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: 5,927
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
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
Old 03-30-2010, 02:52 PM   #6
pedz
Member
pedz began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Mar 2010
Device: nook
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?
pedz is offline   Reply With Quote
Old 03-30-2010, 02: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: 26,463
Karma: 5383257
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 online now   Reply With Quote
Old 03-30-2010, 03:35 PM   #8
chaley
"chaley", not "charley"
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: 5,927
Karma: 1673776
Join Date: Jan 2010
Location: France
Device: Many android devices
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 07:00 AM. Reason: typo correction
chaley is offline   Reply With Quote
Old 03-30-2010, 10: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: 26,463
Karma: 5383257
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 online now   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
Getting calibre to detect "Prologue" and "Epilogue" for TOC sherman Calibre 2 09-20-2010 03:21 AM
e-Books show in "My Computer" Kindle 3 documents folder tcreek Calibre 1 09-03-2010 11:34 AM
Sub folder in "Personal Documents" CoolDragon iRex 12 04-06-2010 10:26 AM
Guide for you can see correctly the pdfs "comics, images, documents" in ereaders sony computersexperto LRF 2 11-29-2009 07:13 AM
reflowable documents: what does "page" mean? sic Reading and Management 3 02-15-2007 03:44 PM


All times are GMT -4. The time now is 07:44 AM.


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