I uploaded an image for my meaning. Next to the large "$13,555" are the superscript characters I'm wanting to correct with the rule. As you'll see in the next paragraph down next to the "$1,500 Bonus Cash" the "+" character is the correct height. So the global setting cannot be modified to fix the issue. The code I have in the rule's correct the height and insure they aren't bold:
return FormatNumber("$#,###", Field("Actual").replace(/[^\d\.-]/g,'')) + "<p br=false superoffset=175 superratio=30><span bold=false><superscript>++</superscript></span bold=false><p br=false superoffset=58 superratio=50>"
That will produce the correct height "++". Literally whats in the text frame is "<<actual>>++" so I input:
var chars = {
// Find: Replace:
'\\^': '<superscript>^</superscript>',
'\\+': '<superscript>+</superscript>',
'†': '<superscript>†</superscript>',
'‡': '<superscript>‡</superscript>',
'<<first>>': Field("First Name"),
'<<last>>': Field("Last Name"),
'<<year>>': Field("Year"),
'<<make>>': Field("Make"),
'<<model>>': Field("Model"),
'<<model2>>': Field("Model2"),
'<<model3>>': Field("Model3"),
'<<V1>>': Field("V1"),
'<<V2>>': Field("V2"),
' <<V3>>': Rule("V3R"),
' <<V4>>': Rule("V4R"),
'<<V5>>': Field("V5"),
'<<v1>>': Field("V1"),
'<<v2>>': Field("V2"),
' <<v3>>': Rule("V3R"),
' <<v4>>': Rule("V4R"),
'<<v5>>': Field("V5"),
'<<more>>': Rule("MoreR"),
[color="Red"]'<<actual>>\\++': Rule("ActualR1"),
'<<actual>>\\+': Rule("ActualR2"),
'<<actual>>†': Rule("ActualR3"),
'<<actual>>‡': Rule("ActualR4"),[/color]
'<<actual>>': Rule("ActualR"),
'<<winno>>': Field("WinNo"),
}
var text = FindTextFrame('FullBody').content
.replace(/<variable name="([^"]*)">/g,
function(s,p) {
return FieldOrRule(p);
})
.replace(/&([lg])t;/g,
function(s,p) {
return p == 'l' ? '<' : '>';
});
for (var i in chars)
text = text.replace(new RegExp(i, 'g'), chars[i]);
FindTextFrame('FullBody').content = text;
I realize I could highlight and replace the space holder but that's literally the last thing left in the letter that isn't automated. I appreciate all your help!