12-27-2019, 01:16 PM | #1 |
Enthusiast
Posts: 47
Karma: 12544
Join Date: Jul 2018
Device: None
|
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. |
12-27-2019, 04:10 PM | #2 |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
Advert | |
|
01-12-2020, 08:05 PM | #3 | |
Enthusiast
Posts: 47
Karma: 12544
Join Date: Jul 2018
Device: None
|
Quote:
The **only** place I have this problem is in the "Comments" field. Thoughts? |
|
01-12-2020, 08:27 PM | #4 |
Enthusiast
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 |
01-12-2020, 08:56 PM | #5 |
creator of calibre
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
|
Advert | |
|
01-15-2020, 07:37 AM | #6 |
Chalut o/
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 |
01-15-2020, 09:26 AM | #7 |
creator of calibre
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?
|
01-15-2020, 01:07 PM | #8 |
the rook, bossing Never.
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. |
01-15-2020, 03:07 PM | #9 |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
In pictures:
I type in Normal view I go into HTML source and see this I go back to Normal view and I see this And that's what I see in Book Details 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>
*/
|
01-15-2020, 08:52 PM | #10 |
creator of calibre
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.
|
01-15-2020, 10:25 PM | #11 |
Grand Sorcerer
Posts: 10,142
Karma: 224760044
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
|
01-15-2020, 10:57 PM | #12 | |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Code:
<div>line 1<div>line 2</div><div><br></div><div>line 3</div><div>line 4</div></div> BR |
|
01-15-2020, 11:05 PM | #13 |
creator of calibre
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. |
01-15-2020, 11:28 PM | #14 |
creator of calibre
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 |
01-15-2020, 11:42 PM | #15 |
null operator (he/him)
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. |
|
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 |