11-02-2010, 09:32 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2010
Device: iphone
|
Is there any way to remove space between paragraphs?
I have text and lit files that always come out with spaces between paragraphs instead of indentations.
The option to remove the space and add indentations in Calibre is useless. It never affects the formatting in any way. I have seen this question asked several times before but I have never read a clear answer. Is the answer simply no? There is no possible way Calibre could ever remove spaces between paragraphs and add indentations instead? Am I foolish to ask for such an unreasonable thing as this? It's really frustrating that I can't find an answer to this anywhere on the internet. |
11-02-2010, 09:58 PM | #2 |
Wizard
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
The options work pretty flawlessly unless you have non standard formatted files.
For lit files if the options won't work I convert to rtf and then change all the line feeds to paragraph breaks. ^l to ^p works in word. For txt try assume print formatting and/or preprocess input Helen |
Advert | |
|
11-02-2010, 10:44 PM | #3 | |
quantum mechanic
Posts: 705
Karma: 483827
Join Date: Aug 2010
Location: NorCal
Device: Nook1, Samsung Transform, Nook2
|
Quote:
In notepad++ (or any text editor that supports regex, with minor syntax mods) for instance, I would convert all linefeeds (\r\n usually) to some obscure character string that doesn't appear in your file (say, ###) using the extended mode search and replace. Note: if you have a multiline regex tool (I'm too lazy to use mine and npp is just too convenient in other ways) you could search for the double linefeeds directly and replace them with paragraph breaks and indents. Then, using its native regex, search for something like ######([^#]+)###### (since there will be 2 linefeeds between paragraphs - and you don't want that) and replace it with ###\t\1###. Then back to extended mode and replace all ### with \r\n. This is probably overkill for what you're asking but I think it's useful for other (similar) functions like wrapping <p> tags around paragraphs and other html manipulations. Cleaned up a bunch of OCR'd stuff last weekend using notepad++ . By the way, I've noticed that the result is always more WYSIWYG if you focus your attention on a simply coded (clean that is) html file and then use that as the master format for converting to anything else (adding an html file to a book record saves it as zip). TOC creation and chapter creation is also much more transparent this way . |
|
11-02-2010, 10:58 PM | #4 | ||
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Also text files for input require you to select the proper input for your file. Text files should be straight forward without spaces between paragraphs if that is what you want. Quote:
If you want to add a indent and have spaces between paragraphs then also select insert blank line as an option. If you want to retain the initial formatting then don't select either of those options. |
||
11-03-2010, 12:39 AM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Nov 2010
Device: iphone
|
Hmmm.
I don't know what the lit file uses as it's encoded so the raw text version is gobbledygook. I just know Calibre insists on putting blank lines between each paragraph and will not indent them. The text file uses a return character to end each paragraph. So there's no Calibre option that will read return characters and interpret them as new paragraphs? I have to use some external editor to replace the characters? Seems like a simple option that should be included since so many files use this convention. |
Advert | |
|
11-03-2010, 01:38 AM | #6 | |
US Navy, Retired
Posts: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Have you tried any of the various Input Options for text input? I'm guessing you need Treat each line as a paragraph option checked. I would suggest reading the ebook conversion section of the manual. |
|
11-03-2010, 08:32 AM | #7 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Many lit files have a blank line hard-coded in between every paragraph. The option under look and feel to remove spaces between paragraphs does work, but this feature only works on the CSS, not on the actual html content.
If you want it to remove blank lines from the actual html, enable both 'remove blank lines' under Look and Feel, and also enable "preprocess input file" under structure detection. The preprocess option does actually manipulate HTML, and it checks to see if the look and feel option is enabled. If it is, it deletes hard-coded blank lines when they're inserted between every paragraph. This should also work for text with whatever settings you're using, but there are other ways to fix text conversion using the text input options. This method isn't always guaranteed to work, but it should cover the most common cases. Last edited by ldolse; 11-03-2010 at 08:35 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't get calibre to *not* put space between paragraphs | lunixer | Calibre | 8 | 09-11-2010 10:23 PM |
remove space between paragraphs-yes the box is checked | Blurr | Calibre | 1 | 12-23-2009 06:34 AM |
Remove spacing between paragraphs - what about div tags ? | NASCARaddicted | Calibre | 5 | 11-07-2009 05:47 AM |
Unwanted space between paragraphs | superanima | Calibre | 3 | 10-14-2009 02:28 PM |
Remove spacing between paragraphs doesn't. | Djehuty | Calibre | 6 | 04-28-2009 04:53 AM |