Contents of Article


Text Margin and BOUNDS

A note about using TF/TFF and TM/TMM to format text


Syntax


TM[n]

TMM / TMM

TMM is the block form of this command.


Operands


n

The column number to which the text should be flowed. The default is the panel width. If a number greater than the current maximum record length is specified, the maximum record length is used.


Description


The Text Margin line command is used to reformat a paragraph of text to fit within a certain column range. A "paragraph" is a group of lines starting with the TM command and ending at the next blank line or the end of the file. The paragraph is made to fit into the margin by breaking it apart into "words" and reassembling the paragraph.


Text Margin is similar to Text Flow (TF) except that the way it interacts with BOUNDS is different; see the discussion below.


TM honors the existing text indent (normal or reverse) of the first and subsequent lines of the original paragraph.


Example:


    First line of paragraph 

Subsequent line of paragraph 

Subsequent line of paragraph 

Subsequent line of paragraph 

 

would be re-flowed with an initial indent of 4 columns, and no indent on the remaining lines, whereas


First line of paragraph 

    Subsequent line of paragraph 

    Subsequent line of paragraph 

    Subsequent line of paragraph 

 

would be re-flowed with no initial indent, and in indent of 4 columns on the remaining lines.


The formatting is done this to retain existing paragraph structure, and is ISPF compliant.


The Text Margin command uses a simplified definition of "words", one that is not based upon the Normal Characters for P'.' picture literals in the General Options dialog. Instead, a "word" is any string delimited by blanks or by the beginning or end of a line.


To flow text within a single paragraph:

    1. Type TM in the line command area of the line at which you want the text to begin flowing. If you want to specify the rightmost column position for the restructured text, type a number greater than 1 immediately after the TM command.
    2. Press Enter.
    3. The text is flowed from the beginning of that line to the end of the paragraph.



You can use Text Margin to format multiple paragraphs with a single SPFLite interaction:

    1. Type TMM in the line command area of the first line of the first paragraph at which you want the text to begin flowing. If you want to specify the rightmost column position for the restructured text, type a number greater than 1 immediately after the TMM command.
    2. Type TMM in the line command area of the last line of the last paragraph at which you want the text to begin flowing. If you want to specify the rightmost column position for the restructured text, and did not specify this in step (1) above, you can type a number greater than 1 immediately after the second TMM command here. As with all block-mode commands, it is unnecessary but possible to specify a number both places, but if this is done, they must agree.
    3. Press Enter.
    4. The text is flowed from the beginning of the first line of the first paragraph to the end of last line of the last the paragraph. The spacing between paragraphs is preserved.

 

Text Margin and BOUNDS


TM is affected by the current BOUNDS setting:


    • When BOUNDS is defined as 1 bb then TM without a n value is treated the same as if the command were specified as TMbb. When lines are reformatted into paragraphs, the right-hand margin of lines will be aligned so that they are as long as possible without the column margin exceeding a width of bb characters on any given line.


    • When BOUNDS is defined as 1 MAX then TM without a n value is treated the same as if the command were specified as TMww, where ww is the current screen width. When lines are reformatted into paragraphs, the right-hand margin of lines will be aligned so that they are as long as possible without the column margin exceeding a width of ww characters on any given line.


    • TM with a n value respects the n value. When lines are reformatted into paragraphs, the right-hand margin of lines will be aligned so that they are as long as possible without the column margin exceeding a width of n characters on any given line. The current contents of the BOUNDS value is ignored when an n value is present on the TM command.


Regardless of any bounds values in effect, TM/TMM will place its results between column 1 and the right-most margin column as determined above, even if the current left bound of any BOUNDS command in effect would be incompatible with this understanding.


It is important to note that TM will inquire as to the state of BOUNDS at the time, but the results it produces are not restricted to the BOUNDS column range in effect at the time. In particular, regardless of the current BOUNDS setting, you will not get an error message similar to "TF right bound specified, but global BNDS are set. TF abandoned" that can sometimes occur with Text Flow.


See TF / TFF - Text-Flow a Paragraph and Word Processing Support for more information.


A note about using TF/TFF and TM/TMM to format text


The Text Flow command TF/TFF and the Text Margin command TM/TMM use a simplified definition of "words". A "word" is any string delimited by blanks or by the beginning or end of a line. It is not necessary to change the definition of the WORD string or the Normal Characters string for these commands to work correctly.