This is a very useful function when working with sports agate or any type of tab delimited columns of data. It can also be used with Table assets. 

The function will examine the column width of the frame and set right-align tab stops to proportionally align the columns of text based upon the number of characters or the width of those characters in each column.

The parameters of this function can drastically change what aspects of the story are considered when setting tabs. Pay special attention to the parameters. 

Depending upon the parameters, the function will adjust all the tabs in the entire active object the same or do each tabbed area differently. If you need more control try the extra parameters or use the <&series: function.

Because applying Paragraph Styles typically overrides any existing text attributes, it is best to use <&adjusttabs: after applying the Paragraph Style. This is particularly important when using the Advanced Mode which needs the text completely formatted to properly gauge the width of the text.

Sample Results

Below are samples of some text before and after using the <&adjusttabs:> function.

adjustTabs Sample

adjusttabs Details

Title Details
Name adjusttabs
Generic Calls <&adjusttabs:>|<&adjusttabs:p1>|<&adjusttabs:(p1,p2,p3,p4,p5,p6, p7)>
Sample Calls <&adjusttabs:>|<&adjusttabs:0>|<&adjusttabs:(1,,5)>|<&adjusttabs:(0,3)>|<&adjusttabs:(1,,,200)>|<&adjusttabs:(1,,,,1)>|<&adjusttabs:(0,,,,1,1)>|<&adjusttabs:(0,,,,1,,9)>
Parameters A maximum of 7 with all of them being optional.
p1 Optional. Set all the tabs the same, or set by group. This can be a 1 (one) or a 0 (zero). If anything other than 0 then the function works on each group of consecutive paragraphs containing tabs independently. Thus an agate story, or groups of them, with multiple configurations of tab delimited columns will have their tab stops set independently.
p2 Optional. Specify specific group. This value is only examined if the p1 value uses the default You can use this to specify the specific group of consecutive paragraphs containing tabs to work on. Specifying a value of 1 will cause it to work on the second group of consecutive tabbed paragraphs. A value of 0 points to the first group. If you specify a group that isn’t available, then it applies the <&adjusttabs: function to all the groups.
p3 Optional. Determines the minimum number of paragraphs that are considered consecutive. The default is 2. Use a value greater than two if you want to prevent having the <&adjusttabs: function work on smaller items. Values less than 2 are ignored.
p4 Optional . Column 1 scale. Sets a relative value for the first column of text. In sports agate, the first column is nearly always letters. Letters typically take up less space than the numbers in the rest of the columns. The default is a value of 100. Set a value of 100 if all the data is text and the width of the first column of information should use the same width as the rest of the text. If the story is agate then determine the percentage of letters that can fit in the same space as the numbers. Because of the white space between columns, a value of 100 will tend to produce a very open first column. Values greater than 100 are common. For example in the font used in this documentation 21.25 letters and spaces fit in the same space as 20 numbers. Thus the value to enter would be 106 because 21.25/20 is 106% Howard Smithy Jon Doe 21.25 12345678901234567890 20 In the following example, 8 letters fit in the space of 7 digits. So the value to enter would be 114 because 8/7 is 114%. Fontenot 1234567 When p5 is set to 1, the value of p4 is ignored.
p5 Optional. Advanced Mode. When this value is set to 1 the <&adjusttabs: custom function will use the actual width of the text rather than just the character counts to set the tab positions. This creates exceptionally even column spacing, but it requires slightly more time to set the tabs because it requires more calculations. See “Sample Results” on page for samples of the differences between normal and Advanced Mode. When p5 is set to 1, the value of p4 is ignored. When calling the Advanced mode the normal parameter setup is: <&adjusttabs:(1,,,,1)>
p6 Optional. Remove Warning. When this value is set to 1, the <&adjusttabs: custom function will not alert the user when it is unable to set the tabs to fit the column width.
p7 Optional. Right Indent. When using this value, the right tab will be indented by the specified number of points. When this value isn’t specified, then it will be set to zero. If the value is larger than the column width, it will be ignored.

alternation Details

Title Details
Name alternation
Generic Calls <&alternation:()>|<&alternation:(p1,p2,p3,p4,p5)>
Sample Calls <&alternation:()>|<&alternation:(1)>|<&alternation:(0,,Yellow Strike)>|<&alternation:(4,BCTC Tagline Continued,,—)>|<&alternation:(,,,,-1)>
Parameters A maximum of 7 with all of them being optional.
p1 Optional. This is the group of paragraphs to which should receive the alternating styles. The groups are determined by consecutive paragraphs containing the p4 string or its default if it isn’t supplied. The groups are zero indexed. The first group is group 0. The second group is group 1. Negative indexes are not supported. When this parameter is not supplied, then every group will receive the function’s treatment.
p2 Optional. This is the Paragraph Style to apply to the even paragraphs when using the function without p5 specified. The translation table’s field 5 is applied to the odd paragraphs. If this value is not specified then the Paragraph Style is not changed on the even paragraphs.
p3 Optional. This is the Character Style to apply to the even paragraphs when using the function without p5 specified. The translation table’s field 6 is applied to the text of the odd paragraphs. If this value is not specified then the Character Style is not changed for the text of the odd paragraphs.
p4 Optional. This is a character or a string of characters that the are expected in a group of contiguous paragraphs. If a character is not specified, the value from field 1 in the translation table will be used.
p5 Optional. Do not alternate at all, but instead apply to a specific paragraph of the group. The paragraphs are zero indexed. The first paragraph is paragraph 0. The second paragraph is paragraph 1. The function also accepts negative indexes such -1 to indicate the last paragraph. When this parameter is used, it is important to realize that it is NOT the p3 or p4 style that is applied, but instead the styles in fields 5 and 6 of the translation table regardless if the specified paragraph is even or odd in the group. If the indicated paragraph doesn’t exist, the indicated styles will not be applied.

bygraph Details

Title Details
Name bygraph
Generic Calls <&bygraph:(p1,p2)>|<&bygraph:(p1,p2,p3,p4,p5)>
Sample Calls <&bygraph:(,)>|<&bygraph:(^p,^p,firstLineIndent = 0,fontStyle = 'bold centered'>
Parameters unlimited with the first 2 required (though they can be blank)
p1 Required, but can be blank to only use the values in Start Tag. p1 is the closing tag. Start Tag is specified in the normal position of the Translate Ruleset, but to keep Translate from grabbing too much text, use p1 to specify a closing tag instead of the End Tag in the Translate Ruleset. If you don’t need to specify a End Tag to accomplish the desired formatting, then you could just as use <&extend:(4)>. But to keep things consistent, you could alternatively always use <&bygraph:(,)>.
p2 Required, but can be blank to delete the p1 value from the text. This parameter serves as the replacement closing tag.
p3-pn These are the attributes that you want to apply to the text. See <&extend: for details on specifying these.

cframe Details

Title Details
Name cframe
Generic Calls <&cframe:()>
Sample Calls <&cframe:()>
Parameters None

contents Details

Title Details
Name contents
Generic Calls <&contents:()>
Sample Calls <&contents:()>
Parameters None

cstyle Details

Title Details
Name cstyle
Generic Calls <&cstyle:(p1)>|<&cstyle:(p1,p2)>
Sample Calls <&cstyle:​DekLead>|<&cstyle:(italicbody,0)>
Parameters 2 with the first required.
p1 Required. The exact spelling and case of the Character Style to apply to all the text of the text frame.
p2 Optional. Determines if the application of the Character Style should override any existing character attributes that differ from the existing Character Style. If not specified a value of 1 (one) indicating that the Character Overrides should be cleared is assumed. A value of 0 (zero) indicates that any existing overrides should be ignored.

domain Details

Title Details
Name domain
Generic Calls <&domain:()>|<&domain:(p1)>
Sample Calls <&domain:()>|<&domain:(domain_local)>
Parameters Zero or one
p1 Optional. Determines the domain to apply to the active (almost always the default frame for the frameset). When p1 is not specified, the value is taken by the string between the Translate Ruleset tag1 and tag3. This is the normal method. This is currently called in two standard TownNews rulesets write-backNormally and write-backPrevention. When p1 is specified the domain is set to the value of p1.

extend Details

Title Details
Name extend
Generic Calls <&extend:()>|<&extend:(p1)>|<&extend:(p1,p2,p3,p4,p5)>
Sample Calls <&extend:()>|<&extend:(1,justification = Justification.CENTER_ALIGN)>|<&extend:(2,pointSize = 14,leading = 15)>
Parameters Unlimited and all are optional
p1 Mode. See separate table for the 4 modes
p2-pn Text Attributes. See separate documentation page on how to apply the text attributes.

filereference Details

Title Details
Name filereference
Generic Calls <&filereference:()>|<&filereference:(p1)>
Sample Calls <&filereference:()>|<&filereference:(placeholder)>
Parameters One optional parameter
p1 Optional. In practice this parameter isn’t used and the value is extracted from the text between the Start Tag and End Tag.