View Full Version : Superscript from Data File

December 20th, 2012, 06:15 AM
I'm still fairly new at this and my pre-press department just came to me for assistance for an offline VDP job.

We are processing a VDP job for a new client. The Excel file has a field with a dollar amount for some records. When we are using this field, the customer wants us to superscript the dollar sign.

Have any of you done this before? If so, will one of you help me?

December 20th, 2012, 06:19 AM
I will pass on a code that was posted here that worked for me.

var s = Field("YOUR FIELD NAME"); // replace with your field
return s.replace(/\$/g,"<superscript>$</superscript>");

Make sure you check the Tagged Text Box!!

December 20th, 2012, 09:26 AM
Note that I had to create a custom font in Fontographer with a pre-superscripted dollar sign to handle this when the price occurs in a field that may break to two lines. This is because the tags allow a line break to occur between the symbol and the numbers so it is possible that your output could look like:
When you buy two items for $
3.99, you can the 3rd item FREE
With a custom font, the symbol stays with the numbers in that scenario. :)

December 21st, 2012, 08:05 AM
:D Thanks so much for your help! It worked perfectly! Happy Holidays to both of you.