Mobileread
Please stop adding extra paragraphs??
#1  wjBLqf-_9 12-27-2019, 02:16 PM
In the comments sections of books...

Calibre is doing something that annoys me! :-(

Please give me a setting I can flip to disable this "add an extra blank line for every line break"

When I past four lines of text (*.txt file, not html)

Line 1 = dog
Line 2 = [blank-line]
Line 3 = ran
Line 4 = [blank-line]
Line 5 = home

It always comes out with source code like this
Line 1 = <p>dog</p>
Line 2 = [blank-line] ---> <p style="font-family: 'Segoe UI, sans-serif'; font-size: small"><br></p>
Line 3 = <p>ran</p>
Line 4 = [blank-line] ---> <p style="font-family: 'Segoe UI, sans-serif'; font-size: small"><br></p>
Line 5 = <p>home</p>

Which makes the readable text look like this
Line 1 = dog
Line A = [extra added blank white space]
Line 2 = [blank-line]
Line B = [extra added blank white space]
Line 3 = ran
Line C = [extra added blank white space]
Line 4 = [blank-line]
Line D = [extra added blank white space]
Line 5 = home
Reply 

#2  BetterRed 12-27-2019, 05:10 PM
See post#2 in Unwanted extra spaces in Comment section Ψ³

BR
Reply 

#3  wjBLqf-_9 01-12-2020, 09:05 PM
Quote BetterRed
See post#2 in Unwanted extra spaces in Comment section Ψ³

BR
I did this. I then tested it: adding a fresh new title to the library, and pasting the comments I wanted. Instantly after clicking "okay" to the edit metadata window... the extra lines appeared.

The **only** place I have this problem is in the "Comments" field.

Thoughts?
Reply 

#4  wjBLqf-_9 01-12-2020, 09:27 PM
I posted a manual work around to this behavior new to 4.x

I also posted a template instructions to search/replace with a manual work around
Reply 

#5  kovidgoyal 01-12-2020, 09:56 PM
If you want to insert <br> insteadof <p> press shift+enter instead of Enter
Reply 

#6  un_pogaz 01-15-2020, 08:37 AM
It seems that the QtWebEngine doesn't handle empty paragraphs with only a line break.

1) Written text
2) Code created
3) Rendered
4) Comparison with 3 lines Plain Text

I'm just writing and switching between "Normal View" and "Source HTML".
And is QtWebEngine because this problem appeared in the V4.
This is a third party module, but if any parameter can solve it, Thanks
EmptyPara_1.png EmptyPara_2.png EmptyPara_3.png EmptyPara_4.png 
Reply 

#7  kovidgoyal 01-15-2020, 10:26 AM
Are you saying that <p>a</p><p><br></p><p>b</p> is not preserved, or something else?
Reply 

#8  Quoth 01-15-2020, 02:07 PM
There is a bug. Extra <p></p> are added unless there are NO paragraphs, only <br />, line breaks. Which are not paragraphs. Copy & Paste used to work as expected. Nor import of the meta data automatically from docx document properties. Extra <p></p> are inserted.
Now one has to edit out all the paragraphs using BS and do Shift Return, or edit the HTML and replace all paragraph tags, </p><p></p><p> with <br/> except there are actual carriage returns between each </p> and <p>

If you leave in paragraph tags in the body, they seem to mostly change to adding an extra blank
blah.</p>
<p>Stuff.</p>

becomes

blah.</p>
<p></p>
<p>Stuff.</p>

But this is OK
blah.<br/>
Stuff.<br/>

However it's not the same thing.
Reply 

#9  BetterRed 01-15-2020, 04:07 PM
In pictures:

I type in Normal view

show attachment »

I go into HTML source and see this

show attachment »

I go back to Normal view and I see this

show attachment »

And that's what I see in Book Details

show attachment »

I thought I had 'fixed' this by tweaking L&F Book Details->Text styling

Code
body, td { background-color: transparent;
}
body.horizontal table td.title { white-space: nowrap }
p { margin: 0}
a { text-decoration: none;
}
.comments { margin-top: 0; padding-top: 0; text-indent: 0
}
.comments-heading { font-size: larger; font-weight: bold
}
table.fields { margin-bottom: 0; padding-bottom: 0;
}
table.fields td { vertical-align: top
}
table.fields td.title { font-weight: bold
}
.series_name { font-style: italic
}
/*
The HTML that this stylesheet applies to looks like this:
<snip>
<h3 class="comments-heading">Custom comments column heading</h3>
<div id="_customcolname" class="comments">...</div>
*/
BR
Reply 

#10  kovidgoyal 01-15-2020, 09:52 PM
I cannot replicate that with a default stylesheet in preferences->look & feel->book details. With that pressing enter, shift+enter and enter again to create <p><br></p> renders are two blank lines always, everywhere.
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register