Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-30-2020, 07:01 PM   #1
amckenzie4
Junior Member
amckenzie4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: Kindle
Importing HTML files with the wrong chapter order

Hey folks. I've just created a few books out of HTML files, and the chapters come out in the wrong order. What I wind up with is a MOBI or EPUB book where the first page is the ToC I created, but the chapters are out of order. If I delete the MOBI/EPUB version and reconvert, the chapters still won't be in order, but they may be in a different order from the first time I tried. Fascinatingly, the ToC links work correctly.

Here's my process:

1) Create the individual HTML files, with no internal links.
2) Create a table of contents file called index.html, with links to the chapters in order. Something like

Code:
<html>
<body>
<a href="Chapter One.html">Chapter 1</a></br>
<a href="Chapter Two.html">Chapter 2</a></br>
...etc
</body>
</html>
3) Confirm I've actually spelled everything right and that the index.html file works correctly in a browser.
4) In Calibre, use the "Add Books" button to add the book by selecting the index.html file.
5) Use the "Convert Books" button to convert to Mobi.

I get the same result when converting to ePub. My current workaround is to first convert to ePub, use the book editing tool to manually arrange the chapters, and then convert to MOBI. it works, but it's really inefficient, and I could swear this used to work the way I expected.

Any advice?
amckenzie4 is offline   Reply With Quote
Old 08-30-2020, 11:00 PM   #2
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: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://manual.calibre-ebook.com/faq...specific-order
kovidgoyal is offline   Reply With Quote
Advert
Old 08-31-2020, 02:00 PM   #3
amckenzie4
Junior Member
amckenzie4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: Kindle
Thanks! Sadly, that's what I've been doing and it doesn't work. (I missed the table of contents line when I was writing the original post, but it is in my index.html files.)
amckenzie4 is offline   Reply With Quote
Old 09-01-2020, 12:07 AM   #4
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: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Did you change the setting from depth first to breadth first?
kovidgoyal is offline   Reply With Quote
Old 09-01-2020, 12:37 PM   #5
amckenzie4
Junior Member
amckenzie4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: Kindle
Yup! Makes no difference, at least as far as chapter order goes.
amckenzie4 is offline   Reply With Quote
Advert
Old 09-01-2020, 01:20 PM   #6
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: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I dont see how that's possible. Attach a minimal example demonstrating the problem.
kovidgoyal is offline   Reply With Quote
Old 09-01-2020, 03:52 PM   #7
amckenzie4
Junior Member
amckenzie4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: Kindle
To be honest, I don't either! Here's the one I've been working on most recently.

Original Files:
https://www.dropbox.com/sh/ach138gre...lng_6UQVa?dl=0

Converted book:
https://www.dropbox.com/sh/ar8ktw4ez...BLwffLMka?dl=0

I'll be interested to see if you have the same problem, or if it's something odd with my system.
amckenzie4 is offline   Reply With Quote
Old 09-01-2020, 04:42 PM   #8
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: 76,474
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What OS are you running? If it's Linux, did you get Calibre from the official site?
JSWolf is online now   Reply With Quote
Old 09-01-2020, 05:02 PM   #9
amckenzie4
Junior Member
amckenzie4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: Kindle
Windows 10 Home, and I did get it from the official site. I'm also running 4.23, which, as far as I know, is the current version.
amckenzie4 is offline   Reply With Quote
Old 09-02-2020, 12:04 AM   #10
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: 44,562
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Your html files wont be recognized as such, start them with <html> tags and you will be fine.
kovidgoyal is offline   Reply With Quote
Old 09-02-2020, 11:46 AM   #11
amckenzie4
Junior Member
amckenzie4 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2020
Device: Kindle
Ah! Thanks, that would do it. Apparently I forgot to update that.

I do find it interesting that the formatting was largely correct, it just couldn't figure out what order to put them in.

Thanks again!
amckenzie4 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
importing html book: wrong import and conversion vangop Library Management 2 10-03-2012 12:18 PM
Importing css in html files shotsky Conversion 6 07-14-2012 06:34 PM
Importing more files from HTML folder. sol_barbez Sigil 2 02-25-2011 11:02 AM
Importing HTML Files Shadowlane Calibre 1 12-19-2009 04:04 PM
Calibre 0.6.15-16 importing html files as zips BKeeper Calibre 2 10-02-2009 04:29 AM


All times are GMT -4. The time now is 02:23 PM.


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