Non-breaking space in variable

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Matze
Sr. Propeller Head
Posts: 166
Joined: Mon Jun 20, 2016 10:35 pm

Non-breaking space in variable

Post by Matze »

Hi all,
how can I insert a non-breaking space in a variable? Via shortcut it does not work.
BedfordWriter
Sr. Propeller Head
Posts: 217
Joined: Wed Jun 23, 2010 10:13 am
Location: Nova Scotia

Re: Non-breaking space in variable

Post by BedfordWriter »

Good question. Made me interrupt my day until I figured out the answer. I can see lots of uses for special characters in variables.

I haven't had success trying to add one with the user interface, but you can add anything you want to the flvar file. You'll find that in your project folder, MyVariables.flvar. It's XML, so that controls what it can contain. It won't let you use the character name ( ) but it will let you use the hexadecimal code, &x#A0;

So, for example:

Code: Select all

<Variable Comment="" Name="CompanyName">MadCap Software</Variable>
You can find a list of character values at the following wikipedia link.
https://en.wikipedia.org/wiki/List_of_X ... references
For example, let's say that you want an ellipsis. Looking it up, we find code U+2026 (8230), where the useful bit is the number 2026. In your variables file, you can write that as &x#2026;
Matze
Sr. Propeller Head
Posts: 166
Joined: Mon Jun 20, 2016 10:35 pm

Re: Non-breaking space in variable

Post by Matze »

Hi,
many thanks for your workaround, I will try it and whow: I can´t belive that I cannot make a non-breaking variable directly via Flare :cry:
Scotty
Propeller Head
Posts: 98
Joined: Thu Feb 02, 2012 6:56 pm
Location: Europe

Re: Non-breaking space in variable

Post by Scotty »

BedfordWriter wrote:Good question. Made me interrupt my day until I figured out the answer. I can see lots of uses for special characters in variables.
What are you thinking?
Last edited by Scotty on Tue Nov 29, 2016 8:28 pm, edited 1 time in total.
The newest noob in town.
Matze
Sr. Propeller Head
Posts: 166
Joined: Mon Jun 20, 2016 10:35 pm

Re: Non-breaking space in variable

Post by Matze »

ok, nice, thanks a lot, piece of cake, I´ve also change my non-breaking hyphen with  
riboslavin
Jr. Propeller Head
Posts: 3
Joined: Wed Jun 08, 2016 7:38 am

Re: Non-breaking space in variable

Post by riboslavin »

Pardon me for bringing up the dead.

We're in a situation where, for branding and aesthetic reason, we can't break between certain words. If we try editing the .fltar target file in a text editor, putting in the entity code (even as hex) causes Flare to balk at the &. We're running Flare 12.

Can someone confirm they've been able to insert an HTML entity like a non-breaking space in a variable and had the PDF build accordingly?

Thanks.
carmonli
Propeller Head
Posts: 29
Joined: Mon Jan 27, 2014 11:04 pm

Re: Non-breaking space in variable

Post by carmonli »

I actually did this just today (without looking at the thread, just tried it) and it worked perfectly.
Daniel Ferguson
Propeller Head
Posts: 77
Joined: Wed Jul 10, 2013 12:34 pm
Location: Salt Lake City
Contact:

Re: Non-breaking space in variable

Post by Daniel Ferguson »

riboslavin wrote:Pardon me for bringing up the dead.

We're in a situation where, for branding and aesthetic reason, we can't break between certain words. If we try editing the .fltar target file in a text editor, putting in the entity code (even as hex) causes Flare to balk at the &. We're running Flare 12.

Can someone confirm they've been able to insert an HTML entity like a non-breaking space in a variable and had the PDF build accordingly?

Thanks.
If doing this in a variable isn't working for you, could you instead use a snippet? You can insert non-breaking spaces in a snippet easily, and then insert the snippet as snippet text in your topics.
Daniel Ferguson
Certified Flare Trainer & Consultant
smartoutput.com
paul_collins
Propeller Head
Posts: 22
Joined: Thu May 22, 2014 7:25 am

Re: Non-breaking space in variable

Post by paul_collins »

If you manually insert a   into your variables be aware that the Flare editor will automatically strip it out again the next time you edit any of the other variables in that variable set.
Post Reply