home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol062 / kformat.doc < prev    next >
Encoding:
Text File  |  1984-04-29  |  5.4 KB  |  127 lines

  1. .re ++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. .remark     THIS IS A REMARK LINE.
  3. .remark     Remarks are left as is and are useful for
  4. .remark     the writer of the document.
  5. .re ++++++++++++++++++++++++++++++++++++++++++++++++++++
  6. .in 10          * set the normal left indent at column 10
  7. .rm 70          * set the right  margin at column 70
  8. .sf             * justify by space filling lines
  9. .he '         FORMAT (Text Output Processor) description
  10. .fo '                                                           Page #
  11. .sp 3           * space 3 lines
  12. .ce 2           * center the next two lines
  13. The FORMAT text processor
  14. -------------------------
  15. .ti +4          * set a temporary indent 4 columns to the right of indent
  16. FORMAT is a text processing system.  It is invoked as:
  17. .sp 2
  18.         FORMAT <infile name> <outfile name>
  19. .sp 2
  20. This means accept text with imbedded commands from file name
  21. <input-file> and send the processed text to <output-file>.  These files
  22. are normally CP/M disk files however if the output file is specified
  23. to be: LST: or CON: then the output is sent to the List device
  24. (printer), or the Console device (crt) respectively.
  25. An example invocation is:
  26. .sp 2
  27.         FORMAT MYLETTER CON:
  28. .sp 2
  29. .ti +4
  30. The processor accepts several commands to permit control of margins,
  31. spacing, indentation, centering, underlining, and to simply pass
  32. thru text.  In addition it allows both a header title at the beginning
  33. of each page and a footer title at the bottom of each page.  These both
  34. default to an empty line.
  35.  
  36. .ti + 4         * NOTE * the plus sign is spaced from the number 4 *
  37. Each command consists of 3 characters in the leftmost column and
  38. (in most cases) an optional parameter.  Parameters are strings
  39. in the case of header and footer titles and numbers in all other
  40. cases.
  41.  
  42. .ti +4
  43. In the header and footer strings, leading spaces are ignored
  44. and all occurrences of # are replaced in the output text
  45. by the current page number.  If the first non space or tab
  46. character in a header or footer string is " or ' it will be
  47. discarded, this is a means to allow leading spaces in the string
  48. since all spaces after the " or ' are significant.
  49. .bp
  50. .ti +4
  51. The numeric parameters can be in one of two forms,
  52. an absolute number sets the associated to that number or if
  53. out of legal range, to its limit.  A signed (+ or -) number
  54. sets the parameter to its current value + or - the value of the
  55. number.  This allows setting for example a paragraph indent
  56. margin to be inset from the normal indent without being required
  57. to remember where the current indent is set.
  58.  
  59. .ti +4
  60. The default mode is "fill" i.e.  fit as many words as possible
  61. on a line to fill out the line width, however any input lines of
  62. text which start with space or tab maintain that number of 
  63. columns of leading space.  In any case these lines with leading
  64. whitespace cause a "break" i.e. they cause the following text to
  65. begin on a new line.  Several commands also cause a break (see
  66. table of defined commands).
  67.  
  68. .ti +4
  69. In the function categories the lines referred to in centering
  70. and underlining are input lines, therefore
  71. to cause a single word to be underlined, for instance, simply
  72. place it on a separate input line.  Likewise, to avoid the need
  73. to count lines, centering and underlining may be made continous
  74. by setting the number of lines to something huge
  75. e.g.  4000 until it is wished to disable them again at which
  76. point specifing 0 will cause an immediate disable.
  77.  
  78. .ti +4
  79. The FORMAT program does not recognize the tab character (ASCII
  80. 9), therefore, use the PIP program to expand tabs in the
  81. original text before running it through FORMAT.  For example to
  82. expand tabs to every eighth column in the file OLDLTR execute
  83. the following:
  84.  
  85.         PIP NEWLRT=OLDLTR[T8]
  86.  
  87. The file NEWLRT is now ready to be processed by FORMAT.  Of
  88. course since you have the source code to the Pascal version of
  89. FORMAT you could also incorporate the ability to have FORMAT
  90. expand tabs as it reads the input file.
  91. .bp
  92. .remark +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  93. .sp 2
  94. .ce 2
  95. List of defined commands
  96. ------------------------
  97. .sp 4
  98. .nf             * justify off
  99. .rem
  100. .rem
  101.  Command    Function                    Default         Break
  102.  -------    --------                    -------         -----
  103.  .bp n      begin page numbered n       n = +1          yes
  104.  .br        cause a line break                          yes
  105.  .ce n      center the next n lines     n = 1           yes
  106.  .fi        enable line filling                         yes
  107.  .sf        justify by space filling                    yes
  108.  .nf        justify off                                 yes
  109.  .fo s      set footer title to s       empty           no
  110.  .he s      set header title to s       empty           no
  111.  .in n      indent n spaces from        n = 0           no
  112.              from left margin.
  113.  .ti n      set temporary indent to n   n = 0           yes
  114.  .rm n      set right margin to n       n = 60          no
  115.  .ls n      set line spacing to n       n = 1           no
  116.  .pl n      set page length to n lines  n = 66          no
  117.  .sp n      space n lines               n = 1           yes
  118.  .ul n      underline the next n lines  n = 1           yes
  119. .rem
  120. .rem
  121. .sp 2
  122. .ti -6
  123. note:
  124. underlining works only for printers which can back up the print
  125. head one char position at a time.
  126. .bk
  127.