addCenteredTabsOverColumns is a Translate Script function added with client version 5.41.05. It was added to handle the table based Associated Press sports agate files that include secondary column headers such as:

  • FBC Glance
  • NFL Team Rankings
  • NFL Take-Aways Give-Aways

Unlike other tabular functions:

  • adjusttabs
  • alternation
  • reapportion
  • xcolumn

the addCenteredTabsOverColumns function does NOT need the heading paragraph to be contiguous with the table itself. It will hunt for the next paragraphs to locate the paragraph where the table starts. 

In addition, you NEED to set the tabs to the table and then later call the addCenteredTabsOverColumns function. Here is an example:
SPAG_APTables_FB_NFL_Team_Rankings.png

And here is an example of that ruleset's results. Notice the Offense and Defense headings centered over columns 1-3 and 4-6 respectively:

Standard Details table:

addTableHeaders Details

Title Details
Name addCenteredTabsOverColumns
Generic Calls <&addCenteredTabsOverColumns:(p1,p2,p3)>|<&addCenteredTabsOverColumns:(p1,p2,p3,p4,p5,p6)>
Sample Calls <&addCenteredTabsOverColumns:(Offense,1,3,Defense,4,6)>
Parameters No maximum but they must be supplied in multiples of 3
p1 The text to center
p2 The zero indexed column number that represents the left column
p3 The zero indexed column number that represents the right column
pn The text to center
pn+1 The zero indexed column number that represents the left column
pn+2 The zero indexed column number that represents the right column

Warning:

If you attempt to use a utility to adjust the tabs to a different column width after translation, it will likely destroy the centered aligned tabs created by this function. 

Trivia:

addCenteredTabsOverColumns is the longest named translate script function and it shares the ability to have an unlimited number of parameters.

Note about future write-back:

We have a feature planned to write-back tabular data from the Adobe InDesign pages and Adobe InCopy stories as an HTML table. However, these centered headings will not write back nicely because there aren't as many tabs on the lines. So the HTML table versions will not be pretty.