home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug173.arc / ZDE16.LBR / ZDEPROP.DZC / ZDEPROP.DOC
Text File  |  1990-06-01  |  7KB  |  139 lines

  1. ZDEPROP.DOC
  2. Proportional Spacing with ZDE
  3. June 2, 1990
  4. Carson Wilson
  5.  
  6.           1.  INTRODUCTION.
  7.           2.  USING ZDE'S PROPORTIONAL FORMATTING FEATURE
  8.           3.  INSTALLATION AND CUSTOMIZATION.
  9.  
  10.  
  11. 1.  INTRODUCTION.
  12.  
  13. ZDE version 1.6 incorporates an elemental proportional formatting 
  14. feature.  This option is useful only to those whose printers have 
  15. proportional spacing capabilities.  Proportional formatting allows 
  16. you to format ragged right text properly for proportional output. 
  17. Centering and right justification of proportional text are not 
  18. available.
  19.  
  20.  
  21. 2.  USING ZDE'S PROPORTIONAL FORMATTING FEATURE
  22.  
  23. Proportionally spaced printing gives a more professional look, 
  24. allowing more characters to be printed on a line without 
  25. crowding.  This is because less space is allocated to narrow 
  26. characters like "i" and more to wide characters like "M."  Most 
  27. computer printers do NOT allow proportional spacing; only laser 
  28. printers, some daisy-wheel equipment, and newer dot-matrix 
  29. printers have this ability.  Typically, there is a special set of 
  30. instructions which when sent to the printer, cause it to use 
  31. proportional spacing rather than monospacing.  On some models 
  32. (the Silver Reed SR550 for example), DIP switches also control 
  33. this feature.
  34.  
  35. ZDE does not itself perform proportional spaced printing; it 
  36. simply allows you to format your text for use with a printer that 
  37. has this capability.  You must instruct your printer to space 
  38. proportionally before sending text to it.  If you have tried using 
  39. the proportional capability of your printer, you probably have 
  40. noticed that LINES WITH LOTS OF WIDE CHARACTERS IN THEM 
  41. print out much wider than lines comprised of narrow characters.  
  42. ZDE 1.6 allows you to compensate for this by counting the width 
  43. of each character when it formats a paragraph (^B command), and 
  44. wrapping each line when its width count reaches the equivalent 
  45. of the current right margin setting.
  46.  
  47. The ^OJ command toggles this feature on and off [the default may 
  48. also be installed with ZDENSTAL].  When proportional spacing is 
  49. active, the legend "PS" appears in ZDE's status line (this is 
  50. overwritten by "MR" when the margins are released).  
  51. Proportional spacing occurs only during the ^B reformat command, 
  52. not during wordwrap, so to format a document proportionally, you 
  53. must use ^B at the beginning of each paragraph after you key it 
  54. in.  Still, the results are well worth the extra trouble, especially 
  55. for material that will be reproduced.
  56.  
  57.  
  58. 3.  INSTALLATION AND CUSTOMIZATION.
  59.  
  60. ZDE comes preconfigured to format text for proportional spacing 
  61. with Epson's new LQ510 dot matrix printer.  Since most printers 
  62. allocate roughly the same ratios of space to the various 
  63. characters, there is a good chance you won't need to install ZDE 
  64. for your printer.  This file has been formatted for proportional 
  65. output by ZDE; try printing it proportionally to see the results.
  66.  
  67. If you should decide to change ZDE's proportional spacing to 
  68. match your printer, you can patch ZDE's offset values for 
  69. individual characters.  The offsets are stored in a sequential 
  70. ASCII table whose location is given by ZDENSTAL's "F" option.  
  71. The table consists of positive and negative (2's compliment) byte 
  72. values, one for each character beginning with " " and going 
  73. through "~".  As distributed, all of the values are either -12, -6, 
  74. 0, +6, or +12.  The negative numbers are expressed as (256+n), 
  75. where n is the negative number.  So for example, -6 is expressed 
  76. as (256+(-6)) or 250 (FA hex).
  77.  
  78. ZDE uses its ASCII table as follows.  When reformatting a line, 
  79. ZDE counts each character as (30+table value)/30 of a column 
  80. wide.  So if the offset is zero, the character is one column wide 
  81. (30/30 = 1) and ZDE increments the current column by one.  If 
  82. the character's offset is -6, it counts as only (30+(-6)/30) or 
  83. 24/30 columns wide, and ZDE increments the current column by 
  84. only 24/30.  If the character's offset is +12, it counts as 42/30 
  85. columns wide, and so on.  When a full column is "lost" due to 
  86. characters with negative offsets, ZDE adds the next character to 
  87. the line without incrementing the column count.  Similarly, when 
  88. enough "extra" columns are counted to equal a full character, ZDE 
  89. increments its column count without actually adding another 
  90. character to the line.
  91.  
  92. To see the effects of this, try reformatting a paragraph or two, 
  93. first with PS on, then with it off.  Lines of wide characters are 
  94. shortened on screen, while lines of narrow characters are allowed 
  95. to extend beyond the right margin.  When the text is printed 
  96. proportionally, your printer reverses the process.  Lines of wide 
  97. characters are lengthened and lines of narrow characters are 
  98. shortened, the net result being proportionally spaced text with an 
  99. even right margin.
  100.  
  101. If your printer's proportional output is not properly compensated 
  102. for by ZDE, it is possible to install another offset table within 
  103. ZDE to suit your needs.  The current table's address is given by 
  104. ZDENSTAL's "F" option.  To find the location of a character's 
  105. offset, add its ASCII value to ZDE's table address and subtract 
  106. 32.  For example, the ASCII value for "A" is 65, so the location of 
  107. "A"'s offset is (table address+65-32) or (table address+33).
  108.  
  109. You may adjust a character's offset to any value between -34 and 
  110. +35 decimal, but keep in mind that offsets if less than -29 may 
  111. result in lines that _never_ reformat since characters with 
  112. offsets of -30 or less take up no virtual space or less!  To 
  113. calculate the proportional ratios used by your printer, it is best 
  114. to print out a line of thirty of each character in proportional 
  115. mode and compare the length of each line to the others.  Most 
  116. characters should result in lines of roughly the same length; this 
  117. is your "base" length, and you should set the offsets of these 
  118. characters in ZDE to 00.  Other lines will probably fall into four 
  119. or so other lengths; hopefully these lengths will correspond to an 
  120. even xx/30ths of the "base" length.  To get the proper offset 
  121. value, just subtract the number of characters equal in length to 
  122. a line of "base" characters from 30.  For example, if only 18 
  123. capital "M"'s take up the same length as 30 base characters, the 
  124. offset for "M" is 30-18 or +12.  If it takes 42 "i"'s to equal the 
  125. length of 30 base characters, the offset for "i" is 30-42 or -12.
  126.  
  127. Once you have determined the offsets in 30ths of each 
  128. character's width from the base length, just plug these values 
  129. into ZDE's proportional table.  You can use a patcher to alter a 
  130. few characters.  For extensive modification, I have provided the 
  131. assembly language file ZDEPROP.Z80 which can be assembled to a 
  132. .HEX file overlay file for ZDE.  Before assembling ZDEPROP.HEX, 
  133. you must edit the file and set the equate TABLE to the current 
  134. address of ZDE's proportional spacing table as given by 
  135. ZDENSTAL.  Then overlay ZDE with ZDEPROP.HEX using MLOAD, 
  136. SID, or DDT.
  137.  
  138. - End of ZDEPROP.DOC -
  139.