.Leftmargin Statement--Set a Left Margin
The .leftmargin statement sets a left margin for the report.
This statement has the following format:
.leftmargin | .lm [[+|-] n | expression]
The parameters for the .leftmargin statement are listed below:
+ | -
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.
The optional plus sign (+) or minus sign (-) must be stated explicitly and cannot be a part of the expression.
n
The position of the new left margin of the report. The default value is discussed in Automatic Determination of Default Settings.
expression
A numeric expression that evaluates to the position of the new leftmargin of the report. All variables that are part of the expression must be preceded by a dollar sign ($).
Description
The .leftmargin statement sets the left margin of the report to a specific position or a position that is the value of a numeric expression. Subsequently, when new lines are written, new text output begins at the left margin position. To set the left margin for the entire report, place the statement in the .header report section. The .leftmargin value is also used by the .left and .center statements to determine the default position for those statements.
Report-Writer evaluates any expressions used as parameters to the .leftmargin statement during runtime.
Note: If you do not specify a left margin position, Report-Writer determines the default value for the left margin from your other specifications for the writing of the report, as discussed in Automatic Determination of Default Settings.
The value specified for the .leftmargin statement must be greater than or equal to zero (0), less than the specification for the right margin and less than the page width (as specified with the ‑l flag on the report command, or with the .pagewidth statement).
Examples
1. Have new lines begin at position 5 (the sixth character position).
.lm 5
2. Move the left margin to the right by the number of characters specified by the value of the variable width.
.lm +$width
3. Set the left margin to be the sum of the value of variable width and 3.
.lm $width+3
Last modified date: 04/03/2024