08-12-2010, 11:04 AM | #1 |
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"
|
What is the double space trick?
I am trying to find a way to create documents for my own use (better known as notes). I need to convert these to EPUB and MOBI to read on ereaders. I have tried Notepad, Wordpad and Open Office and always the same problem.
Using Open Office I was able to save the created text file with CR+LF. CR, and LF as paragraph terminators. CR+LF double spaces and with CR or LF every thing runs all together. I created a file in Notepad and opened it up in Sigil. I manually removed the line terminator and replaced it. A return (enter key) by itself gives a double space and a shift+return gives a single space. This is a poor work-around and brings other problems. Back in the "good old days" text editors allowed you to display and find/replace special characters (ascii control codes). Since this is no longer the case, I'm flying blind and have no idea what is going on. Any ideas? Thanks - John |
08-12-2010, 11:14 AM | #2 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Notepad is a text editor, Sigil is an EPUB editor. EPUB is basically HTML, and HTML ignores spaces and other formatting outside of tags. I'm not totally sure what your question is, but have you tried just saving your text file from Notepad in Calibre and converting to whatever format your reader uses?
|
Advert | |
|
08-12-2010, 11:48 AM | #3 | |
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:
The problem is: Every line termination gives me a double space. This is fine for paragraph separation but not for bullet lines. Sorry for lack of clarity - John |
|
08-12-2010, 11:54 AM | #4 |
Grand Sorcerer
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Have you tried typing directly into sigil instead of notepad?
I did that and got the following, which does not double-space bulleted lists. |
08-12-2010, 11:55 AM | #5 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
By "double space" are you talking about spaces between words or CR/LF producing spacing between lines? I now suspect it's the latter, which was confusing the heck out of me.
|
Advert | |
|
08-12-2010, 12:05 PM | #6 |
Wizard
Posts: 2,743
Karma: 32912427
Join Date: Feb 2008
Location: North Yorkshire, UK
Device: Kobo H20, Pixel 2, Samsung Chromebook Plus
|
You're referring to double-spaced rows rather than double spaces in the text. What's happening is that each new line is getting wrapped up in a paragraph tag in the underlying HTML, and eReaders and web browsers typically leave space equivalent to a blank row at the end of a paragraph.
When you delete the terminator and replace with shift-return you are entering a break tag in the HTML (<br>), which is typically displayed as breaking the text onto the next line without a blank row in between. I've not used Sigil, but your problem lies in the fact that your source documents either have no formatting (Notepad) or have your bullet points formatted as normal lines, so there's nothing for Sigil to recognise as requiring a break character. A better solution would presumably be to use a source format that was able to save your bullet points using formatting that Sigil would recognise. Someone who knows Sigil will need to step in here, but if Sigil can import HTML, could you save as HTML from Open Office? Graham |
08-12-2010, 01:42 PM | #7 | |
Well trained by Cats
Posts: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
http://www.w3.org/TR/1999/REC-html40...uct/lists.html <ul> <li> Item <li> nother Item. </ul> Sigil can do this for new stuff, I am not sure if it can easily do it for existing text, but switching to CV and editing thre tag aroound each item should be fairly easy.http://www.w3.org/TR/1999/REC-html40...uct/lists.html |
|
08-12-2010, 03:22 PM | #8 |
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"
|
Thanks all!
I found out that Wordpad (.RTF) will treat the Shift+Enter as a single line feed as does Sigil. So, I can create the note in Wordpad and let Calibre add it to it's base an then convert it to whatever. The output of this arrangement looks fine in both EPUB (Nook) and MOBI (DXG). Again, thanks to all - John |
08-13-2010, 03:30 AM | #9 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
I think text added to calibre then converted would have worked fine if you had selected the proper options under text input during conversion. RTF in Wordpad is a nicer solution. |
|
08-29-2010, 11:49 AM | #10 | |
Enthusiast
Posts: 32
Karma: 44
Join Date: Jul 2010
Location: Seneca, SC
Device: Kindle, eReader
|
Quote:
I have a text file I created in Notepad++. It is a series of paragraphs that start with a tab character and end with a CRLF. I can see these if I tell the editor to 'show all characters'. When I convert this otherwise plain-text file to either mobi or epub, I lose the paragraph breaks. All three paragraphs in my simple test file end up as one big paragraph. My input file looks like this: title(cr)(lf) author(cr)(lf) (cr)(lf) (cr)(lf) (tab)A paragraph of text containing several sentences.(cr)(lf) (tab)A paragraph of text containing several sentences.(cr)(lf) (tab)A paragraph of text containing several sentences.(cr)(lf) (cr)(lf) (cr)(lf) The output looks like this: author title A paragraph of text containing several sentences. A paragraph of text containing several sentences. A paragraph of text containing several sentences. So what are the proper options under text input during conversions that will preserve the paragraphs? BTW, I don't remember having this problem earlier. I have 0.7.16 now and I seem to remember being able to do this at one time with little or no messing about. Maybe that's not right, but I think it is. Thanks. |
|
08-29-2010, 12:31 PM | #11 | |||||
Handy Elephant
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
|
You have two basic options.
1. Calibre can treat blank lines as paragraph separators. Quote:
Quote:
Quote:
Quote:
I suggest that you use the first option. Don't treat each line as a paragraph. Use your text editor as a wordprocessor. Insert a blank line where you want a paragraph break. Let the editor and Calibre handle the linewrapping. For this to work as you like your input should look like this: Quote:
Last edited by Adoby; 08-29-2010 at 12:42 PM. |
|||||
08-29-2010, 01:36 PM | #12 |
Enthusiast
Posts: 32
Karma: 44
Join Date: Jul 2010
Location: Seneca, SC
Device: Kindle, eReader
|
Thanks for your thoughts.
I can't find any combination of "Treat each line as a paragraph" in TXT Input or "Remove spacing between paragraphs" in Look & Feel that will do what your #2 example above shows. All combinations of those yield what is essentially one paragraph. In the online user manual under Conversion, there is a section on Paragraph spacing. It describes the actions as I think you and I understand them. But the last sentence of that section is: "The one exception is when the input file uses hard line breaks to implement inter-paragraph spacing." I don't know what Calibre considers a 'hard line break'; I even tried changing the (cr)(lf) ends to just (lf) but it made no difference. Since that is the last sentence, there is no further explanation of what happens. What does follow is a description of how to use CSS and a source XHTML file to get irregular paragraph spacing. More searching in the forum reveals several more threads on this topic. My impression is that going from plain-text to what I want probably isn't possible. txt to rtf to epub / mobi looks a bit more promising. I opened my original txt file with Windows WordPad and saved it as rtf. Then I used Calibre to convert the rtf to mobi and got nearly what I was looking for. If I used Calibre to convert to rtf and then that to epub / mobi I did not get what I wanted. Interesting. My interest in this stems from the fact that there are a _lot_ of ebooks floating around that are horribly formatted. Somewhere there must be an automated tool of some sort that is really bad. IMO. I think a nice clean document to read is worth a few minutes in the editor(s). I realize Calibre is not an editor, but still a great tool. |
08-29-2010, 02:24 PM | #13 | |
Grand Sorcerer
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
I tried the attached file, running calibre 0.7.16 on Win7 pro, which as far as I can tell is what you started with. It converts as expected. Settings: Look & Feel: no boxes checked. Structure detection: no boxes checked Text input: Only Treat each line as paragraph checked. What are you doing that is different? Note that if you check 'Preprocess input to possibly improve structure detection', and if your single lines do not end in punctuation, then the sentences will be combined. This checkbox working on txt files is new in 0.7.16. Could that be your problem? |
|
08-29-2010, 02:58 PM | #14 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Another point to be careful of is that if a particular file has been converted earlier the previous settings from the last conversion will be re-used. If you want to revert to using the defaults you need to check the box on the conversion dialog that activates that.
|
08-29-2010, 03:18 PM | #15 | |
Handy Elephant
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
|
Quote:
What I posted for #2 was the actual output after conversion to epup. I enclose the actual text-file and the resulting epub I get. The only option I have activated for TXT input is the one I mentioned, "Treat each line as a paragraph" in Preferences | Conversion | TXT Input. I use no other special settings or options at all to influense the conversion. And I get the same results as chaley. What result do you get when you try to convert my text-file? Could you post an actual text-file, preferably a short sample, that you are unable to convert in a sensible way? Perhaps you mix more than one paragraph formatting style? Last edited by Adoby; 08-29-2010 at 03:27 PM. |
|
Tags |
double space |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cool Trick | FrankKau | Kobo Reader | 5 | 06-25-2010 01:42 AM |
Cool trick I found | el.astrologo | Sony Reader | 14 | 04-09-2009 04:39 PM |
Is there a trick to PDF conversion? | j_dunn | Calibre | 3 | 03-02-2009 11:31 PM |
Charger Trick | junellen | Sony Reader | 9 | 02-18-2009 02:51 PM |
Dual Sim Trick? | jexxi | Lounge | 1 | 06-16-2008 10:53 AM |