home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / textutil / jgpsuite / Docs / JGPCopyDoc < prev    next >
Encoding:
Text File  |  1993-04-19  |  12.5 KB  |  282 lines

  1. .//        Source of !ClickJGPC in !jgcopy
  2. .sp 0      Comment out this line (.//) for paged output
  3. .hd
  4. /.col
  5. |JGPCopy and Handler v1.20|Fri,03 Jul 1992
  6.  
  7. /
  8. .ft
  9. /
  10.  
  11. .col
  12. |-\p-
  13. /
  14. .marg 2 79
  15. .ht 15
  16.  
  17. .\ \Q
  18. .col
  19. |JGPCopy
  20. .col
  21. |================
  22. .usel base
  23.  
  24. This Document and all files in !jgp and !jgpcopy are (C) JGLaski, 1993. A Free
  25. license is given for this document and all files in !jgpcopy on condition that
  26. every reasonable effort is made to pass it on and bring it into use, and that no
  27. modifications are made to any file, other than bracketted and acknowledged
  28. extensions and corrections.
  29.  
  30. This document is not a specification of the programmes it describes, and no
  31. warranty is given that they work as described herein, nor any responsibility
  32. assumed for any consequence of their use.
  33.  
  34. It is, of course, my practice to develop the code both for reasons of discovered
  35. bugs and worthwhile new ideas, and also to take reasonable care to make sure
  36. that the code is free from non\-trivial bugs.
  37.  
  38. .col
  39. |-oOo-
  40.  
  41. The tool JGPCopy is supplied both as part of the the !jgp suite, and on its own
  42. within the !jgpcopy application. Its purpose, roughly, is to type any file
  43. either to the screen or dump it, paging as it goes, or pass it to the printer.
  44. It releases the processor, when it does not need it, to any other programs that
  45. are running in the desktop. To Screen, it engages the whole screen for its
  46. display and seeks to purge a file of any printer codes. Its run may always be
  47. cancelled part way through, as documented on the screen. It can also dump the
  48. file to screen, and, if required, spool that dump to a file.
  49.  
  50. If printer codes are included in the file to move the printhead, JGPCopy cannot,
  51. in general, understand them when copying to screen; however, if it believes a
  52. code to be a horizontal motion, it will insert a space. The effect, in practice,
  53. is to separate words by a space, and move margins, tabs and colled fields to the
  54. left. Of course, if the JGPCopy file has been JGPrinted with a screen
  55. configuration such as Default, JGPCopy will reproduce the original effects.
  56.  
  57. .col
  58. |-oOo-
  59.  
  60. The application !jgpcopy provides a handler to users of the tool JGPCopy,
  61. the final program available in the suite !jgp. JGPCopy will be applied, under
  62. either handler, to a file of type JGPCopy when double clicked. (Currently (9/91)
  63. JGPCopy is &205, but I expect a change shortly. It should be sufficient to
  64. edit the numbers in the !jgpcopy.!boot file, the !sprites file and the Templates
  65. file; I do not believe any code will require change.) Any file, of whatever
  66. type, dragged to a JGPCopy icon on the icon bar will also have JGPCopy applied
  67. to it.
  68.  
  69. !jgpcopy will only register its icon if !jgp has not been encountered, and
  70. double clicking on !jgp will cause the icon from !jgp to supersede it; any
  71. JGPCopy runs will continue unaffected under the new management. Under !jgp,
  72. both means of applying JGPCopy remain available, but, to get a JGCopy icon on
  73. the bar, you must first choose jgpcopy in the icon bar's menu; the icon
  74. mutates back to a JGEd icon after use.
  75.  
  76. (To test !jgpcopy, if you have also got !jgp, quit in the !jgp icon in the
  77. icon bar and also UNSET jgp$dir. Then double-click on !jgpcopy. You will have
  78. lost access to JGEd, JGPrint and JGConfig. Double clicking on !jgp will restore
  79. !jgp without !jgpcopy. There is a bug, and you should exit !jgpcopy before
  80. double clicking on !jgp)
  81.  
  82. .col
  83. |-oOo-
  84.  
  85. Through its menus, JGPCopy is virtually self\-documenting. For each file
  86. submitted to JGPCopy (whether by double clicking a JGPCopy file or by dragging
  87. any file to the JGPCopy icon bar icon) an icon with that file's name will be
  88. entered on the icon bar, and clicking menu on this icon opens the main menu
  89. controlling what happens to it. If you are using JGPCopy within !jgp, selecting
  90. jgpcopy from JGEd's icon bar icon menu mutates the JGEd icon until a file is
  91. dragged to it. Double clicking on a JGPCopy file opens the menu near your
  92. pointer.
  93.  
  94. To Screen, To Dump, and To Printer are the principal choices, and Options
  95. provides a submenu to control how this is done.
  96.  
  97. +Quit and +Delete file are two options that apply to both choices; if you stop
  98. printing or quit copying before the end, they will not apply. <nl> -> <cr>,
  99. default ticked, enables C type files to be correctly handled. If you want <10>
  100. to be interpreted as a downtab without carriage return, untick it.
  101.  
  102. For To Screen, the most important option is Mode. Clicking on the blue arrow in
  103. the mode window cycles 16 colour modes; I find 12, 20 and 16 the most useful.
  104. The other option is concerned with how to treat printer codes found in text.
  105. There is a choice between assuming Epson style, assuming HP style and printing
  106. characters from codes. Bytes 0-31 are interpreted if their function is to move
  107. the screen cursor, otherwise replaced by a space.
  108.  
  109. The text is paged to the screen; a special line at the bottom of the page tells
  110. you how to continue or quit.
  111.  
  112. For further details of how codes are scythed from the text see below.
  113.  
  114. .col
  115. |-oOo-
  116.  
  117. The JGPCopy files produced by JGPrint are closely analogous to the Printout
  118. files(FF4) produced by !Printers, and, with care, can be used interchangeably.
  119.  
  120. JGPCopy uses JGPrSlave to actually do the printing, but the arrangements are
  121. very different in !jgpcopy and !jgp.
  122.  
  123. In !jgpcopy JGPrSlave is a direct slave of JGPCopy without involving !printers.
  124. Multi\-tasking is not available, and you must ensure that other sources of
  125. printing do not conflict with this use of the printer.
  126.  
  127. More flexibility is provided in !jgp; alias$@Printtype_205 is set to
  128. .....!jgp.Runimage 4. If JGPCopy sends appropriate messages to !Printers, or a
  129. JGPCopy file has been dragged to !printers, !printers can queue the printer
  130. request and JGPrSlave will print it.
  131.  
  132. In the option menu of !jgp, you can choose whether or not JGPrSlave should
  133. attempt to multitask; you can request JGPrSlave to pause, and you can stop
  134. JGPrSlave.
  135.  
  136. JGPCopy files produced by JGPrint may, if requested in the initial dialogue,
  137. contain the pseudo printer directive <esc><esc>, which will cause JGPrSlave to
  138. put up a verso window to enable paper to be turned round, or directives
  139. <esc>0<n> at the beginning of Page <n>, to enable a pause for each page to be
  140. set in the printer. In both !jgp and !jgpcopy, these will set JGPrSlave to
  141. multitask.
  142.  
  143. These pseudo directives have been chosen, as far as possible, not to affect the
  144. printer and not to pre/-empt existing printer directives.
  145.  
  146. For files produced by JGPrint to be used via a !Printers' printer, there must be
  147. consistency between the configuration used in JGPrint and that printer. In the
  148. paragraphs below, printer signifies a !Printers printer.
  149.  
  150. There are three matters to consider: initialising printer-code; printer X & Y
  151. offset; character mapping.
  152.  
  153. A JGPCopy file has its own printer initialisation code at its head. !Printers
  154. will precede this by its own initialisation code. It is necessary that the
  155. former cancels any effects of the latter that will precede it. In effect, the
  156. init code in the JGPrint configuration file should start by a printer code to
  157. set the printer state to its default values. (Epson is <esc>@, HP is <esc>E.)
  158.  
  159. If you have set printer Y offset non-zero, the effective pagelength will be
  160. reduced by the amount set; use the config size skiplength to apprise JGPrint of
  161. this reduction. If you have set X offset non-zero, you may have to adjust your
  162. margins, and you may not be able to print as wide a text as JGPCopy will permit
  163. directly.
  164.  
  165. If the printer has defined a character mapping for top-bit set characters, it
  166. may transform bytes sent by JGPCopy. This may be significant in two contexts: if
  167. the JGPrint configuration has itself generated top-bit set characters which it
  168. wishes to put out verbatim; if bytes > 128 are put out as parameters to printer
  169. directives. £ is the major problem in the first case, though hatty characters or
  170. insert may have put top-bit set characters into the text. The second may be a
  171. problem if your text contains epson style codes.
  172.  
  173. I recommend careful checking if you propose to use !Printers in association
  174. with JGPCopy files.
  175.  
  176. .col
  177. |-oOo-
  178.  
  179. More about Scything codes from the text:-
  180.  
  181. The option that selects between None, Epson, HP, etc. style codes controls an
  182. attempt to scythe, from the text copied to screen, noise from printer commands.
  183. Remember that horizontal and vertical setting commands will not be effected on
  184. the screen, so that what shows on the screen may not be exactly laid out as it
  185. would be if JGPrinted directly. It is possible that some codes may not be
  186. correctly recognised, though I have had no problem from any I have tried.
  187. Moreover, bytes that will mess up the screen never get through. Each such
  188. command is replaced by a space, in order to separate words on the screen.
  189.  
  190. If a file has come from MSDOS and uses ANSI-standard commands to manipulate the
  191. window, HP-style codes may succeed in scything them out; however, I have
  192. encountered some whose terminator is lower case, which, if used, will cause too
  193. much to be missed. It may be possible to modify the definition of valid code,
  194. described below.
  195.  
  196. Those who have FormEd can change the initial selection by editing a window in
  197. the Template file in !jgp and/or !Jgcopy; also the Codes recognised as valid can
  198. be modified. See details below   (To be implemented only on request.)
  199.  
  200. .setst :| :
  201. .setend : |:
  202. .col
  203. |Technical Note
  204.  
  205. The problems are quite different in Epson-style and HP-style codes. In each,
  206. there are 2 problems.
  207.  
  208. In Epson\-style, the problems come from those codes that are required to be
  209. followed by bytes that may be screen\-displayable: either 1 byte as in, for
  210. example, the code for a vertical tab; or to be followed by 2 bytes, as for
  211. example, the codes to move the print head either relatively or absolutely.
  212.  
  213. In HP-style codes, there are two classes of codes that do not have @, A-Z as
  214. terminators. The first has a single character following <esc>, and I have
  215. encountered the usages '=' for half\-line\-feed and '9' to clear margins. The
  216. second has a lower case letter terminal after 3,4,6,...characters. I have
  217. encountered these forms in bringing across MSDOS files that use (an extension
  218. of) the ANSI standard codes to manage modes and cursor. I have seen f,s,u,n,m,h,
  219. used, respectively, as terminators for Horizontal and Vertical Position,
  220. Save/Restore Cursor Position, Device Status Report, Set Graphics Rendition, Set
  221. Mode.
  222.  
  223. .col
  224. |Amending facilities
  225.  
  226. To amend the code-style initially chosen, double click on the file Templates in
  227. !jgpcopy and/or !jgp. The window you want has, as Title, Printer Codes Ignored,
  228. and as Identifier, Scythe.
  229.  
  230. You want to amend the sprite icons to the right of Epson and HP respectively so
  231. that the one to the right of your choice is the one whose sprite name is pgo. A
  232. convenient name for the other is pwait. (These icons are coloured circles used
  233. in the printer window.)
  234.  
  235. More precisely, IF Epson+1 is pgo THEN the Firstchoice is Epson ELSEIF HP+1 is
  236. pgo THEN Firstchoice is HP ELSE Firstchoice is none.
  237.  
  238. .col
  239. |not implemented Mon,06 Apr 1993
  240.  
  241. Below Epson and Hp are two Sprites in which are listed the characters following
  242. <esc> that are to be specially treated in the respective ways described
  243. above, the first described in the window immediately below the printer name, and
  244. the second in the bottom window. The number of characters that can be entered in
  245. these windows is limited to 12. Those shown in the window provided are presently
  246. built in to JGPCopy.
  247.  
  248. It is, of course, vital not to renumber the sprites in the Scythe window.
  249.  
  250. If your printer has a code-style that does not fit into this framework, I should
  251. be glad to discuss appropriate customising.
  252.  
  253. .setst ::
  254. .setend ::
  255. .col
  256. |-oOo-
  257.  
  258. I do not charge for a licence to use JGPCopy from within !jgpcopy.
  259.  
  260. However, if you find yourself regularly making use of it, other than to read
  261. the documentation of material with which it was distributed, without having
  262. bought a licence for JGEd or JGPrint, you should make whatever donation you
  263. think suitable to an arts or higher education charity of your choice, and I
  264. request you to send me any  programs for which you are entitled to give me a
  265. licence and that you think might interest me.
  266.  
  267. If you distribute documentation with !jgpcopy, as a condition of a free licence
  268. to do so, I require you to distribute the shareware JGP disc at whatever
  269. handling charge you deem fair.
  270.  
  271.  
  272. .\ \Q
  273. .col
  274. | |J.G.Laski      |
  275. .col
  276. | |18 Ebury Street|
  277. .col
  278. | |London         |
  279. .col
  280. | |SW1W OLU       |
  281. .col
  282. | |\d