.Rightmargin Statement--Set the Right Margin
The .rightmargin statement sets a right margin for the report.
This statement has the following format:
.rightmargin | .rm [[+|-] n | expression]
The parameters for the .rightmargin statement are as follows:
+ | -
If sign is present, the new position is calculated relative to the current position. If no sign is present, it is set to the absolute position n.
The plus sign (+) or minus sign (-) must be stated explicitly and cannot be a part of the expression.
n
The position of the new right margin of the report. If signed, the new position is calculated relative to the current position. If unsigned, it is set to absolute position n.
expression
A numeric expression that evaluates to the position of the new rightmargin of the report. All variables that are part of the expression must be preceded by a dollar sign ($).
Description
The .rightmargin statement sets the right margin of the report to a specific position or a position that is the value of a numeric expression. To set the right margin for the entire report, place the statement in the .header report section. The .rightmargin value is used by the .right and .center statements to determine the default position for those statements. If text would ordinarily go beyond the right margin, it is wrapped around to the start of the next line.
Report-Writer evaluates any expressions used as parameters to the .rightmargin statement during runtime.
If you do not specify a value, Report-Writer determines the default value for the right margin by the printing statements in the report, as discussed in Automatic Determination of Default Settings. The value specified for the .rightmargin statement must be greater than the specification for the left margin and less than the page width (as set by the ‑l flag on the report command).
Examples
1. Specify margins such that the default position used by .center is 50.
.leftmargin 10
.rightmargin 90
...
.center
.print 'This title is centered on column 50'
2. Move the right margin left by the number of characters specified by the value of the variable width.
.rm $width
3. Set the right margin to be the sum of the value of variable width and 3.
.rm $width+3
.noformfeeds
Last modified date: 08/28/2024