Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-02-2010, 10:32 PM   #1
kabloooie
Junior Member
kabloooie began at the beginning.
 
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.
kabloooie is offline   Reply With Quote
Old 11-02-2010, 10:58 PM   #2
speakingtohe
Wizard
speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.speakingtohe ought to be getting tired of karma fortunes by now.
 
Posts: 4,636
Karma: 25186576
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
speakingtohe is offline   Reply With Quote
Old 11-02-2010, 11:44 PM   #3
thrawn_aj
quantum mechanic
thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.thrawn_aj ought to be getting tired of karma fortunes by now.
 
thrawn_aj's Avatar
 
Posts: 705
Karma: 483827
Join Date: Aug 2010
Location: NorCal
Device: Nook1, Samsung Transform, Nook2
Quote:
Originally Posted by kabloooie View Post
I have text and lit files that always come out with spaces between paragraphs instead of indentations.
There's a regular expression way to do it but I don't know how advanced the regex system in Calibre is or even if it can be co-opted by the user to edit the actual contents of the file.

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 .
thrawn_aj is offline   Reply With Quote
Old 11-02-2010, 11:58 PM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by kabloooie View Post
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.
Remove space and add indent does exactly that for paragraphs. Any formatted paragraph will end up having a indent and no top or bottom margins (space between paragraphs). If your input LIT source uses <br /> to create spaces between paragraphs then you have to manually edit the resultant ebook. I use Sigil.

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:
Originally Posted by kabloooie View Post
There is no possible way Calibre could ever remove spaces between paragraphs and add indentations instead?
If you want to remove spaces and add an indent to paragraphs then select that option.

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.
DoctorOhh is offline   Reply With Quote
Old 11-03-2010, 01:39 AM   #5
kabloooie
Junior Member
kabloooie began at the beginning.
 
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.
kabloooie is offline   Reply With Quote
Old 11-03-2010, 02:38 AM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by kabloooie View Post
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.
Garbage in garbage out. Calibre is simply converting the garbage file, not insisting on putting blanks lines between paragraphs. You can try Preprocess input file under Structure detection during conversion.

Quote:
Originally Posted by kabloooie View Post
The text file uses a return character to end each paragraph.
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.
DoctorOhh is offline   Reply With Quote
Old 11-03-2010, 09:32 AM   #7
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
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 09:35 AM.
ldolse is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 11:23 PM
remove space between paragraphs-yes the box is checked Blurr Calibre 1 12-23-2009 07:34 AM
Remove spacing between paragraphs - what about div tags ? NASCARaddicted Calibre 5 11-07-2009 06:47 AM
Unwanted space between paragraphs superanima Calibre 3 10-14-2009 03:28 PM
Remove spacing between paragraphs doesn't. Djehuty Calibre 6 04-28-2009 05:53 AM


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


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