Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-27-2019, 01:16 PM   #1
wjBLqf-_9
Enthusiast
wjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 47
Karma: 12544
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 01:18 PM.
wjBLqf-_9 is offline   Reply With Quote
Old 12-27-2019, 04:10 PM   #2
BetterRed
null operator (he/him)
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: 20,572
Karma: 26954694
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
Advert
Old 01-12-2020, 08:05 PM   #3
wjBLqf-_9
Enthusiast
wjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 47
Karma: 12544
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, 08:27 PM   #4
wjBLqf-_9
Enthusiast
wjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterwjBLqf-_9 can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 47
Karma: 12544
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, 08: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: 43,860
Karma: 22666666
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 offline   Reply With Quote
Advert
Old 01-15-2020, 07:37 AM   #6
un_pogaz
Chalut o/
un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.un_pogaz understands the importance of being earnest.
 
un_pogaz's Avatar
 
Posts: 410
Karma: 145324
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:	171
Size:	23.0 KB
ID:	176410   Click image for larger version

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

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

Name:	EmptyPara_4.png
Views:	176
Size:	22.8 KB
ID:	176413  
un_pogaz is offline   Reply With Quote
Old 01-15-2020, 09: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: 43,860
Karma: 22666666
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 offline   Reply With Quote
Old 01-15-2020, 01:07 PM   #8
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,161
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
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.
Quoth is offline   Reply With Quote
Old 01-15-2020, 03:07 PM   #9
BetterRed
null operator (he/him)
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: 20,572
Karma: 26954694
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:	292
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:	297
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:	274
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:	276
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, 08: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: 43,860
Karma: 22666666
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 offline   Reply With Quote
Old 01-15-2020, 10:25 PM   #11
Sirtel
Grand Sorcerer
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: 10,142
Karma: 224760044
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
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 offline   Reply With Quote
Old 01-15-2020, 10:57 PM   #12
BetterRed
null operator (he/him)
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: 20,572
Karma: 26954694
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-15-2020, 11:05 PM   #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: 43,860
Karma: 22666666
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 offline   Reply With Quote
Old 01-15-2020, 11:28 PM   #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: 43,860
Karma: 22666666
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 offline   Reply With Quote
Old 01-15-2020, 11:42 PM   #15
BetterRed
null operator (he/him)
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: 20,572
Karma: 26954694
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-15-2020 at 11:45 PM.
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding spaces after images and between paragraphs awcross Sigil 7 06-14-2017 02:47 PM
Stop Sigil from inserting unwanted lines between paragraphs Benasam Sigil 16 05-28-2014 03:16 PM
Adding space between paragraphs Gazella Conversion 5 04-03-2014 04:35 PM
Touch Extra spacing between paragraphs on my e-books Aiden Barnes & Noble NOOK 8 12-11-2013 11:17 AM
Getting extra Paragraphs MacEvansCB Calibre 5 12-19-2010 02:46 PM


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


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