home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / pep13.zip / CHAPT16.TXT < prev    next >
Text File  |  1992-12-17  |  20KB  |  372 lines

  1. <Chapter 16:  Hints, Tricks and Warnings>
  2.      In designing PEP, we have put a great deal of emphasis on
  3. flexibility. We have tried as much as possible to divide PEP's
  4. functionality into elementary features that you can control independently
  5. and combine to accomplish a wide variety of drawing goals. We have tried
  6. not to prejudge what your drawing tasks might be, or limit how you might
  7. combine PEP's features to accomplish them.
  8.  
  9.      But this flexibility carries a cost with it. Sometimes, to accomplish
  10. a simple thing it is necessary to change several settings, and the best
  11. approach to a given problem is often not obvious at first. In the
  12. preceding chapters, we have discussed, one by one, the individual
  13. functions that PEP offers. Here we give a few examples of how to use these
  14. features, especially in combination, to solve particular problems.
  15.  
  16. <Section 16.1:  How to Center Text>
  17.      In PEP, centered text is positioned between the left edge (L) and the
  18. right edge (R) of the text label box. If you want to produce centered
  19. text, first determine the coordinates L and R that you want to center the
  20. text between. Insert the text label at the left edge coordinate L. Then,
  21. in the MODIFY menu, change the following three properties of the text
  22. label. Use the JUSTIFY command <[4.13]> to set the justification to
  23. CENTER. Use the BOX command <[4.15]> to set the box mode to FIXED.
  24. Finally, use the WIDTH command <[4.16]> set the box width to (R - L), the
  25. distance between the left and right edges that you have chosen. <[FIG11]>.
  26.  
  27.      If you are inserting several centered labels, you may want to start
  28. by setting the justification, box mode, and width in the G-DEFAULTS menu
  29. <[10]>. Then you do not to have to modify each text label individually.
  30. The use of the words "left" and "right" above assumes that the text is not
  31. rotated, but the same principles apply to centering text in any rotation.
  32.  
  33. <Section 16.2:  How to Copy from One Object to Another>
  34.      Copying material within an object is easy: just use MODIFY/DUPLICATE
  35. <[4.2]>. If you are copying several elements, you may want to first use
  36. the COLLECT menu <[5]> to group the elements together, rather than copying
  37. each element individually.
  38.  
  39.      To copy material from one object to another, you need to know a
  40. trick. If you want to copy from object A to object B, first use
  41. OBJECT/OPEN <[7.1]> to display object A. Then delete the material you want
  42. to copy. (If you are copying many elements, you may want to use
  43. COLLECT/DELETE <[5.9]> to do this.) Next, open object B for editing,
  44. without closing object A. Use UN-DELETE <[3.1]> to insert the deleted
  45. material into object B. Because you did not save your changes to object A,
  46. this material is now present in both objects. The un-deleted material
  47. occupies the same position in object B that it occupies in object A. Use
  48. MODIFY/MOVE <[4.1]> if you need to reposition it.
  49.  
  50.      If objects A and B are not in the same file, proceed as follows.
  51. First, use FILE/LOAD <[8.2]> to load the file containing object B. Then
  52. use OBJECT/IMPORT <[7.8]> to copy object A into that file. Now that both
  53. objects are in the loaded file, you can use the trick described above to
  54. copy the material from A into B. Finally, use OBJECT/ELIMINATE <[7.6]> to
  55. remove, from the loaded file, the definition of object A, which you no
  56. longer need.
  57.  
  58. <Section 16.3:  Keeping Notes>
  59.      Sometimes you will make changes to your standard configuration of PEP
  60. when you are creating a picture. For example, you may install a different
  61. collection of fonts, or a different pattern file, or you may change the
  62. printer rotation to print sideways (landscape) rather than right side up
  63. (portrait). You will probably want to remember these changes in case you
  64. need to edit or print that picture again. The easiest way to do this is to
  65. create a separate object in that file, giving it the name NOTES. You can
  66. then type into that object, as text labels, all the relevant PEP settings,
  67. and any other information that you think you might need later when editing
  68. or printing the pictures in that file.
  69.  
  70. <Section 16.4:  Hidden Object Names>
  71.      A complex PDL file may contain a large number of different objects.
  72. It will often happen, however, that many objects in a file are seldom
  73. directly referred to. Once created, they are not re-edited, and they
  74. appear only as components of other objects. It is therefore convenient to
  75. split the menu of all object names into two parts, those objects
  76. frequently used, and the ones that are seldom referred to. You can
  77. accomplish this by using hidden object names.
  78.  
  79.      If you give an object a name beginning with the tilde character (~),
  80. that object becomes hidden. It does not appear directly in the menu of
  81. object names. Rather, that menu contains a single entry, ~HIDDEN, that
  82. represents all of the hidden objects. If you select this menu item, a
  83. second menu appears containing the names of just the hidden objects. In
  84. this way, you can select a hidden object if you wish, but the hidden names
  85. will not appear unless specifically requested.
  86.  
  87.      To hide an object name, add the tilde character to the start of the
  88. name using either OBJECT/CLOSE <[7.2]> or OBJECT/RENAME <[7.3]>. To
  89. un-hide the object, remove the tilde with OBJECT/RENAME.
  90.  
  91. <Section 16.5:  Navigating Tricks>
  92.      If you are editing a large object and need to move the active
  93. graphics window from place to place in that object as you edit, you can
  94. accomplish this by simply using the shift NumPad keys. However, there are
  95. other techniques that are often more convenient.
  96.  
  97.      If you have another graphics window in total page mode, you can
  98. position the active window using this second window for reference.
  99. Position the cursor at a selected point in the total window, and use ALT-L
  100. <[14.3.9]> or ALT-U <[14.3.16]> to move the active window display. The
  101. result is that the center (or upper left corner) of the window is
  102. positioned at the selected point.
  103.  
  104.      Alternatively, you can temporarily set the active window to total
  105. page mode (ALT-T ALT-T <[14.3.15]> will do this), select a point in the
  106. active window, and use ALT-L or ALT-U as above to position the window at
  107. that point. The former window stretch values (temporarily overridden when
  108. you set total page mode) are restored to their correct values by these
  109. window positioning commands.
  110.  
  111.      If you are editing at one point in the object, and for accuracy you
  112. want to expand the magnification (ALT-E <[14.3.3]>) or go into fatdots
  113. mode (ALT-F <[14.3.4]>), by doing so you may move the relevant point out
  114. of the active window. To prevent this, begin by setting the jump location
  115. at that point via the ALT-J command <[14.3.8]>, then use ALT-E or ALT-F as
  116. required, and finally use ALT-M <[14.3.10]> to move the active window so
  117. that the selected point is once again on view.
  118.  
  119. <Section 16.6:  How to Edit a Font File>
  120.      It is possible in PEP to add new characters to a font and to edit the
  121. shapes of existing characters. A font file is essentially a PDL file like
  122. any other, except that the objects in the file (that is, the characters)
  123. do not have object names. Normally, the absence of object names would make
  124. it impossible to open and close the objects in this file, but PEP provides
  125. a trick to overcome this difficulty.
  126.  
  127.      To edit a font, first use FILE/EXTENSIONS/LOAD <[8.5.1]> and
  128. FILE/EXTENSIONS/SAVE <[8.5.2]> to change the extensions used when loading
  129. and saving picture files. Change both extensions from PDL to FON. Then use
  130. FILE/LOAD <[8.2]> to load the font file that you want to edit. Whenever
  131. the loaded picture file has the extension FON, the behavior of OBJECT/OPEN
  132. <[7.1]> and OBJECT/CLOSE <[7.2]> is changed. To open an object in a FON
  133. file, instead of specifying an object name, you either type in its
  134. numerical ASCII code or type a single or double quote followed by the
  135. character that you want to open. To open the upper case A character, for
  136. example, you could type any one of the following. (65 is the ASCII code
  137. for upper case A.)
  138.  
  139.   65
  140.   'A
  141.   "A
  142.  
  143.      These will open the upper case A from subset 0 of the font, the
  144. subset containing the normal style characters. To open a character from a
  145. different style subset, you can add 128 times the subset number to the
  146. ASCII code, or precede the character by the subset number and a colon. To
  147. open a bold italic lower case b, for example, any of the following will
  148. work (98 is the ASCII code for lower case b and subset 3 contains the bold
  149. italic characters):
  150.  
  151.   482
  152.   3:98
  153.   3:'b
  154.   3:"b
  155.  
  156. The same formulas apply when using OBJECT/CLOSE to close a new or
  157. modified character.
  158.  
  159.      If you are creating new symbols for a font, instead of replacing
  160. existing characters you might prefer to add the new symbols to an unused
  161. font subset. The BEAMOF font contains only normal style characters (subset
  162. 0); new symbols added to it could be placed in the italic set (subset 1),
  163. for example. Before creating a new symbol, you should first examine an
  164. existing character to determine the base line coordinate, the line styles
  165. used, and so forth. You will probably want your new symbols to be
  166. compatible with these values.
  167.  
  168.      When you have finished making all your changes to the font file, use
  169. FILE/SAVE to save it back to disk. Then use FILE/EXTENSIONS/LOAD and
  170. FILE/EXTENSIONS/SAVE once more to set the picture file extensions back to
  171. PDL.
  172.  
  173.      You are now ready to use the font that you have just edited. After
  174. saving the font file, you can use the SETUP/INSTALL menu <[12.5]> to
  175. install that font into PEP. If you changed a font that was already
  176. installed, you must nevertheless re-install the font after saving the
  177. changed font file to disk. Then the changed version will be available for
  178. you to use.
  179.  
  180.      The fonts supplied with PEP contain some extra information that is
  181. used when scaling characters to maintain the symmetries in certain
  182. characters, to preserve equal stroke weight and equal serif length across
  183. the entire font, and to improve the appearance of the characters in a
  184. variety of ways. This extra information cannot be edited graphically. If
  185. you add new characters to a font this extra information will be preserved.
  186. If you modify the contents of a character, however, this information may
  187. be lost. We recommend that you not modify the contents of the characters
  188. in the PEP fonts, but if you do, be sure to keep a backup copy of the
  189. original font.
  190.  
  191.      There are some restrictions that you should know on the kinds of
  192. elements that can appear in the character objects that make up a font. You
  193. should not use colors (other than FOREGROUND) in drawing a character. When
  194. PEP uses that character in a text label all color information is ignored.
  195. You should also not use pattern fills in a character, although solid
  196. filled regions are legal. Most importantly, you should never include a
  197. text label within a character. It is illegal for a character in a font to
  198. contain text labels among its elements. If you insert text into a
  199. character while you are editing a font file, it may cause a fatal error
  200. later when you try to install or use that font.
  201.  
  202. <Section 16.7:  Printing an Old Picture on a New Printer>
  203.      PEP pictures are device independent. You can print them at any size
  204. and in any proportions on any supported output device. So if you have
  205. created a picture to print on printer A, and now you want to print it on
  206. printer B and produce a picture of the same size and proportions, that
  207. must be possible. But how exactly do you do it?
  208.  
  209.      One approach is physically to measure the output from printer A and
  210. use the PRINT/IMAGE command <[6.9]>. This is a nuisance if you have many
  211. pictures to print. Here is an easier way which is also more accurate.
  212.  
  213.      First you have to know the printer resolutions. You can find the
  214. resolution of your installed printer by using the SETUP/NUMBERS/INCH
  215. command <[12.4.5]>. Say for example, that printer A is a 300 dot per inch
  216. LaserJet and printer B is an Epson FX80 in HI-RES mode. The Epson
  217. resolutions are 120 dots per inch horizontally and 144 vertically. Set the
  218. printer stretches to 120/300 in the X direction and 144/300 in the Y
  219. direction. See <[FIG15]>. In other words, the stretches are the new
  220. printer resolution divided by the old printer resolution. Now any object
  221. printed on printer B will have the same overall size as if it had been
  222. printed on printer A with unity stretches.
  223.  
  224.      Note: if you were printing in a landscape orientation, for example 90
  225. degree rotation, you would set X to 144/300 and Y to 120/300.
  226.  
  227. <Section 16.8:  Creating a Slide Show>
  228.      You can use PEP's configuration file capability to create slide
  229. shows. Configuration files are just recorded sequences of keystrokes. When
  230. PEP is first loaded (or is restarted) it executes the commands in its
  231. configuration file just as if they had been typed in from the keyboard.
  232. Thus anything you can do in PEP can be included in a slide show, but
  233. everything must be done from the keyboard; mouse motions are not recorded
  234. in configuration files.
  235.  
  236.      To create a slide, first use QUIT/MAKEFIG <[9.3]> to start the
  237. creation of a configuration file. Then execute any set of PEP commands to
  238. produce the screen image you want to use for your 1st slide. Then press
  239. ALT-H <[14.3.6]>. Next execute more commands to produce the 2nd slide and
  240. press ALT-H again. Repeat this process once for each slide, and finally
  241. press ALT-Z <[14.3.19]> to save the slide show file to disk.
  242.  
  243.      The ALT-H commands insert pause instructions into the configuration
  244. file. These are needed because keystrokes are read out of the slide show
  245. file much faster than they were typed in. It is the pause instruction
  246. which stops PEP execution long enough for the slide to become visible.
  247. Typing any key will end a pause.
  248.  
  249.      To run a slide show, use the /F and /P command line options when you
  250. load PEP. The /F option identifies the configuration file to use and the
  251. /P option specifies the length (in seconds) of the pause whenever an ALT-H
  252. is encountered in the file. If the /P option is omitted, then PEP will
  253. wait after each slide until the user presses a key on the keyboard.  For
  254. example, the command line:
  255.  
  256.      PEP /F=SHOW /P=2
  257.  
  258. loads PEP, executes the configuration file SHOW.FIG, and pauses for 2
  259. seconds whenever an ALT-H is encountered in that file.
  260.  
  261.      One simple way to construct a slide show is to draw the slides as a
  262. sequence of objects in a PDL file. Then create a slide show configuration
  263. file that loads that PDL file and opens each object in succession with a
  264. pause after each.
  265.  
  266.      You can make a slide show that will repeat indefinitely by ending
  267. your configuration file with the QUIT/RESTART command <[9.4]> and
  268. selecting the new configuration file as the one to restart with.
  269.  
  270.      Configuration files contain only the standard printing ASCII
  271. characters, so that if you want to make small changes to a slide show, you
  272. may be able to do this more easily with a text editor than by re-creating
  273. the file in PEP. Certain keys are represented by a sequence of three
  274. characters, an underscore, and two others. Thus pressing the up-arrow
  275. while creating a configuration file inserts the three characters "_up"
  276. into the file. Pressing F1 inserts "_f1". Below is the complete list of
  277. the underscore sequences that may appear.
  278.  
  279.   _bs = backspace
  280.   _bt = tab
  281.   _ff = form feed
  282.   _es = escape
  283.   _us = underscore
  284.   _up = cursor up
  285.   _dn = cursor down
  286.   _lf = cursor left
  287.   _rt = cursor right
  288.   _hm = cursor up left (home key)
  289.   _en = cursor down left (end key)
  290.   _pu = cursor up right (pgup key)
  291.   _pd = cursor down right (pgdn key)
  292.   _g+ = auto-motion (grey +)
  293.   _g- = step size toggle (grey -)
  294.   _g* = stretch cursor corner (grey *)
  295.   _bk = break
  296.   _tb = backtab
  297.   _in = insert
  298.   _de = delete
  299.   _f1 = function key F1
  300.   _f2 = function key F2 etc.
  301.   _fa = function key F10
  302.   _x1 = ALT+function key F1
  303.   _x2 = ALT+function key F2 etc.
  304.   _aa = ALT+letter A
  305.   _ab = ALT+letter B etc.
  306.   _wu = window up (shift up)
  307.   _wd = window down (shift down)
  308.   _wl = window left (shift left)
  309.   _wr = window right (shift right)
  310.   _wh = window up left (shift home)
  311.   _we = window down left (shift end)
  312.   _w9 = window up right (shift pgup)
  313.   _w3 = window down right (shift pgdn)
  314.  
  315. <Section 16.9:  Postscript Output>
  316.      Most printers supported by PEP are bitmap devices. Each pixel printed
  317. is individually specified by PEP. Postscript printers are the exception to
  318. this rule. With Postscript, you have two options. When you install PEP,
  319. you can elect to use your Postscript printer as a bitmap device like any
  320. other printer, or you can choose to communicate with it at a higher level
  321. via the Postscript language <[17.2]>.
  322.  
  323.      The advantages of choosing the Postscript language option are that
  324. printing is normally faster in this case, and you gain access to the
  325. standard Postscript fonts. There are additional advantages if you plan to
  326. output pictures to files in the encapsulated Postscript (EPS) format.
  327. Using EPS files you can incorporate pictures drawn in PEP into documents
  328. created by many word processors and page layout programs. These EPS files
  329. will typically be shorter if the higher level option has been selected,
  330. and the picture will scale more smoothly when it is combined with other
  331. material in a document. You can enable encapsulated Postscript output by
  332. using the PRINT/DEVICE/OUTPUT command.
  333.  
  334.      However, if you output via Postscript, there will be some differences
  335. between the screen display of a picture and its appearance when printed.
  336. There are certain limitations in the translation from PEP's internal PDL
  337. representation into the Postscript language, and you should be aware of
  338. these. The following discussion assumes that you have selected the
  339. Output-Postscript option when you installed PEP. If you chose the
  340. Output-Bitmap-Graphics option, these restrictions do not apply.
  341.  
  342.      Each PEP font number is assigned to a distinct Postscript font. This
  343. assignment is fixed and independent of the PEP font also assigned to that
  344. number. Using the SETUP/INSTALL/FONT commands <[12.5.1]> will not effect
  345. the fonts used when printing to Postscript. The table below lists the PEP
  346. font numbers to be used when accessing the various Postscript fonts.
  347.  
  348.   Font 0   Times
  349.   Font 1   Helvetica
  350.   Font 2   ZapfChancery
  351.   Font 3   Bookman
  352.   Font 4   Palatino
  353.   Font 5   AvantGarde
  354.  
  355.      PEP will adjust the character spacing of these fonts to guarantee
  356. that each text label retains its correct label width when printed in
  357. Postscript. To override this correction and employ the native font metrics
  358. of the Postscript fonts, use the PRINT/DEVICE/TEXT-MODE command.
  359.  
  360.      Postscript pattern fill is accomplished by using halftone screens.
  361. Each PEP pattern number corresponds to a unique combination of size and
  362. spacing parameters for the halftone dots. Using the SETUP/INSTALL/PATTERNS
  363. <[12.5.2]> command does not change the Postscript pattern produced by a
  364. given PEP pattern number.
  365.  
  366.      Finally, the Postscript language does not support the range of
  367. nibtypes that can be used when drawing lines in PEP. We recommend that,
  368. for Postscript output, you use only the point and ellipse nibs. Note that
  369. the graphics libraries supplied with PEP often employ nibtypes not
  370. supported by Postscript. In some cases, objects from these files will not
  371. be faithfully reproduced when translated into Postscript.