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 10-03-2009, 04:19 AM   #1
PaulChernoch
Junior Member
PaulChernoch began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2009
Device: Kindle 2
How do I specify TOC pattern?

I am building my book using HTML. Now that I have the hang of the HTML and CSS that the Kindle 2 supports, it's on to the TOC.

This is how I call the conversion program:

ebook-convert "Behold the Dawn.html" .mobi --use-auto-toc --cover=behold-the-dawn-cover.jpg --isbn=978-0-9789246-1-4 --publisher="PenForASword Publishing" --authors="K. M. Weiland" --author-sort="Weiland, K. M." --level1-toc=h1

I want all the h1 bracketed places to be in the TOC. But this only gets me the ones that have the word Chapter in the names.

For example, this gets into the auto TOC:

<h1 height="50"><a name="chapter_I">Chapter I</a></h1>

But this does not get into the TOC:

<h1 height="50"><a name="Glossary">Glossary</a></h1>

So what do I specify for the --level1-toc expression on the command line? Are there other settings I need as well?

(I am using 0.6.13 of Calibre on a Mac OS X 10.5.8.)

- Paul
PaulChernoch is offline   Reply With Quote
Old 10-03-2009, 04:34 AM   #2
PaulChernoch
Junior Member
PaulChernoch began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2009
Device: Kindle 2
RTFM. I found it. All I need to do is set class="chapter" on my h1 elements and it finds them. Works like a charm.

I must say, that after getting past my confusion, the tool is great and the workflow is smooth for edit-build-upload-test. In one night I almost have an entire novel converted. If only MS Word generated better HTML. I had to save it as text and apply all the markup using a combination of Perl script and manually adding back the italics in Dreamweaver.

- Paul
PaulChernoch is offline   Reply With Quote
 
Enthusiast
Old 10-03-2009, 04:49 AM   #3
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,067
Karma: 777825
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
The latest versions of Word have the option to save as "Web Page, Filtered" which seems to produce quite reasonable HTML.
itimpi is offline   Reply With Quote
Old 10-03-2009, 07:11 AM   #4
CapnKirk
Member
CapnKirk is on a distinguished road
 
CapnKirk's Avatar
 
Posts: 18
Karma: 56
Join Date: Sep 2009
Location: Philadelphia, PA
Device: Sony Reader Touch PRS-600
Try OpenOffice

I have not tried this, but you could try OpenOffice Writer. It has an html editing mode similar to MSWord. I know they try to be consistent with standards in general.
CapnKirk is offline   Reply With Quote
Old 10-03-2009, 10:27 AM   #5
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,097
Karma: 5101571
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just to note that calibre supports direct conversion of .odt (the openoffice file format).
kovidgoyal is online now   Reply With Quote
Old 10-10-2009, 01:18 AM   #6
PaulChernoch
Junior Member
PaulChernoch began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Aug 2009
Device: Kindle 2
Quote:
Originally Posted by itimpi View Post
The latest versions of Word have the option to save as "Web Page, Filtered" which seems to produce quite reasonable HTML.
Hmm. I will give it a try when I start my next Kindle project.

- Paul
PaulChernoch 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
header removal fails, even though test identifies the pattern hpep Calibre 2 08-09-2010 12:40 PM
Virus pattern match upon connecting Astak Pocket Pro to my computer Xochipilli2012 Astak EZReader 6 03-04-2010 02:24 AM
Literary Pattern Matching kennyc News 5 12-16-2009 03:12 PM
Problem with TOC Soxendom Calibre 2 10-28-2009 12:12 PM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM


All times are GMT -4. The time now is 09:14 AM.


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