Jump to content

Smaller non-breaking space


Susan

Recommended Posts

Is there a way to make the non-breaking space less wide? I have a rule for the City, St Zip fields to be non-breaking, but the non-breaking space is much larger than the spaces in the address.

 

if (Field("State_Province") > "0")

{

return Rule("City No Break")+(", ")+Field("State_Province")+(" ")+Field("Zip_Postal Code");

}

 

return"";

Link to comment
Share on other sites

I figured it out by using the newsize tag:

 

if (Field("State_Province") > "0")

{

return Rule("City No Break")+"<z newsize=6>"+(", ")+"<z newsize=9.5>"+Field("State_Province")+"<z newsize=6>"+(" ")+"<z newsize=9.5>"+Field("Zip_Postal Code");

}

 

return"";

 

 

but can anyone tell me how I would use the newsize tag in the following rule:

 

var zip = Field("City");

return zip.replace(" "," ");

Link to comment
Share on other sites

but can anyone tell me how I would use the newsize tag in the following rule:

 

var zip = Field("City");

return zip.replace(" "," ");

You could do something like this with the <span> tag:

var zip = Field("City");
return zip.replace(" ","<span><z newsize=6> </span>");

Although I would first try some other entities, like " " or " ", instead of " ". The full list of entities can be found in the "The Entity Definition File" section in the FusionPro Tags Reference Guide, as well as in your entity.def file. You might also be able to adjust the wordspacing settings in the Global Paragraph Settings dialog.

Link to comment
Share on other sites

For some reason the rule:

 

var zip = Field("City");

return zip.replace(" ","<span><z newsize=6> </span>");

 

is not using a non-breaking space if the City is more than one word (part of it will wrap to the next line). I'll probably use word spacing to make the spacing a little more consistent. I couldn't use the thin or en space because I wanted those fields to stay together on one line.

 

Thanks for the help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...