![]() |
#1 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Kindle
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Jr. - Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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 |
|
![]() |
![]() |
![]() |
#7 | |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2010
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |