Jump to content

Ampersand as Literal Text


ksulliv1

Recommended Posts

I am working on a business card template and have a question. When a user types an ampersand in a line of text, without any spaces (A&D Sales), FusionPro views it as something other than text and drops it along with the next character (A Sales).

Thanks,

Link to comment
Share on other sites

Is this text coming from a rule, or directly from a data field?

 

If it's coming directly from a data field, then you need to make sure that the "Treat field values as tagged text" box on the "Data Fields - Flat File" step of the Define Data Source wizard is not checked.

 

If it's in a rule, then you have a rule with the "Treat returned strings as tagged text" box checked, then you need to use the TaggedTextFromRaw or TaggedDataField functions on any raw data field values, to turn characters such as ampersands into entities for FusionPro's tagged markup parser.

Link to comment
Share on other sites

Thanks, yes the data file is not setup as tagged text, however there is a rule dropped in on top of that variable that automatically creates a superscript register trademark symbol, whenever anyone enters the word "LEED" in that field. So you are saying I need to apply the TaggedTextFromRaw function to that rule, correct? If the rule is:

 

return ReplaceSubstring(Field("Title/Degree"), "LEED", "LEED<superscript>®</superscript>");

 

and the function is:

 

TaggedTextFromRaw(string)

 

How should I combine the two correctly?

Link to comment
Share on other sites

If the rule is:

 

return ReplaceSubstring(Field("Title/Degree"), "LEED", "LEED<superscript>®</superscript>");

 

and the function is:

 

TaggedTextFromRaw(string)

 

How should I combine the two correctly?

Like this:

return ReplaceSubstring(TaggedTextFromRaw(Field("Title/Degree")), "LEED", "LEED<superscript>®</superscript>");

Although if you might be uploading the job to MarcomCentral or another Web-to-Print system which generates a tagged markup input file instead of just composing with your flat data file, it's better to do this:

return ReplaceSubstring(TaggedDataField("Title/Degree"), "LEED", "LEED<superscript>®</superscript>");

The TaggedDataField function accounts for whether the data has already been set up as tagged markup with entity replacements for things like ampersands.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...