home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / jsage / znode3 / uploads / z3help43.lbr / JUST.HZP / JUST.HLP
Encoding:
Text File  |  1991-10-15  |  13.0 KB  |  259 lines

  1. ;
  2.                                    JUST.COM                                   
  3.  
  4.              Size (recs) CRC   Version    Author/Latest Issue      Disk
  5. JUST.COM       4k (32)   06A9  1.3        Gene Pizzetta 10/91      Z3COM10
  6.  
  7.   1- Syntax/Options  2- Justification Method  3- Notes                        
  8.  
  9.    JUSTIFY is a ZCPR3 version of Irv Hoff's utility  (3/8/88) to justify ASCII 
  10. and WordStar text files with many new features.  Very fast and easy to use, it
  11. makes even margins by a unique fill method that produces handsome documents.
  12.  
  13.    Based on the FILT7 program, JUSTIFY resets high bits, removes control char-
  14. acters, expands tabs,  removes trailing spaces,  eliminates orphan line feeds,
  15. and normalizes binding spaces and  soft  carriage  returns.   Soft hyphens are
  16. changed to normal hyphens at the end of the line, but eliminated elsewhere.
  17.  
  18.    Under ZSDOS or ZDDOS,  JUSTIFY will transfer the create date stamp from the
  19. source file to the new file.   If the source  file  has no  create  date,  the
  20. source file's modify date will be used instead.
  21. :1
  22.     Syntax   JUSTIFY {dir:}infile {dir:}{outfile} {{/}options}
  23.  
  24.    Everything is optional, except the source file.  If no  DIR or DU is given,
  25. the current drive and user is assumed.   If no  destination file is  given, it
  26. will have the same name as the source file, but with  a filetype of "JUS".  If
  27. an existing file has the same name as the destination file,  the existing file
  28. will be renamed to filetype "BAK".
  29.  
  30.    On error,  such  as an invalid directory or a file not found,  JUSTIFY sets
  31. the program error flag to the standard codes listed in  Z34ERR.LIB and invokes
  32. the error handler.   Even a user abort via  ^C  invokes the error handler so a
  33. pending SUB or ZEX operation can be aborted.
  34.  Options - 1/3 
  35.  
  36.    A leading slash is necessary unless the option list is the  third parameter
  37. on the command line.
  38.  
  39.      nn   Text  width.  The  width  of  the  line  (right  margin
  40.           column)   used   for   justifying.  The   default,   as
  41.           distributed, is 65.
  42.  
  43.      S    Justify lines starting  with  a  space.  If you wish to
  44.           indent the first line of each paragraph, you still want
  45.           them justified.  There are two ways to accomplish this.
  46.           Use the S option or use the  "]"  in-text  character in
  47.           the first  column  of each indented line.  The S option
  48.           requires nothing special  in  the source file; however,
  49.           if you have other lines that  are  indented  but should
  50.           not be  justified, they will be justified too.  In that
  51.           case you need to  use  a  ";"  at the beginning of each
  52.           line not to be justified.
  53.  Options - 2/3 
  54.  
  55.      L    Justify lines regardless  of original length.  Normally
  56.           lines are not justified if it would  require  more than
  57.           two spaces  between  words.  If  some  lines  need more
  58.           spaces, the L option must be used to  totally  fill the
  59.           line.  But then  even  short  lines  will be justified,
  60.           such as:
  61.                such            as            this           one
  62.           which could have been prevented by using:
  63.                ;such as this one
  64.           The ";" is dropped and  the  word "such" started at the
  65.           left margin.  If option L is not  used,  however, short
  66.           lines are  left  alone and all but the very worst lines
  67.           will be justified.  If a line is not justified, chances
  68.           are excellent that the  lengthy  word  on the next line
  69.           can be hyphenated to allow part of it to  be  placed on
  70.           the current line.
  71.  Options - 3/3 
  72.  
  73.      F    Retain embedded form feeds.  Normally, form feeds, like
  74.           all other control characters are removed from the file.
  75.           With the F option, form feeds are preserved.
  76.  
  77.      Q    Toggle quiet mode.  This  options normally puts JUSTIFY
  78.           into quiet mode.  If the quiet  flag  is  set, however,
  79.           this option will toggle back to verbose mode.
  80.  
  81.    All options may be  configured as the  defaults.   In that case the command
  82. line option will toggle the option off.
  83.  In-Text Special Characters 
  84.  
  85.    The characters must appear in the first  column of the  line  they  affect.
  86. Normally none of these special characters are required.
  87.  
  88.      )    Center this  line.  Centering  a  line  is  easy to do.
  89.           Just type the ")" right parens  character  at  the left
  90.           margin and  then  move  the line to be centered against
  91.           that character:
  92.                )This line will be centered
  93.                )So Will this one
  94.                )This too
  95.  
  96.      ]    Justify this indented paragraph.  The "]" right bracket
  97.           forces the justification  of  lines  that are indented,
  98.           when you have not selected option  S  to  justify lines
  99.           beginning with  spaces.  The bracket will be changed to
  100.           a space, so the length  of  the  line and the number of
  101.           columns intended will be kept intact.
  102.  
  103.      ;    Do not justify this line.  A semi-colon ";" in the left
  104.           column  prevents  justification  of  the  line.  It  is
  105.           probably seldom needed.
  106. :2 
  107.  Justification Method - 1/6                      Irv Hoff W6FFC - PRACSA RCPM 
  108.  
  109.    The JUSTIFY fill method differs significantly from WordStar,  Word Perfect,
  110. and other common justification algorithms:
  111.  
  112.      1. Never puts an extra "fill blank" between the first two or
  113.      last two words, unless those are required.
  114.  
  115.      2. Justifies the center of the first line, the right side of
  116.      the second line, and  the  left  side of the third line.  It
  117.      always moves in one additional word at each end to  do this.
  118.  
  119.      3. Never  puts  any  extra  blanks  in  a location where two
  120.      blanks already exist.
  121.  
  122.      4. Fills the final line  of  a  paragraph  if it is within 4
  123.      characters of normal length.
  124.  Justification Method - 2/6 
  125.  
  126.    The word  "justify"  as used in this discussion  means  "to fit exactly, to
  127. fill a full line."  Consequently, a program that justifies will fill each line
  128. to the same width, producing even margins on both sides of the  page.   To  do
  129. this with a normal typewriter or  computer  display  requires  inserting "fill
  130. blanks" (extra spaces) between words at various plaes on the line.   No matter
  131. how this is accomplished, it produces text  that  has  "holes"  in  it.   This
  132. detracts to some extent from reading that text in a normal manner.
  133.  
  134.    Adding these extra "fill blanks" in the least obtrusive manner then becomes
  135. very important.  WordStar (currently version 4.0) is by a wide margin the most
  136. popular word processor program for people  with  CP/M  computers.   Ironically
  137. this is the very worst program available with regard to adding fill blanks for
  138. justification.
  139.  
  140.    You may wish at this time to stop and read  FORMAT.INF,  included with this
  141. distribution, which goes into some depth  showing  why  this  statement is not
  142. overstated and shows examples of the  juvenile  method  WordStar  uses.  (I've
  143. been known in the past to say even a child in  Kindergarten could have thought
  144. up a better method.)
  145.  Justification Method - 3/6 
  146.  
  147.    To quickly summarize,  for  WordStar 4.0,  the  first fill  blank needed is
  148. always  placed  between the last two words on the right  side.   The second is
  149. always placed between the first two words.  Any others alternate from right to
  150. left.  This means every line not already the correct length will have an extra
  151. blank between the last  two  words.   The  worst  case would be where you need
  152. three or more additional fill blanks and the end of the  sentence is something
  153. like this:
  154.  
  155.      ...this is the end of the sentence.  I
  156.                                         ^^
  157.                                     two blanks
  158.  
  159. after justification with WordStar 4.0, the same line:
  160.  
  161.      ...this is the end of the sentence.    I
  162.                                         ^^^^
  163.                                      four blanks
  164.  Justification Method - 4/6 
  165.  
  166.    This  "worst possible case"  is not as unusual with the WordStar program as
  167. you might at first think.   Winding up  with three  sequential blanks is quite
  168. common.
  169.  
  170.    Why "yet another" program?  I started to write a new DOC file for a differ-
  171. ent program I have been working with for some time.  A comparable program with
  172. a fine DOC file already exists.   It was written via WordStar and justified to
  173. 64 columns.   In trying to read that file,  I kept getting  distracted  by the
  174. manner in which WordStar justifies its text.  I kept wanting to redo that part
  175. so I could then  read  the  text  for  content  rather  than be annoyed by the
  176. format.
  177.  
  178.    The manual did look  great,  from  a distance.  I thought my DOC file might
  179. look better if it had justified margins.  To do this I needed two things:
  180.  
  181.      1. A program that  would  insert  fill  characters in a more
  182.      logical manner than WordStar, and
  183.  
  184.      2. Since I don't use/care for WordStar, would need to obtain
  185.      another program for that purpose.
  186.  Justification Method - 5/6 
  187.  
  188.    About that time,  somebody uploaded  ALPHA20.LBR  to the local  BBS  that I
  189. operate.   It meant I could write the text  (as I am doing now) with my normal
  190. editor  (VEDIT, in my case)  and then run it through  a  format program to add
  191. justification.
  192.  
  193.    Unfortuantely that fizzled out when I found that  ALPHATXT  does not recog-
  194. nize lines already the correct length.   It  was  essentially a  program  that
  195. wants to format files and then add justification.  I then heard of  ROFF4  and
  196. later RNF13.   Both these programs are patterned  after an UNIX program of the
  197. early 80's called  RUNOFF.   They both do an excellent job of reformatting and
  198. will quit at that point if you like.   Just what I wanted.   In  fact,  as the
  199. examples in  FORMAT.INF  show,  these programs can take badly  munged text and
  200. make it into a perfectly formatted  output file.   They will  also  justify to
  201. even margins while formatting, if you wish.
  202.  Justification Method - 6/6 
  203.  
  204.    Either  was  quite  close to what I had in  mind.   However  ROFF4  doesn't
  205. properly justify lines already the proper length and thinks they are one char-
  206. acter too long.   All  these  programs  mentioned so far  have  the same fault
  207. illustrated above for WordStar  -  they can wind up with four blanks in a row.
  208. Three at  these  locations  is  commonplace.   Although  both  these  programs
  209. alternate from right side to left  side  with  fill  blanks, they always start
  210. with the last two words on one line and the first two words on the next line.
  211.  
  212.    I decided it was time I stop  "just thinking about" a program I had written
  213. in 1976 for ham radio use and adapt it to CP/M.   At that  time  I  assumed my
  214. work would be considered very elementary by  any professional programmer.   It
  215. was an interesting program that would justify conversational  messages, as you
  216. typed them, in real time, over ham radio.
  217.  
  218.    It is so very fast and so easy to use, you might even go out of your way to
  219. put out justified text, now.  (I've been using it extensively on the pre-typed
  220. messages I write for batch uploading to CompuServe.)
  221.  
  222.    By using ROFF4 or RNF13,  you  can  re-format  existing  text  files  to 72
  223. columns and then run them through JUSTIFY quite quickly and easily.  You might
  224. indeed prefer the new appearance of those files.
  225. :3
  226.  JUST Notes - 1/2 
  227.  
  228.    a. Vs 1.3 updates (9/30/91, Gene Pizzetta):
  229.       - Now checks for ambiguous filenames before doing anything.
  230.       - Made display of line-count progress  reports a configurable option.
  231.  
  232.    b. Vs 1.2 updates (9/10/91, Gene Pizzetta):
  233.       - Separate assembly without video  highlighting no longer supported, but
  234.         now uses ZSLIB HIVON and  HIVOFF instead of much larger VLIB routines.
  235.       - Since size was no longer a problem, some of the code was uncrunched to
  236.         make it more straightforward.
  237.  
  238.    c. Vs 1.1b updates (9/4/91, Bruce Morgen):
  239.       - Tweaked code and used VLIB11 (slower, but smaller when only a few 
  240.         routines are called).  
  241.       - Video-enabled version now 32 records, vanilla version now 30 records.
  242.  JUST Notes - 2/2 
  243.  
  244.    d. Vs 1.1 updates (8/31/91, Gene Pizzetta):
  245.       - Disassembled enough to change to a relocatable file. 
  246.       - Changed to Z80 opcodes to  partially  compensate  for  space  used  by
  247.         additional features.  
  248.       - Replaced some routines with library routines.  
  249.       - Removed requirement for output filename.
  250.       - Changed key options to command line entry.  
  251.       - Fixed bug that was eliminating soft hyphens at the end of a line,  not
  252.         just in the middle of the line.  
  253.       - Changed some messages to make them more descriptive.  
  254.       - Added DU support, intelligent usage screen,  error flag setting, error
  255.         handler invocation,  quiet mode,  command line column count entry, and
  256.         ZCNFG configuration.  
  257.       - Under  ZSDOS and  ZDDOS file create date stamps are transferred to the
  258.         new file.
  259.