Using the Commands in Texts and Forms

Since BOX, POSITION, and SIZE are text commands, you can insert them directly in a text. However, usually you use these commands in forms, where you have better control of how a box or line and the accompanying text fit together. SAPscript does not automatically fill text into a box or otherwise orient text with respect to these graphical elements.

Enter the following line as a command in text in a SAPscript document. The command draws a box of 17.5 CM length, 1 CM high, with 10% shading:

/: BOX WIDTH '17.5' CM HEIGHT '1' CM INTENSITY 10

The left upper corner of the box is located at the left upper corner of the main window defined in the form of the document. The text that you type in is not automatically oriented in accordance with the box. Whether the text fits in the box or not depends on you. If you type in three lines of text, then the bottom line of text is likely to appear below the bottom of the box.

In a form, you can orient both text and graphical elements in the windows that you define. You therefore have much better control of how graphics and text fit together.