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 12-27-2019, 02:16 PM   #1
wjBLqf-_9
Enthusiast
wjBLqf-_9 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2018
Device: None
Unhappy Please stop adding extra paragraphs??

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

Last edited by wjBLqf-_9; 12-27-2019 at 02:18 PM.
wjBLqf-_9 is offline   Reply With Quote
Old 12-27-2019, 05:10 PM   #2
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,167
Karma: 12807326
Join Date: Mar 2012
Location: Sydney Australia
Device: none
See post#2 in Unwanted extra spaces in Comment section Ψ³

BR
BetterRed is offline   Reply With Quote
Old 01-12-2020, 09:05 PM   #3
wjBLqf-_9
Enthusiast
wjBLqf-_9 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2018
Device: None
Quote:
Originally Posted by BetterRed View Post
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?
wjBLqf-_9 is offline   Reply With Quote
Old 01-12-2020, 09:27 PM   #4
wjBLqf-_9
Enthusiast
wjBLqf-_9 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2018
Device: None
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
wjBLqf-_9 is offline   Reply With Quote
Old 01-12-2020, 09:56 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 35,876
Karma: 12750379
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want to insert <br> insteadof <p> press shift+enter instead of Enter
kovidgoyal is online now   Reply With Quote
Old 01-15-2020, 08:37 AM   #6
un_pogaz
Chalut o/
un_pogaz is on a distinguished road
 
un_pogaz's Avatar
 
Posts: 105
Karma: 50
Join Date: Dec 2017
Device: Kobo
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
Attached Thumbnails
Click image for larger version

Name:	EmptyPara_1.png
Views:	35
Size:	23.0 KB
ID:	176410   Click image for larger version

Name:	EmptyPara_2.png
Views:	35
Size:	9.0 KB
ID:	176411   Click image for larger version

Name:	EmptyPara_3.png
Views:	32
Size:	22.7 KB
ID:	176412   Click image for larger version

Name:	EmptyPara_4.png
Views:	33
Size:	22.8 KB
ID:	176413  
un_pogaz is offline   Reply With Quote
Old 01-15-2020, 10:26 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 35,876
Karma: 12750379
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Are you saying that <p>a</p><p><br></p><p>b</p> is not preserved, or something else?
kovidgoyal is online now   Reply With Quote
Old 01-15-2020, 02:07 PM   #8
FrustratedReader
Ancient Sceptic
FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.FrustratedReader ought to be getting tired of karma fortunes by now.
 
FrustratedReader's Avatar
 
Posts: 1,040
Karma: 6543210
Join Date: Jun 2017
Device: Both Kinds: epub based makes and Kindle
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.
FrustratedReader is offline   Reply With Quote
Old 01-15-2020, 04:07 PM   #9
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,167
Karma: 12807326
Join Date: Mar 2012
Location: Sydney Australia
Device: none
In pictures:

I type in Normal view

Click image for larger version

Name:	Type in Normal view.jpg
Views:	28
Size:	32.7 KB
ID:	176431

I go into HTML source and see this

Click image for larger version

Name:	Look at HTML.jpg
Views:	27
Size:	29.0 KB
ID:	176432

I go back to Normal view and I see this

Click image for larger version

Name:	Go back to Normal view.jpg
Views:	26
Size:	32.4 KB
ID:	176433

And that's what I see in Book Details

Click image for larger version

Name:	Book Details.jpg
Views:	26
Size:	35.3 KB
ID:	176434

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
BetterRed is offline   Reply With Quote
Old 01-15-2020, 09:52 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 35,876
Karma: 12750379
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
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.
kovidgoyal is online now   Reply With Quote
Old 01-15-2020, 11:25 PM   #11
Sirtel
Wizard
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 2,339
Karma: 22038282
Join Date: Jan 2014
Location: Estonia
Device: Kindle Voyage/Oasis 2/Oasis 3/Nook Glowlight Plus 7.8''/Kobo Libra H2O
Quote:
Originally Posted by BetterRed View Post
Spoiler:
In pictures:

I type in Normal view

Attachment 176431

I go into HTML source and see this

Attachment 176432

I go back to Normal view and I see this

Attachment 176433

And that's what I see in Book Details

Attachment 176434

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
I have exactly the same experience.
Sirtel is online now   Reply With Quote
Old 01-15-2020, 11:57 PM   #12
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,167
Karma: 12807326
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
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.
Kovid I didn't press enter, shift+enter after 'line 2'. I pressed enter, enter. Doing that in 3.48 emits this HTML:

Code:
<div>line 1<div>line 2</div><div><br></div><div>line 3</div><div>line 4</div></div>
Which doesn't create the extra blank line in the rendered text.

BR
BetterRed is offline   Reply With Quote
Old 01-16-2020, 12:05 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 35,876
Karma: 12750379
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What is it you are actually trying to do?? If you want to create a blank line, with the default stylesheet just press enter once and start typing the next paragraph. If you want to insert a line-break press shift enter and start typing the next line.

And yes calibre 4 is not going to behave like calibre 3 in this respect as I have explained ad nauseum.
kovidgoyal is online now   Reply With Quote
Old 01-16-2020, 12:28 AM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 35,876
Karma: 12750379
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And this will preserve the inserted <p><br></p> as a single blank line, at the cost of it now looking like: <p style="-qt-paragraph-type:empty"><br></p>

https://github.com/kovidgoyal/calibr...4c2e26c7edfb50
kovidgoyal is online now   Reply With Quote
Old 01-16-2020, 12:42 AM   #15
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,167
Karma: 12807326
Join Date: Mar 2012
Location: Sydney Australia
Device: none
↑ ↑ ↑ ✔ - Thanks

The only suggestion to use shift+enter I can find is this one https://www.mobileread.com/forums/sh...43&postcount=4

I must have missed it. It also got conflated it with the p { margin: 0} solution.

Added : I don't really care what the code looks like - for simple notes etc I rather not have to look at it.

BR

Last edited by BetterRed; 01-16-2020 at 12:45 AM.
BetterRed 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
Adding spaces after images and between paragraphs awcross Sigil 7 06-14-2017 03:47 PM
Stop Sigil from inserting unwanted lines between paragraphs Benasam Sigil 16 05-28-2014 04:16 PM
Adding space between paragraphs Gazella Conversion 5 04-03-2014 05:35 PM
Touch Extra spacing between paragraphs on my e-books Aiden Barnes & Noble NOOK 8 12-11-2013 12:17 PM
Getting extra Paragraphs MacEvansCB Calibre 5 12-19-2010 03:46 PM


All times are GMT -4. The time now is 06:00 AM.


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