non-breaking space is breaking

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

non-breaking space is breaking

Post by bonnie »

I'm getting situations where the non-breaking space is breaking at the end of a line. I'm trying to use it to hold two words together. The two words break apart at the end of the line and the "non-breaking space" drops down to the beginning of the next line.

Has anyone else experienced this? If so, have you figured out a work-around?

Thanks ahead for any advice on this one.
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: non-breaking space is breaking

Post by LTinker68 »

If you have tags on either side of each half of the hyphen (e.g., <b>court</b>-<b>martial</b>) then it's because there's a bug in Flare where it counts the code when it determines where to wrap text. The options are to include the phrase inside one set of tags (e.g., <b>court-martial</b>) or manually insert a soft line break (<br \>) to make the whole phrase go on the next line.

However, I'm not entirely sure that Flare honors the non-breaking hyphen because that's more of a print convention and Flare is based on CSS and HTML/XHTML and I don't think they have an equivalent character. However, CSS and HTML/XHTML do have something that does the same thing. Create either a custom span class or a generic class and set its white-space attribute to nowrap. Then wrap the text inside that custom span class or the generic class. That is, select the class then apply the span or generic class.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: non-breaking space is breaking

Post by bonnie »

Lisa,
Thanks for the suggestion, but it's not working for me.

Following is what I'm using for my span class.

Code: Select all

	span.NonBreaking
	{
		white-space: nowrap;
	}
I apply this span to the words I want to hold together with the non-breaking space but the words are still separating with the space ending up at the beginning of the second line.

I looked up the nowrap attribute in my O'Reilly HTML/XML manual, and it describes the nowrap attribute as working in <div>, and <table> and <tr> tags, and only for Internet Explorer. My book is old (copyright 2000), so I can't verify that this hasn't changed. But I'm not sure that nowrap is the answer to this situation.

Bonnie
Andrew
Propellus Maximus
Posts: 1237
Joined: Fri Feb 10, 2006 5:37 am

Re: non-breaking space is breaking

Post by Andrew »

I'm pretty sure that's out-of-date: http://www.w3schools.com/CSS/pr_text_white-space.asp

What output is this in?
Flare v6.1 | Capture 4.0.0
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: non-breaking space is breaking

Post by bonnie »

I'm pretty sure that's out-of-date: http://www.w3schools.com/CSS/pr_text_white-space.asp
Andrew,
Thank you for the link to w3schools .com. I will use this site from now on as my reference, instead of my outdated book.

My output from Flare is direct to PDF. I am still unable to get white-space: nowrap to work in a span tag.

However, it seems that the non-breaking space itself should do the job, too. But it doesn't.
Is this operator error of some sort, or a bug? I haven't seen anyone else reporting this problem on the forum. So I am wondering.
Thanks again,
Bonnie
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: non-breaking space is breaking

Post by LTinker68 »

When you say it's not working, does it not work in the generated output? Or is it just the XML Editor and/or Preview window where it doesn't work?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bonnie
Sr. Propeller Head
Posts: 158
Joined: Wed May 14, 2008 4:00 pm

Re: non-breaking space is breaking

Post by bonnie »

When you say it's not working, does it not work in the generated output? Or is it just the XML Editor and/or Preview window where it doesn't work?
Hi Lisa,

It's not working in the XML Editor, the Previewer, or the generated PDF output.

Bonnie
Fiona
Sr. Propeller Head
Posts: 118
Joined: Tue Jan 27, 2015 7:44 am
Location: U.K.

Re: non-breaking space is breaking

Post by Fiona »

I'm having issues with this too. I can't get Flare 10 to honour   irrespective of whether I enter it directly in XML or use the shift+space option. I've also tried a nowrap class but every time the output is still breaking when I generate the pdf. Has anyone else had this? I'm not inside any other tags except the standard paragraph tags, and non-breaking hyphens work fine, but it's a non-breaking space that I need!

Code: Select all

<p>This user command compares two any APL objects for which <code>⎕NC</code> is 3 (functions) or 4 (operators) and returns the differences between them (including timestamps).</p>
ajturnersurrey
Sr. Propeller Head
Posts: 346
Joined: Fri Nov 05, 2010 3:30 am

Re: non-breaking space is breaking

Post by ajturnersurrey »

I can only offer sympathy - I have had similar issues and have simply resorted to the very unsatisfactory </br> from time to time, having tried the range of possibilities you describe (from inserting a non-breaking space through the menus, to typing it into the code, or using a span with nowrap) ....

I too would love to find a reliable solution to this issue!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2634
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: non-breaking space is breaking

Post by ChoccieMuffin »

A suggestion to stop your </br> from messing up your formatting in online output, format the </br> as print only, so it gets ignored except in print.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: non-breaking space is breaking

Post by doc_guy »

The print-only condition is a good idea.

Also, have you tried the following code:

Code: Select all

span
{
  white-space: pre;
}
I'm pretty sure that for a span you need to use the above setting.

-Paul
Paul Pehrson
My Blog

Image
Post Reply