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-19-2010, 03:02 PM   #1
nusilver
Junior Member
nusilver began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Kindle
Formatting help request!

All, I did a search and didn't find what I needed, so apologies if this question has already been answered.

So my problem is this:

when converting a txt file that I very meticulously formatted, I can keep everything looking the way it's supposed to, except the table of contents, which becomes jumbled together into a paragraph made up of chapter titles and page numbers.

If i change the text justifiction to "left," the table of contents magically displays in the way I want it to (more or less), but the lines of my actual paragraphs don't display properly and look like this:

"All, I did a search and didn't find what I needed,
so
apologies if this question has already been answered."

Is there a way to keep my table of contents displaying correctly AND keep the text in the actual paragraphs flowing properly?

That's my main problem. I'm converting to mobi to read on a kindle, by the way.

If anyone can also tell me how to create a link from a chapter title in the table of contents to the appropriate chapter in the book, I'd really appreciate that as well, but it's not as important.
nusilver is offline   Reply With Quote
Old 10-19-2010, 03:50 PM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
I don't understand... Text files don't support links or page numbers or anything, so, out ouf curiosity, what exactly does that TOC contain?
As for recreating it in Calibre, if you combine preprocessing the source and some XPath magic in the structure detection setting, you should be able to get Calibre to create a metadata TOC.
Manichean is offline   Reply With Quote
Advert
Old 10-19-2010, 04:14 PM   #3
nusilver
Junior Member
nusilver began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by Manichean View Post
I don't understand... Text files don't support links or page numbers or anything, so, out ouf curiosity, what exactly does that TOC contain?
As for recreating it in Calibre, if you combine preprocessing the source and some XPath magic in the structure detection setting, you should be able to get Calibre to create a metadata TOC.
Well, I have no experience with XPath (and every time I try to use the wizards, I have no idea what to do), so when I say the TOC has chapter titles and page numbers, I mean exactly that. The point is to preserve the table of contents the way it existed on the printed page - the page numbers would be pointless other than for posterity.

As for text files not supporting links or anything, I'm open to converting to something else if it's going to ultimately preserve my formatting by the time it gets to mobi.
nusilver is offline   Reply With Quote
Old 10-19-2010, 04:42 PM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by nusilver View Post
when I say the TOC has chapter titles and page numbers, I mean exactly that. The point is to preserve the table of contents the way it existed on the printed page - the page numbers would be pointless other than for posterity.
Text files have two ordinary forms - one in which each paragraph is followed by one or more returns, and one in which every 80 characters or so (the width of a page) has a return. Which is yours?

If it's the latter, then there's no good way for Calibre or any other converter to tell the difference between a TOC, where you want a return on each line and regular text, where you don't. Usually, some search and replacing will solve the problem in a text editor.
Starson17 is offline   Reply With Quote
Old 10-19-2010, 06:05 PM   #5
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by nusilver View Post
Well, I have no experience with XPath (and every time I try to use the wizards, I have no idea what to do), so when I say the TOC has chapter titles and page numbers, I mean exactly that. The point is to preserve the table of contents the way it existed on the printed page - the page numbers would be pointless other than for posterity.
That last point is what I don't understand. Doesn't that make the whole TOC kind of pointless?
As for the XPath, you open the wizard, identify what a chapter heading looks like and create the appropriate XPath expression to describe it. Unfortunately, I can't help you any more than linking to this, because I've never used XPath myself.
Manichean is offline   Reply With Quote
Advert
Old 10-19-2010, 08:01 PM   #6
Jabby
Jr. - Junior Member
Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.Jabby ought to be getting tired of karma fortunes by now.
 
Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
Quote:
Originally Posted by nusilver View Post
That's my main problem. I'm converting to mobi to read on a kindle, by the way.

If anyone can also tell me how to create a link from a chapter title in the table of contents to the appropriate chapter in the book, I'd really appreciate that as well, but it's not as important.
I had somewhat the same problem. I ended up setting up the following work flow:

Import my files into Open Office. Setting up my headings that I wanted to index and not worrying about page breaks. Save the resultant file as an ODT (Open Office file ext).

Add the above file to your Calibre library and convert the file to an epub.

Read your epub into into Sigil and set up your TOC and page breaks.

Take your edited epub back into Calibre and convert into mobi.

This sounds a lot harder than it is and it work. Although, I would find a small text file to practice on since things don't always work the way we expect.

Hope this helps.

Regards - John
Jabby is offline   Reply With Quote
Old 10-21-2010, 04:02 PM   #7
nusilver
Junior Member
nusilver began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Kindle
Quote:
Originally Posted by Jabby View Post
I had somewhat the same problem. I ended up setting up the following work flow:

Import my files into Open Office. Setting up my headings that I wanted to index and not worrying about page breaks. Save the resultant file as an ODT (Open Office file ext).

Add the above file to your Calibre library and convert the file to an epub.

Read your epub into into Sigil and set up your TOC and page breaks.

Take your edited epub back into Calibre and convert into mobi.

This sounds a lot harder than it is and it work. Although, I would find a small text file to practice on since things don't always work the way we expect.

Hope this helps.

Regards - John
Thanks for your responses, everyone! Jabby, your workflow sounds promising and I'll give it a shot. As it turns out, I discovered Houghton Mifflin is planning on publishing this particular book in ebook format later this year, so other than the fact that I will have to pay again for a book I already own, I may just wait and buy it if Jabby's workflow doesn't get things done for me.
nusilver is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[KOBO] Strip existing formatting to apply my own default formatting to all books digital_steve Calibre 2 08-10-2010 06:34 PM
Feature request for formatting text speakingtohe Calibre 0 08-06-2010 11:17 PM
Calibre and FORMATTING how to stop it altering my formatting? nerys Calibre 37 07-23-2010 02:35 AM
Calibre and FORMATTING how to stop it altering my formatting? nerys Calibre 0 02-28-2010 04:51 PM
line formatting formatting question daesdaemar Workshop 9 02-06-2009 11:47 AM


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


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