05-30-2010, 02:45 AM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: May 2010
Device: PRS-300
|
Problem with TXT Input
A lot of the things I read were originally formatted for 80-column monospace displays. I've been playing with the Extra CSS section and trying to tweak things to look right, but looking in the debug directories I discovered a major issue with the design of the TXT input plugin:
The TXT input plugin always removes whitespace from the start of the line, and has no option to leave it there. For many things this doesn't matter, but preformatted TXT files often rely on space at the start of the line for things to look right. I did a quick test, and starting with this source text file: Code:
This test.
is a
a is
test. This
Code:
<p>This test.</p>
<p>is a</p>
<p>a is</p>
<p>test. This</p>
There really needs to be an option for TXT input to not strip leading spaces, so we can have them be included in later steps of conversion. Last edited by Balorn; 05-30-2010 at 07:11 AM. |
05-30-2010, 07:02 AM | #2 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You might try converting to html and convert significant spaces to non breaking spaces and see if that helps. You can use sigil for editing if you are making epubs.
|
Advert | |
|
05-30-2010, 11:07 AM | #3 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
05-30-2010, 11:38 AM | #4 | |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
Code:
<p>This test.</p> <p>is a</p> <p>a is</p> <p>test. This</p> Adding an option to maintain white space exactly is possible but I don't see much point to it because it defeats the purpose of creating a reflowable document. |
|
05-30-2010, 08:09 PM | #5 |
Addict
Posts: 266
Karma: 1378
Join Date: Dec 2009
Location: Seattle / San Carlos, Sonora, Mexico
Device: Kindle & WiFi Nook & PocketBook IQ
|
On a related issue with TXT input, the Conversion Preference "treat each line as a paragraph" does not appear to work. The result was each chapter was a paragraph.
Circumvention: import into Word Processor (StarOffice Writer) and save as RFT. The Calibre conversion from RFT to MOBI was flawless. Calibre 0.6.49 |
Advert | |
|
05-30-2010, 09:20 PM | #6 |
Witless protection Agent
Posts: 290
Karma: 1002898
Join Date: Nov 2009
Location: Los Angeles
Device: Kindle
|
I'm struggling with similar issues.
I took someones advice and I am trying to put simple HTML tags into my .txt file to create .htm/.html. To preserve spacing when I need it I can add PRE and /PRE tags around things that should NOT be flowed. |
05-30-2010, 11:03 PM | #7 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
|
05-31-2010, 08:45 AM | #8 | |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
Pre tags are almost always a bad idea. HTML supports other layout methods such as div and tables. |
|
05-31-2010, 04:14 PM | #9 | |
Addict
Posts: 266
Karma: 1378
Join Date: Dec 2009
Location: Seattle / San Carlos, Sonora, Mexico
Device: Kindle & WiFi Nook & PocketBook IQ
|
Quote:
This was just an FYI. I think in the future I will use a word processor to take TXT to RFT. And then use Calibre to convert RFT to MOBI or ePub |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem converting txt to mobi | toby39 | Calibre | 10 | 09-05-2010 02:16 PM |
DR1000 DR1000 Chinese Vertical Layout TXT plugin install Problem | spuggy | iRex | 0 | 08-28-2010 02:30 PM |
Bulk Convert problem - prefered format input | captpete | Calibre | 4 | 08-24-2010 09:26 AM |
Aluratek Libre Problem with TXT files | indio192 | Ectaco jetBook | 2 | 06-17-2010 01:02 AM |
Non-english characters input problem | Celeblin | Calibre | 3 | 06-28-2009 02:05 PM |