09-15-2019, 09:06 AM | #1 |
Guru
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. |
09-15-2019, 09:18 AM | #2 |
A Hairy Wizard
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} |
Advert | |
|
09-15-2019, 09:24 AM | #3 |
Guru
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!
|
09-15-2019, 09:35 AM | #4 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
09-15-2019, 10:08 AM | #5 |
Grand Sorcerer
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.
|
Advert | |
|
09-15-2019, 10:10 AM | #6 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
OK, thanks.
|
09-15-2019, 10:32 AM | #7 | |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
But something weird was going on. |
|
09-15-2019, 12:01 PM | #8 |
just an egg
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.
|
09-15-2019, 12:16 PM | #9 |
Grand Sorcerer
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. |
09-15-2019, 12:38 PM | #10 |
just an egg
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
|
Bummer. I thought if Mac had a keyboard shortcut, Windows would, too.
|
09-15-2019, 01:53 PM | #11 |
Grand Sorcerer
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. |
09-15-2019, 03:12 PM | #12 |
just an egg
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
|
Hmmm ... that doesn't seem much like a shortcut
|
09-15-2019, 05:55 PM | #13 |
null operator (he/him)
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 |
09-15-2019, 08:47 PM | #14 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
|
09-15-2019, 09:41 PM | #15 | |
Bibliophagist
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:
On a more practical note, some renderers treat the 0 as a invalid value and revert to their default 2 or 3. |
|
|
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 |