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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 05-12-2018, 05:57 PM   #1
calle
Junior Member
calle began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2018
Device: Letto
Splitting or adding new page in calibre?

I got a problem, I got some epub books that the chapters is wrong, often they are liked from first page to "main-1.xhtml" (Chapter 1), "main-2.xhtml" (Chapter 2), "main-3.xhtml" (Chapter 3) etc. But not all, some does have for exemple main-1 and main-2 only (main-1 and 2 is merged and chapter 3 is on main-2)

Sorry if I am confusing. But is there a way to add a new page so I can copy and paste the text to a separate xhtml-file in the epub editor in calibre, or split the file where the new chapter starts? I like that editor.

I know there is another way, using:
<a href="main-2#chapter4">Chapter 4</a>
and on where it should jump to:
<div id="chapter4">Chapter 4</div>
But it does not always look right.
calle is offline   Reply With Quote
Old 05-12-2018, 07:57 PM   #2
retiredbiker
Enthusiast
retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.retiredbiker is faster than slow light.
 
retiredbiker's Avatar
 
Posts: 49
Karma: 29896
Join Date: May 2013
Device: Kindle KB, Oasis, Ubuntu, Jutoh
The easiest way I find for sorting out chapters is to arrange the files so that each chapter heading is at the top of a file. Then Use the Edit TOC tool, erase any existing entries, and use the Generate ToC from Files option. That will give you an NCX TOC with each file as an entry, and the beginning text of each file as the title text (Chapter 1, Chapter 2, etc., if that is what your first lines are in the files.)

To split files with the editor, use the blue split-file tool at the bottom of the preview pane.

To merge files, select two or more files in the file browser panel, and right-click. One of your choices will be to merge the files.

Sometimes, the start of a chapter will not split properly because it is buried in a paragraph or a useless <div> -- you just have to edit the code to fix that before you can do the split.

You can often find chapter heading that are not with obvious with regex searches. I've seen a lot of books with just 1, 2, 3, etc. that have no style different from the main text, and they are hard to spot. A regex search something like <p class="whatever">\d+ (or even just >\d+) will often make finding them easier.
retiredbiker is offline   Reply With Quote
Old 05-13-2018, 01:56 AM   #3
deback
Book E d i t o r
deback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the enddeback knows the complete value of PI to the end
 
Posts: 285
Karma: 31930
Join Date: May 2015
Device: Laptop
If you name your chapter class as "chapter" for all the chapters and then convert the ePub file, the conversion will create separate html files for each chapter. Sometimes, I will merge all the html files for the chapters into one html file and then convert the ePub. The resulting ePub will have all new, separate html files for each chapter.

Yes, you an create a new page (html file) by choosing File -> New File from the top menu (or hit CTRL-F5 and enter a filename). Then be sure to copy the html codes from the top, including the lines for the .css files, and down to the <body> line from the other file to the new file.
deback is offline   Reply With Quote
Old 05-13-2018, 04:41 AM   #4
calle
Junior Member
calle began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2018
Device: Letto
Thank you for helping me. I will try both and see whats best.

Sadly did I convert all files to epub and my computer crashed so I lost all things, I only made backup on the epub-files.
calle is offline   Reply With Quote
Old 05-14-2018, 07:09 AM   #5
calle
Junior Member
calle began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2018
Device: Letto
Oh, how easy, just split with the blue splitting icon under the preview, I did try it but I didn't understand I had to klick on the preview page where to split. That was easy. Thank you both again.
calle 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
Splitting dual page? loviedovie KOReader 1 10-24-2017 04:08 PM
Splitting double page pdf to one page martienne Workshop 4 12-31-2015 04:51 PM
Page breaks and file splitting 1v4n0 ePub 10 11-22-2013 05:13 PM
Stop Calibre from adding page margins? Jane12 Conversion 10 05-18-2012 01:45 PM
Double page splitting ? mazzeltjes LRF 0 01-16-2009 06:35 PM


All times are GMT -4. The time now is 06:50 PM.


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