Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

Align numbers along decimals/assumed decimals

$
0
0

I am looking for/trying to write a script to align decimals (and assumed decimals) in a table. FrameMaker does not align a column of numbers in a table to the decimal/assumed decimal. Instead, numbers without the decimal are shifted to the right a little, like this:

table1.png

To get around this, we have to add a decimal after the whole number and color it white, so that it looks like this:

table2.png

I am trying to write a script to do this for us. The ultimate goal is for us to select the column or columns and then run the script on them. The script will read through the columns and when if finds a whole number, it will add “.0” and tag it “White,” then move on to the next whole number. I’ve been searching the forum for scripts others have shared, and I’m trying to build from the bottom up. So far, I can add the decimal in single cell.

add decimal.png

And I can also apply the character format; however, it only works if the cursor is before the decimal. If the cursor is after the decimal, it jumps to the next cell, but it doesn’t do anything. How do I make it apply the character format regardless of where the cursor is?

apply character format.png

 

Thank you.


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>