Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-01-2008, 01:12 PM   #136
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yeah cover setting is buggy at the moment as well. Will be fixed in the next release.
kovidgoyal is offline   Reply With Quote
Old 10-01-2008, 01:35 PM   #137
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
3 Things

1) Right now using the --chapter causes a page break and a TOC entry. Can you add a switch that allows us to add that item in the TOC w/o creating a new page break.

2) The right margin is a switch but using it causes the EPUB to fail

3) The text flows over the page number. I know Hadrien ran into this problem with FeedBook.

=X=
=X= is offline   Reply With Quote
Advert
Old 10-01-2008, 01:43 PM   #138
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) --chapter-mark

2) What do you mean by fail

3) The only way to avoid this is presumably by setting the right margin, which is related to 2)
kovidgoyal is offline   Reply With Quote
Old 10-01-2008, 02:39 PM   #139
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by kovidgoyal View Post
1) --chapter-mark
Great I'll try it out.
Can I use both --chapter and --chapter-mark at the same time?
Do I have to include the chapter string in the chapter-mark string?


Quote:
Originally Posted by kovidgoyal View Post
2) What do you mean by fail
It will not build the ePUB, it reports the error and stops running
=X= is offline   Reply With Quote
Old 10-01-2008, 02:49 PM   #140
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Read the help for chapter-mark. What error does it give with right margin?
kovidgoyal is offline   Reply With Quote
Advert
Old 10-01-2008, 03:05 PM   #141
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
1)
Okay I've already ran the tool.
What I was hoping to acomplish is two behaviors when adding an item to a TOC.
- On a chapter detection, add to the TOC and add a page break.
- On a sub section add to the TOC but do not add a page break.

This might seem like a small feature but is extremely helpful when reading technical manuals and reference books where jumping to sections is very common.

2)
The second was my error. I had 3 - "---right-margin=" so I kept on getting an error
=X= is offline   Reply With Quote
Old 10-01-2008, 04:33 PM   #142
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I guess I can add a --toc-from option that if specified will be used to populat the TOC, in which case the chapters will no longer be added to the TOC. Does that satisfy your use case? If so open a ticket for it.
kovidgoyal is offline   Reply With Quote
Old 10-01-2008, 04:43 PM   #143
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by =X= View Post
- On a sub section add to the TOC but do not add a page break.
What you need in this case is a multi-level TOC. The sub-section element (no page-break) should be included in the section (page-break) in the TOC.
Hadrien is offline   Reply With Quote
Old 10-01-2008, 04:50 PM   #144
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Hadrien View Post
What you need in this case is a multi-level TOC. The sub-section element (no page-break) should be included in the section (page-break) in the TOC.
html2epub supports generating multilevel TOCs from links in html files. So if the top level file links to file1 and file2, any links in file1 and file2 will be added to the entries for file1 and file2 in the top level TOC
kovidgoyal is offline   Reply With Quote
Old 10-01-2008, 05:55 PM   #145
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,263
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by kovidgoyal View Post
html2epub supports generating multilevel TOCs from links in html files. So if the top level file links to file1 and file2, any links in file1 and file2 will be added to the entries for file1 and file2 in the top level TOC
In this case it's different. He needs a multi-level TOC for a single flow, not multiple flow.
Hadrien is offline   Reply With Quote
Old 10-01-2008, 07:16 PM   #146
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by Hadrien View Post
In this case it's different. He needs a multi-level TOC for a single flow, not multiple flow.
Exactly

Quote:
Originally Posted by kovidgoyal View Post
I guess I can add a --toc-from option that if specified will be used to populat the TOC, in which case the chapters will no longer be added to the TOC. Does that satisfy your use case? If so open a ticket for it.
Hadrien solution below is the best solution, if that is too complicated for the design here is what would work. It's what he does for the FeedBooks books and those TOC flow very nice.

If that is too complicated this is really all I need

There are 2 solutions:
1) Evertying works as is today except you add a --page-break=(Reg Exp | XPath)

This way on creation of an ePUB the user defines when the page break occurs not the chapter detection.


2) Add a flag --include-in-TOC have it use the same syntax as --chapter (ie regular expressions and XPath)

The --chapter switch works as is, but the --include-in-TOC just inserts the link into the TOC w/o a page break.
=X= is offline   Reply With Quote
Old 10-01-2008, 08:53 PM   #147
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The only way you can have a hierarchical TOC from a single HTML file would be to create it manually in an NCX file. I can then add an option --from-ncx which will load the TOC from the NCX file. NCX is just a simple XML file that defines a TOC. For examples look at the contents of the EPUB files created by html2epub.

Note that currently if you create an OPF file that has a reference to a TOC and pass that to html2epub, html2epub will use the TOC.
kovidgoyal is offline   Reply With Quote
Old 10-01-2008, 11:12 PM   #148
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by kovidgoyal View Post
The only way you can have a hierarchical TOC from a single HTML file would be to create it manually in an NCX file. I can then add an option --from-ncx which will load the TOC from the NCX file. NCX is just a simple XML file that defines a TOC. For examples look at the contents of the EPUB files created by html2epub.

Note that currently if you create an OPF file that has a reference to a TOC and pass that to html2epub, html2epub will use the TOC.
I like the NCX solution. How hard would it be to have a --page-break option (option 1)?

=X=
=X= is offline   Reply With Quote
Old 10-02-2008, 04:05 AM   #149
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: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
How about a --level1-toc and --level2-toc options? Each taking an XPath expression. This will allow you to easily create a 2 level hierarchical toc. The idea being that every level2 item will be added to the most recent previous level1 item. For more complex TOC there will be a --use-ncx option.
kovidgoyal is offline   Reply With Quote
Old 10-02-2008, 10:18 AM   #150
=X=
Wizard
=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.=X= ought to be getting tired of karma fortunes by now.
 
=X='s Avatar
 
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
Quote:
Originally Posted by kovidgoyal View Post
How about a --level1-toc and --level2-toc options? Each taking an XPath expression. This will allow you to easily create a 2 level hierarchical toc. The idea being that every level2 item will be added to the most recent previous level1 item. For more complex TOC there will be a --use-ncx option.
That would be Awesome! That is exactly what I was hoping for.

Okay level2 is straight forward. But I see level1 having a special case.
1) If no substile is found work as it does today and jump to the book location
2) If subtitle is found create a sub menu and insert itself in the ordinal location 0 and all following subtitles at ordinal 1+

=X=
=X= is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Epub Output: Line Height greenapple Conversion 20 01-27-2013 09:27 AM
EPUB output justification toki08 Calibre 10 01-08-2011 04:14 PM
Calibre epub output details and Nook squidward Calibre 6 11-24-2010 03:21 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM
Problem with epub output in Cybook Gen3 fjf Calibre 3 02-03-2010 02:23 AM


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


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