Susan Posted July 15, 2013 Posted July 15, 2013 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""; Quote
Susan Posted July 15, 2013 Author Posted July 15, 2013 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(" "," "); Quote
Dan Korn Posted July 15, 2013 Posted July 15, 2013 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. Quote
Susan Posted July 16, 2013 Author Posted July 16, 2013 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. Quote
Recommended Posts
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.