Non-breaking spaces

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
MC Hammer
Sr. Propeller Head
Posts: 225
Joined: Wed Aug 08, 2007 3:04 am
Location: In a galaxy far, far away

Non-breaking spaces

Post by MC Hammer »

Hello,
I have just seen a post about non-breaking hyphens. I provide a lot of command line examples in the help I produce (HTML5 help) and I need to add non-breaking spaces to these so that the break lines do not occur between commands and flags and double dashes and flags. I am not too sure how to implement this.

What non-breaking characters do you use and how do you insert them into your content (in the HTML directly or using the WYSIWYG)? Any tip will be greatly appreciated.
Thanks in advance,
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
Martin_B
Propeller Head
Posts: 20
Joined: Wed Mar 15, 2017 10:34 am

Re: Non-breaking spaces

Post by Martin_B »

The only one I use is the non-breaking space, which can be inserted using Shift + Space
Feebeegeebee
Sr. Propeller Head
Posts: 213
Joined: Wed Aug 08, 2012 8:38 am
Location: UK

Re: Non-breaking spaces

Post by Feebeegeebee »

Non breaking hyphen can be added by entering:
CTRL+SHIFT+-
Or, if you go to the Insert menu and choose Character, you'll see both Non-breaking Space and Non-breaking Hyphen listed.

Also, just one other possible thought...
...you can specify hyphenation rules on a style.
If you use a specific style for your examples, you could edit the Properties of that style, choose the Hyphenation tab and switch off hyphenation altogether for that style (Never).
You can also specify the number of characters that should be carried over to the next line. Maybe worth playing with that and setting it to 0 and see if that works.

Regards,
Feebeegeebee
-----------------------------------------------------
Using Flare 2022 on Windows 11 (64-bit)
-----------------------------------------------------
MC Hammer
Sr. Propeller Head
Posts: 225
Joined: Wed Aug 08, 2007 3:04 am
Location: In a galaxy far, far away

Re: Non-breaking spaces

Post by MC Hammer »

Thank you both :)
Feebeegeebee - your last suggestion is really interesting. Will investigate!
Marie-Claire
Flare 2019 r2 - Windows 10 Pro - HTML5 help / "clean" XHTML output
chrispitude
Propeller Head
Posts: 58
Joined: Thu Mar 23, 2017 12:23 pm

Re: Non-breaking spaces

Post by chrispitude »

Just a reminder - whenever you use a nonbreaking hyphen or space, be sure to generate all forms of output and verify that the content is found by a search as the user will type it. For example, I've found that using a nonbreaking hyphen for "-option" results in a PDF where searching for "-option" (typed normally into the PDF reader search box) will not find it, as it's a different Unicode character.
Martin_B
Propeller Head
Posts: 20
Joined: Wed Mar 15, 2017 10:34 am

Re: Non-breaking spaces

Post by Martin_B »

chrispitude wrote:Just a reminder - whenever you use a nonbreaking hyphen or space, be sure to generate all forms of output and verify that the content is found by a search as the user will type it. For example, I've found that using a nonbreaking hyphen for "-option" results in a PDF where searching for "-option" (typed normally into the PDF reader search box) will not find it, as it's a different Unicode character.
This is really good to keep in mind, thanks!
Post Reply