PS TEXT FORMAT Reference Manual

Expressions
5-18 11387 Tandem Computers Incorporated
ALIGN Function The ALIGN function returns a string,
s-exp1
, aligned in a field.
ALIGN (
s-exp1
,
n-exp
[ ,
s-exp2
[,
s-exp3
] ] )
n-exp
specifies the width, in decipoints (1/72 of an inch) of the field. If
n-exp
is less than the number of characters in
s-exp1
, ALIGN uses the
string width as the field width to avoid truncating the string.
The optional
s-exp2
, if present, must begin with one of the letters L, C, or
R (any string will do, as long as it begins with one of those letters). It
specifies whether the justified string is to be left-justified, centered, or right-
justified in the field. If you omit this argument, the ALIGN function
automatically right-justifies the string.
The optional
s-exp3
specifies a “pad” string used to fill the remainder of
the field. If you omit this argument, the ALIGN function pads the field
with blanks. ALIGN repeats the pad string as many times as is necessary to
fill the field, using as many of the leftmost characters of the pad as it can
when an entire repetition of the pad won’t fit. For example:
\ALIGN ("BAM",1728, "center","thud")\)
returns the field:
thudthudthBAMthudthudthu
(S)