Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-15-2019, 09:06 AM   #1
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Non-breaking spaces

I see that a Non-breaking Space now shows up in Code View (but not in the Search/Replace fields - though it can be pasted there and is recognised) as a sort of broken underline character. Is there any way to type them in directly? Like in Dreamweaver it's Shift-Ctrl-Space.

On a connected topic, when working on websites or eBooks I often like to replace the last two or three spaces in a paragraph with non-breaking ones, to avoid ugly widows. It seems this should be open to automation. Any ideas?

Last edited by exaltedwombat; 09-15-2019 at 09:13 AM.
exaltedwombat is offline   Reply With Quote
Old 09-15-2019, 09:18 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
in CSS:

body {widows:0}

or

p {widows:0}

Set the value to whatever number you want to allow.

The same goes for Orphans:

body {orphans:0}
Turtle91 is offline   Reply With Quote
Advert
Old 09-15-2019, 09:24 AM   #3
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Thanks @Turtle91. If only more eBook readers recognised that css command (and the no page-break one) our life would be much easier!
exaltedwombat is offline   Reply With Quote
Old 09-15-2019, 09:35 AM   #4
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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by exaltedwombat View Post
I see that a Non-breaking Space now shows up in Code View (but not in the Search/Replace fields - though it can be pasted there and is recognised) as a sort of broken underline character. Is there any way to type them in directly? Like in Dreamweaver it's Shift-Ctrl-Space.
No. Sigil itself provides no way to type it directly. But the Insert Special Characters dialog will add them just fine (and they will stay, provided you don't have an entry in the Preserve Entities list to convert them all to entities).

You can also create your own no-break-space Clip with the Clip Editor and use the keyboard shortcut for that Clip to insert one anywhere you like (including the F&R fields).

Last edited by DiapDealer; 09-15-2019 at 09:37 AM.
DiapDealer is offline   Reply With Quote
Old 09-15-2019, 10:08 AM   #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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I was going to say that you could also use the \x{0000} syntax in the F&R fields for finding unicode codepoints. The one for the non-breaking space would be \x{00a0} or (\x00a0 or just \xa0), but it appears we've introduced some sort of bug into F&R where \xa0 only matches non-breaking space characters in multiples of two??? It used to work fine, so I'll have to look into it. Inserting an nbsp character into the F&R fields with a Clip's keyboard shortcut works just fine in the meantime, though.
DiapDealer is offline   Reply With Quote
Advert
Old 09-15-2019, 10:10 AM   #6
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
OK, thanks.
exaltedwombat is offline   Reply With Quote
Old 09-15-2019, 10:32 AM   #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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DiapDealer View Post
but it appears we've introduced some sort of bug into F&R where \xa0 only matches non-breaking space characters in multiples of two??? It used to work fine, so I'll have to look into it.
Actually, I might be an idiot. The \x{0000} syntax matches single nbsp code points just fine for me now.

But something weird was going on.
DiapDealer is offline   Reply With Quote
Old 09-15-2019, 12:01 PM   #8
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
I may be misunderstanding the issue, but FWIW, on Mac, typing Option-Space in Code View results in a nbsp (with the broken underline). Typing Option-Space in F&R inputs a nbsp (but does not show the broken underline). When I run the search, it finds the nbsp's in Code View just fine.
odamizu is offline   Reply With Quote
Old 09-15-2019, 12:16 PM   #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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Window and Linux don't have an Option key.

We're typically stuck with using the Alt/Gr key with a 4-digit code (typed on the numpad-only) to type special characters that aren't on our keyboards. Some software (like Word) have created simpler shortcuts, but they don't work outside of that particular program.

Last edited by DiapDealer; 09-15-2019 at 12:18 PM.
DiapDealer is offline   Reply With Quote
Old 09-15-2019, 12:38 PM   #10
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Bummer. I thought if Mac had a keyboard shortcut, Windows would, too.
odamizu is offline   Reply With Quote
Old 09-15-2019, 01:53 PM   #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: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Well there is. It's just not very convenient or all that easy to remember.

On Windows, you need to make sure the numlock is on, then you have to hold the Alt key down while you type 2 5 5 (on the number pad). Then release the Alt key.

For whatever reason, the only one I can use/remember with any consistency is Alt+0151. That's the one for the emdash. Even then, I often forget to check if the numlock is on (or I'm on a computer where the keyboard doesn't even have a number pad).

Last edited by DiapDealer; 09-15-2019 at 01:55 PM.
DiapDealer is offline   Reply With Quote
Old 09-15-2019, 03:12 PM   #12
odamizu
just an egg
odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.odamizu ought to be getting tired of karma fortunes by now.
 
odamizu's Avatar
 
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
Hmmm ... that doesn't seem much like a shortcut
odamizu is offline   Reply With Quote
Old 09-15-2019, 05:55 PM   #13
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Windows users: Special Characters any time, any where - try AHK ==> Insert Any Special Character with a Single Keystroke, and/or the Insert Symbol feature of the Transtools' tray utility

BR
BetterRed is offline   Reply With Quote
Old 09-15-2019, 08:47 PM   #14
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Turtle91 View Post
in CSS:

body {widows:0}

or

p {widows:0}
widows/orphans of 0 is invalid. It has to be 1 or higher.
Tex2002ans is offline   Reply With Quote
Old 09-15-2019, 09:41 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Turtle91 View Post
in CSS:

body {widows:0}

or

p {widows:0}

Set the value to whatever number you want to allow.

The same goes for Orphans:

body {orphans:0}
Minor nit. 0 is not a valid value to widows and orphans since 0 is not a positive integer. Use 1 instead.

On a more practical note, some renderers treat the 0 as a invalid value and revert to their default 2 or 3.
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are the spaces going? rbruce1314 Sigil 32 08-04-2017 03:39 AM
Viewing non-breaking and narrow spaces as code? veezh Editor 2 05-06-2015 04:53 AM
[old thread] non breaking spaces (* and  ) automatically removed artoros Sigil 31 09-04-2014 06:23 PM
0.8.63 strips non-breaking spaces when converting from epub to mobi veezh Calibre 7 08-04-2012 08:39 AM
Non breaking spaces? troymc Sigil 6 05-22-2010 07:47 AM


All times are GMT -4. The time now is 01:22 PM.


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