Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-19-2016, 03:41 PM   #1
barryem
Wizard
barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.
 
barryem's Avatar
 
Posts: 2,459
Karma: 68781975
Join Date: Oct 2012
Location: Arkansas
Device: Paperwhite 4
Creating a TOC in Calibre

I've found a variety of ways to create a TOC, automatically for most books, but some have none of the requirements and I have to create them manually. That's working okay except that I don't know how to make each chapter start on a new page.

I've tried inserting <br> at that point but nothing happens. I've tried referencing a different class in the CSS but again, nothing happens. I'm beginning to suspect I don't know what I'm doing.

I have a background in programming but I'm long retired and I've never dealt with CSS and only a little with HTML. I retired over 20 years ago. At this time of my life I don't really want to learn a new language. So can anyone tell me a simple way to do it?

I realize I'm going to get some "Learn CSS" and "Learn HTML" answers and I agree that I should but learning comes hard these days and I'm not going to.

Any suggestions will be appreciated, including the ones I mentioned above.

Thanks,
Barry
barryem is offline   Reply With Quote
Old 03-19-2016, 03:55 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Moderator Notice
I moved this, because I think Editing is the best solution.


ways (for EPUB)
a)You can use the editor (preview screen) to split chapters (into pieces)

b)CSS: page-break-before: always in the chapter title block style

AZW3 (output) might honor these if you use Publishers styles on your device

There are Cheatsheets for both CSS2 and HTML out there.
They are handy, but not a substitute for knowledge
theducks is offline   Reply With Quote
Advert
Old 03-19-2016, 05:48 PM   #3
barryem
Wizard
barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.
 
barryem's Avatar
 
Posts: 2,459
Karma: 68781975
Join Date: Oct 2012
Location: Arkansas
Device: Paperwhite 4
Thanks for this. I realize I am asking you to do my homework, at least a bit. Learning new stuff is difficult these days. You'll understand that in time, with a bit of luck.

My real concern is with epub. Some things don't convert well to mobi or azw3 but most do. Lately I'm reading epub on my phone most of the time though.

In CSS how do I know which is the chapter block style? I did try changing references to different CSS styles but that didn't seem to affect anything at all. However those changes were made in the book. I didn't try changing anything in the CSS.

Barry
barryem is offline   Reply With Quote
Old 03-19-2016, 06:40 PM   #4
barryem
Wizard
barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.barryem ought to be getting tired of karma fortunes by now.
 
barryem's Avatar
 
Posts: 2,459
Karma: 68781975
Join Date: Oct 2012
Location: Arkansas
Device: Paperwhite 4
I just tried converting to DOCX and changing it in Libre Office and then converting back. That seems to work, at least so far. When I read the book I'll watch for problems but on a quick look it seems just fine.

Barry
barryem is offline   Reply With Quote
Old 03-19-2016, 06:56 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by barryem View Post
Thanks for this. I realize I am asking you to do my homework, at least a bit. Learning new stuff is difficult these days. You'll understand that in time, with a bit of luck.

My real concern is with epub. Some things don't convert well to mobi or azw3 but most do. Lately I'm reading epub on my phone most of the time though.

In CSS how do I know which is the chapter block style? I did try changing references to different CSS styles but that didn't seem to affect anything at all. However those changes were made in the book. I didn't try changing anything in the CSS.

Barry
Reverse Engineer it Look at the code
(this is from a Project Gutenberg book)

Code:
<h2 id="pgepubid00004"><a id="Chapter_I"></a><a id="Page_5"></a>Chapter I</h2>
  <h3 id="pgepubid00005">PERFUMED PLANET</h3>
In this case there is no class=

So we will apply it to (ALL) H2 instead in the CSS


Code:
h1, h2, h3, h4, h5, h6 {
    text-align: center;
    /* all headings centered */
    clear: both;
page-break-before: always;
}
As you can imagine, applying to every H2 might be sub optimal
in many case there would be a class="<something>" associated with those particular H2
so you would find
.<something> {
or
it might be h2.<something> {
and put it there
theducks is offline   Reply With Quote
Advert
Old 03-19-2016, 09:50 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,512
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Also remember that most people put each chapter into its own (x)html file, and this forces a page break at the start of each chapter.
PeterT is offline   Reply With Quote
Old 03-20-2016, 09:37 AM   #7
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Sometimes if I have as book that is split almost randomly but has fairly consistent tags for each chapter, I'll merge all the files into a single humongous file and use the main editor [Split as multiple locations] using an XPath to end up with mostly separate chapter files. Always requires some fine tuning and ad hoc merging

But that way each chapter will start on a new page, the file sizes are usually < the 260KB warning, and it's easier to manage
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	270
Size:	133.1 KB
ID:	147210  
phossler is offline   Reply With Quote
Old 03-23-2016, 10:05 AM   #8
Dimsok
Member
Dimsok began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Mar 2016
Location: Russia
Device: PC
When i try to convert docx (or any other format) to fb2, calibre doesn't preserve table on content. Is it normal? I use Calibre 2.0 (XP). In the latest versions it was corrected?
Dimsok is offline   Reply With Quote
Old 03-23-2016, 10:19 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by barryem View Post
I just tried converting to DOCX and changing it in Libre Office and then converting back. That seems to work, at least so far. When I read the book I'll watch for problems but on a quick look it seems just fine.

Barry
That is a terrible way to do what you want to do. If you are using Calibre's eBook editor or Sigil, use the built-in function for splitting HTML files. That's the best way to do it. Then rename the files to something that makes sense. Then all you'll need do from there is fix up the code for the chapter headers (if need be).
JSWolf is offline   Reply With Quote
Old 03-23-2016, 10:21 AM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Reverse Engineer it Look at the code
(this is from a Project Gutenberg book)

Code:
<h2 id="pgepubid00004"><a id="Chapter_I"></a><a id="Page_5"></a>Chapter I</h2>
  <h3 id="pgepubid00005">PERFUMED PLANET</h3>
In this case there is no class=

So we will apply it to (ALL) H2 instead in the CSS


Code:
h1, h2, h3, h4, h5, h6 {
    text-align: center;
    /* all headings centered */
    clear: both;
page-break-before: always;
}
As you can imagine, applying to every H2 might be sub optimal
in many case there would be a class="<something>" associated with those particular H2
so you would find
.<something> {
or
it might be h2.<something> {
and put it there
I have a better way of doing headers.

CSS:
Code:
h2 {
text-align: center;
margin-top: 1em;
margin-bottom: 1em
}
HTML:
Code:
<h2>Chapter 1</h2>
JSWolf is offline   Reply With Quote
Old 03-23-2016, 10:25 AM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,056
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Dimsok View Post
When i try to convert docx (or any other format) to fb2, calibre doesn't preserve table on content. Is it normal? I use Calibre 2.0 (XP). In the latest versions it was corrected?
Have you made any setting changes in
Preferences: Common Options: Table of Contents (sidebar)

These tend to override the native book sources
(mine is blank)
theducks is offline   Reply With Quote
Old 03-23-2016, 01:57 PM   #12
Dimsok
Member
Dimsok began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Mar 2016
Location: Russia
Device: PC
Quote:
Originally Posted by theducks View Post
Have you made any setting changes in
Preferences: Common Options: Table of Contents (sidebar)

These tend to override the native book sources
(mine is blank)
I did try with many tries (with changing settings and don't). All the same - fb2 without toc. Did you try it and get list of content?
Dimsok is offline   Reply With Quote
Old 03-23-2016, 05:31 PM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,725
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Dimsok View Post
When i try to convert docx (or any other format) to fb2, calibre doesn't preserve table on content. Is it normal? I use Calibre 2.0 (XP). In the latest versions it was corrected?
The fact that the ToC is not preserved when converting to FB2 format from other formats, suggests the problem lies in the FB2 Conversion output module (plug-in). I am guessing this was written several years ago.

I suggest you report this at Bugs : calibre, while you're there you might want to peruse other outstanding FB2 Output bugs - tags are on the right.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] calibre not creating content.opf or toc.ncx files during conversion foxxywith2xs Calibre 7 12-16-2012 07:49 PM
Creating a TOC taraboom11 Conversion 2 02-04-2011 02:04 PM
creating a TOC for MOBI pimpoum Kindle Formats 4 01-26-2011 09:37 AM
Creating TOC thibaulthalpern PDF 3 03-27-2010 04:21 PM
Creating TOC for dummies. Anarel Calibre 2 01-26-2010 11:48 PM


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


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