home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / wset-os2.zip / Tutorial / 3_DotCommands.ws < prev    next >
Text File  |  2003-05-15  |  5KB  |  162 lines

  1.  
  2.    Lesson 3: Dot commands
  3.  
  4. In WinWord-like wordprocessors, formatting information is held in the document ì
  5. file in binary format. Opening such a document with an ASCII editor produces ì
  6. sections containing normal text and others -- the binary parts -- containing ì
  7. nonsense. Write&Set stores the formatting information in dot commands which ì
  8. are part of the normal ASCII text. There are two different kinds of formatting ì
  9. information: print characters, which were discussed in Lesson 2, and dot ì
  10. commands.
  11.  
  12. A dot command must be inserted on a line separate from the text and must begin ì
  13. with a dot (i.e., a period) in the leftmost margin (i.e., in column 1). If the ì
  14. dot is not located in the first column, the intended dot command will not be ì
  15. treated as a dot command. Instead, it will be be treated and printed as text. ì
  16. In most cases, the dot is followed by two characters which are not ì
  17. case-sensitive. Many dot commands require a following argument. For example:
  18.  
  19. .RM50
  20.  
  21. This dot command sets the right margin to the ì
  22. value 50. You are allowed to enter spaces between ì
  23. "RM" and the number. If the line does not begin ì
  24. with a dot in the first column, the line will be ì
  25. printed as if it were part of the text; for ì
  26. example:
  27.  
  28.    .RM50
  29.  
  30. You should format and preview the file to see the ì
  31. result.
  32.  
  33. Dot commands are shown highlighted in WSedit. ì
  34. Nevertheless, dot commands consist of normal ì
  35. characters, and you can use the normal ì
  36. search/replace procedures to find and modify dot ì
  37. commands.
  38.  
  39. Not all dot commands require a parameter value. ì
  40. For example, the Page command inserts a page ì
  41. break.
  42.  
  43. .PA
  44.  
  45. A very useful dot command is the use of two dots, ì
  46. in columns 1 and 2; for example:
  47.  
  48. ..comment this won't be printed!
  49.  
  50. With the "dot dot" dot command, you can write ì
  51. comments which won't be considered part of the ì
  52. text and won't be printed. WSedit shows these ì
  53. comment lines in magenta color.
  54.  
  55. Other useful dot commands follow.
  56.  
  57. .LH8
  58. line height sets the line height to 8/48 inches. ì
  59. This is the default linespacing of a conventional ì
  60. typewriter.
  61.  
  62. .LH12
  63. means 150% of the default typewriter linespacing. ì
  64. Specifying .LH10 is a good choice for Times Roman ì
  65. 12 or Helvetica 12.
  66.  
  67. Measurement of dot commands
  68.  
  69. Many dot commands express horizontal or vertical ì
  70. distances on the printed page.
  71.  
  72. The default horizontal spacing on a page is ì
  73. specified as the spacing of a 12 point font, and ì
  74. the default vertical spacing is ".LH8". Both ì
  75. directions refer to the columns and lines of old ì
  76. typewriters. A character is considered to be as ì
  77. wide as a "Courier 12" character - the only font ì
  78. that most typewriters used; and the vertical ì
  79. measurement is the default for single-spaced ì
  80. lines. WSformat assumes 1/48 inches, so ".LH8" ì
  81. (line height) indicates a line spacing of 8/48 ì
  82. inch or 6 lines per inch.
  83.  
  84. All dot commands which allow character or line ì
  85. counts to indicate distances will also accept ì
  86. inches and centimeters.  If there are 10 ì
  87. horizontal characters per inch:
  88.  
  89. .RM 70       (indicating 70 typewriter spaces)
  90.  
  91. and is equivalent to
  92.  
  93. .RM 7.0"     (indicating 7.0 inches)
  94.  
  95. and
  96.  
  97. .RM 17.8     (indicating 17.8 cm)
  98.  
  99.  
  100.  
  101. How to find the desired dot command
  102.  
  103. In the WSformat menu bar, you will find an item ì
  104. "Command". The "Insert Dot Commands" window opens ì
  105. which helps you locate all existing dot commands. ì
  106. Press the "?" button to learn more about this ì
  107. useful dialog window.
  108.  
  109. You do not need to know the name or syntax of the ì
  110. dot commands in order to use them.
  111.  
  112. For example, to insert a line which is shown on ì
  113. top of every page ("header line"), do the ì
  114. following:
  115.  
  116. - select a WS file in WSformat (e.g., place the WS ì
  117. file icon into the dropdown field)
  118. - open WSedit with the selected WS file (simply ì
  119. press the "unform edit" button in WSformat)
  120. - click "Command" in the WSformat menu bar
  121. - open the subtree "Page Formatting"
  122. - open the subtree "Header and Footer Lines"
  123. - click to "Header Lines" (and you will see a ì
  124. short description)
  125. - push the "Insert" button
  126. - the titlebar in WSedit shows the following text: ì
  127. "Enter the text here which shall occur at the top ì
  128. of every page"
  129. - type the header line text at the cursor position ì
  130. in WSedit.
  131.  
  132. If you already have a WS file containing dot ì
  133. commands, move the mouse cursor over the dot ì
  134. command and you will get a short description. ì
  135. Double-clicking the dot command in the WSedit ì
  136. window opens the WSformat "command dialog" with ì
  137. the current dot command.
  138.  
  139. The Write&Set archive has a directory "DocuSrc", ì
  140. containing the WS source file of the WSedit and ì
  141. WSformat online help. These WS files contain many ì
  142. dot commands.
  143.  
  144.  
  145. Default values of dot commands
  146.  
  147. Every dot command which requires a parameter has a ì
  148. default value which is valid before inserting the ì
  149. specific dot command. Some of these default values ì
  150. cannot be changed, but others can be changed in ì
  151. the WSformat settings notebook. To activate the ì
  152. settings notebook, click on the WSformat menu item ì
  153. "Settings", then on "Settings Notebook". The pages ì
  154. "Format" and "Layout" show the dot command default ì
  155. values. On the "Layout" page, all vertical values ì
  156. refer to lines and all horizontal values to ì
  157. characters. If you want so see the values in cm or ì
  158. inches, select the radiobox "scale for bubble ì
  159. hint" and move the mouse over the edit field with ì
  160. the value.
  161.  
  162.