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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-30-2017, 10:52 AM   #1
aleksei_iv
Member
aleksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheese
 
aleksei_iv's Avatar
 
Posts: 14
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
Shift+Enter Bug?

Hi all.

Does anybody have problem when hit shift+enter to break a line? Sometimes, instead of make a simple <br/> it creates a <div ...>, and after closing the div a <p></p>.

I'm using Windows 10 and Sigil 0.9.8.

Cheers and anyway thanks for the software, it's really helpful.

Last edited by aleksei_iv; 05-30-2017 at 11:11 AM.
aleksei_iv is offline   Reply With Quote
Advert
Old 05-30-2017, 12:05 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
When in Book View, tags are automatically generated based on the surrounding (existing) tags. When hitting enter, p tags generate more p tags; divs generate more divs. As far as I know, hitting enter never creates a br tag. I've no idea what the significance of shift + enter is supposed to be. It probably depends on the surrounding code as well. Whatever it is would be down to Qt's QTextEdit/QtWebKit. Keep in mind that Book View is not Word.
DiapDealer is offline   Reply With Quote
Old 05-30-2017, 01:38 PM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,397
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
In most word processors shift+enter is a soft line break. In HTML this is often translated at a <br/>.
Toxaris is offline   Reply With Quote
Old 05-30-2017, 02:56 PM   #4
aleksei_iv
Member
aleksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheese
 
aleksei_iv's Avatar
 
Posts: 14
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
Thanks for the help.

On Sigil, Shift+Enter generates a line break: <br/>. It is a HTML after all. But it looks like there are some bugs in this latest version of the software.

And that is correct, DiapDealer. If you only press only Enter (without Shift) a new paragraph will be created duplicating the same style.

If anyone still has some ideas... Ta!
aleksei_iv is offline   Reply With Quote
Old 05-30-2017, 03:02 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Toxaris View Post
In most word processors shift+enter is a soft line break. In HTML this is often translated at a <br/>.
I wasn't ware of that. But it's very not surprising. I don't use a lot of "word processor" features (in any application).

In my quick experimentation with this, I've used the following code:
Code:
<body>
<p>hello1</p>
<div>hello2</div>
<blockquote>hello3</blockquote>
</body>
If I switch to Book View and use Shift + Enter with the cursor before each word, I get the following result:
Code:
<body>
<p><br/>hello1</p>
<div><br/>hello2</div>
<blockquote><br/>hello3</blockquote>
</body>
If I use Shift + Enter with the cursor after the words, I get:
Code:
<body>
<p>hello1<br/><br/></p>
<div>hello2<br/><br/></div>
<blockquote>hello3<br/><br/></blockquote>
</body>
Not sure why it doubles the br when the cursor is after the word in Book View, but it doesn't seem to affect rendering. Either way, the result with Shift + Enter seems to be consistent, at least.
DiapDealer is offline   Reply With Quote
Advert
Old 05-30-2017, 04:23 PM   #6
aleksei_iv
Member
aleksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheese
 
aleksei_iv's Avatar
 
Posts: 14
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
Hm... That's why I said sometimes. Maybe it's a specific case with some kind of class or situation... Let me keep editing this book and I try to isolate the problem so I can post it here as soon as it happens again.

Cheers
aleksei_iv is offline   Reply With Quote
Old 05-30-2017, 08:34 PM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If you can isolate it, that would be great. I can't guarantee we'll be able to do anything about it, but we can sure try!
DiapDealer is offline   Reply With Quote
Old 06-01-2017, 09:35 PM   #8
aleksei_iv
Member
aleksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheesealeksei_iv can extract oil from cheese
 
aleksei_iv's Avatar
 
Posts: 14
Karma: 1000
Join Date: Jul 2014
Device: Kindle Paperwhite
Sorry for the delay in answering, I had to format my computer.

So far I could see that this problem happens on EPUB 2.0 with at least one class and attributes set for <p>.

Try like this:

1--> Create an 2.0 EPUB
2--> Copy these lines on the page's code:

<p class="noind">Non onono nono nonono,</p>
<p>nono nono nonono no no nono nonono no no no...</p>

3--> Create a CSS with these classes (of course, don't forget to link it to the page):

p{ text-indent:1.5em; }
.noind { text-indent:0em; }

4--> Save it before anything (just if you want to experiment other ways)
5--> Now, go to BOOK VIEW, join these two lines (from step 2) on the page (with backspace or del) and hit SHIFT+ENTER to separate them again but with </br> this time.

It'll look like this:

<p class="noind">Non onono nono nonono,<br/></p>
<div style="text-indent: 0px;"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></div>
<p></p>

Last edited by aleksei_iv; 06-01-2017 at 10:08 PM.
aleksei_iv is offline   Reply With Quote
Old 06-02-2017, 12:29 AM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
That's bizarre! I can definitely duplicate it. The span creation alone (where the css provided text-indent attribute is added as an inline attribute) when joining the two lines with del/backspace is baffling enough. I'll have to do some testing to see if this is because of any recent changes, or if it's been around a while, but unnoticed.

I know nobody likes to hear it, but it's another of many reasons that editing in Book View is a bad idea (and probably another nail in Book View's coffin).

Last edited by DiapDealer; 06-02-2017 at 12:31 AM.
DiapDealer is offline   Reply With Quote
Old 06-02-2017, 06:58 AM   #10
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,928
Karma: 11088640
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
I'll have to do some testing to see if this is because of any recent changes, or if it's been around a while, but unnoticed.
I was able to reproduce this "feature" with Sigil 0.7.4.
Doitsu is offline   Reply With Quote
Old 06-02-2017, 10:42 AM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
I was able to reproduce this "feature" with Sigil 0.7.4.
Thanks! Saved me some time.
DiapDealer is offline   Reply With Quote
Old 06-02-2017, 11:05 AM   #12
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,928
Karma: 11088640
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
Thanks! Saved me some time.
BTW, the code is not 100% identical. With Sigil 0.7.4 and 0.8.6. I got:

Code:
  <p class="noind">Non onono nono nonono,<br /></p>

  <div style="text-indent: 0px;">
    <span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span>
  </div>
However with Sigil 0.9.8 I got:

Code:
 <p class="noind">Non onono nono nonono,<br/></p>
<div style="text-indent: 0px;"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></div>
<p></p>
I.e., the older versions didn't generate the final empty paragraph.

BTW, I got the following code with Sigil 0.7.4, 0.8.9 and 0.9.8, when I just hit the Enter key:

Code:
  <p class="noind">Non onono nono nonono,</p>

  <p class="noind"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></p>
Doitsu is offline   Reply With Quote
Old 06-02-2017, 11:17 AM   #13
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Doitsu View Post
BTW, I got the following code with Sigil 0.7.4, 0.8.9 and 0.9.8, when I just hit the Enter key:

Code:
  <p class="noind">Non onono nono nonono,</p>

  <p class="noind"><span style="text-indent: 1.5em;">nono nono nonono no no nono nonono no no no...</span></p>
After joining the two lines with delete/backspace? I only ask because with my (admittedly hasty) investigation, the span was generated when joining the two lines with del/bksp -- regardless of whether a Shift/Shift+Enter followed. "Enter", for all intents and purposes, is doing exactly as it's intended to do in that situation, I believe. Or did you mean something else?
DiapDealer is offline   Reply With Quote
Old 06-02-2017, 11:23 AM   #14
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,928
Karma: 11088640
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
After joining the two lines with delete/backspace?
Yes. I did the following:
  1. Switched to Book View mode.
  2. Positioned the cursor before the first n in the second line by pressing the Down arrow button once.
  3. Pressed Backspace followed by Enter.
Doitsu is offline   Reply With Quote
Old 06-02-2017, 11:37 AM   #15
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 17,305
Karma: 90379824
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
OK. Then yes ... given the condition generated by the backspace (switch to Code View immediately after the backspace to verify that the span has already appeared), the "Enter" seems to be doing exactly what it would in any other circumstance: start a new block element that matches the previous one, including attributes.

Last edited by DiapDealer; 06-02-2017 at 11:40 AM.
DiapDealer 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
iOS 9.3 out now with Night Shift Jessica Lares Apple Devices 32 04-07-2016 06:18 AM
[BUG] Order of selections in Remove Style Information shift around Katsunami Editor 4 09-27-2015 06:25 PM
Alt+Shift+B copyrite Calibre 5 08-16-2012 04:44 PM
Paradigm Shift e-reader Marc_liest Andere Lesegeräte 3 04-22-2010 06:58 AM
Default for alt-shift-# is...? Neil Amazon Kindle 2 07-04-2009 05:51 PM


All times are GMT -4. The time now is 07:27 AM.


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