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

  1. .// This is, again, a JGPrint file, to be JGDocced to produce a well laid-out
  2. .// document.
  3. .// Source of JGPrintInfo
  4. .setu 10 :arc:          In/exclude archimedes only features. see .if/fi below
  5. .// .setu 10 :msdos:    Ex/include msdos only features.
  6. .// .sp 0                   Comment out if Pages wanted; default 66 lines (.sp 66)
  7. .ft
  8. /
  9.  
  10. .col
  11. |Page \p
  12.  
  13. /
  14. .hd
  15. :
  16.  
  17. .if \o
  18. .col
  19. Tue,21 Apr 1992|JGPrint/JGSharePr
  20. .else
  21. .col
  22. JGPrint/JGSharePr|Tue,21 Apr 1992|
  23. .fi
  24.  
  25. :
  26. .setm 11 *.nost
  27. \s1 \t*                 Used for undentation; end of layout prologue.
  28. .ht 7
  29. .setu 12 :common:
  30. .setst :\t:
  31. .makel list
  32. .setst ::
  33. .col
  34. |JG(Share)Pr
  35.  
  36. This document introduces aspects of JGPrint that are not available in JGDoc
  37. mode. These are:
  38. .usel list
  39. .nost
  40. 0. \t}The JGPrint Environment;
  41. .nost
  42. 1. \t}The Initial Dialogue;
  43. .nost
  44. 1.a. \t}\ \ \ To Screen;
  45. .nost
  46. 2. \t}Vertical Matters;
  47. .nost
  48. 3. \t}Horizontal Matters;
  49. .nost
  50. 4. \t}Style Matters;
  51. .nost
  52. 5. \t}Printer Configurations.
  53. .usel base
  54.  
  55. Matters are not here treated exhaustively; for that the reader is referred to
  56. the reference manual supplied when a licence is purchased, but I would guess 85%
  57. of the uses made of JGPrint would involve only what is treated here, in
  58. JGDocdoc and the XMP files.
  59.  
  60. The Details of particular configuration problems in 2-4 should prove useful in
  61. the more 'how to do it' 5.
  62.  
  63. .col
  64. |JGSharePrint Restrictions
  65.  
  66. After one or a few more pages, JGSharePr will insert a polite? request that you
  67. buy a licence, flanked, above and below by a matched random anount of white;
  68. pagelength regulation is preserved. This does not happed in JGDoc mode, nor if,
  69. simply, JGPrinting to screen.
  70.  
  71. .col
  72. 0|The JGPrint Environment
  73.  
  74. In order to run as JGPrint, !jgp.Info.JGPStrings must not begin with *.
  75. Therefore, shift-double click on !jgp to open the directory, then on Info; drag
  76. JGPStrings to JGEd to edit out the initial *.
  77.  
  78. Please put * back when you pass on the Shareware material.
  79.  
  80. If !jgp.JGPStrings begins with a '.', some diagnostic information is printed out
  81. before the normal dialogue. See ExAlien for details.
  82.  
  83. .col
  84. \s1=1|The Initial Dialogue
  85.  
  86. JGPrint (not in JGDoc mode) begins by engaging the user in a dialogue; this
  87. takes place in its own window, which occupies the entire screen. Nevertheless,
  88. JGPrint releases the processor to other applications when it would otherwise be
  89. idle. Depending on what you are JGPrinting to, you may be offered a choice to
  90. continue in the desktop or in its own window. You may change your mind in
  91. mid-run.
  92.  
  93. The dialogue begins with a copyright announcement; JGPrint then proffers the
  94. preferred configuration, and, if this is not accepted, displays what others are
  95. available. It then asks for a date string, which is optional, and enters the
  96. initial dialogue proper.
  97.  
  98. The prefered configuration can be set from the JGPrint icon bar icon's menu, and
  99. is initially 'default'.
  100.  
  101. At any stage, ending one's response with a <cr>
  102. .if \u10 eq arc
  103.  or clicking on select, or on menu followed by adjust
  104. .fi
  105.  causes a 'jump' to the 'Go' prompt, possibly via the Indesktop prompt, skipping
  106. all other parts of the dialogue; ending otherwise yields another line of
  107. dialogue. These lines are arranged with the least common towards the end, so
  108. that it is extremely rare to go right through the whole dialogue;  mostly,
  109. indeed, only the first two lines are needed.
  110.  
  111. Much of the dialogue is self-explanatory, and most of that which is not need
  112. only rarely be used, and so is not treated here. If there is a specific
  113. expected response, it is suggested in the dialogue prompt. Experiment is the
  114. best way to explore.
  115. .if \u10 eq arc
  116.  A sequence of clicks on select will take you through JGPrint in the most
  117. commonly used way; a sequence of clicks on adjust, with a few numbers or
  118. filenames where prompted, will take you the long way through.
  119. .fi
  120.  
  121. If you do not want to proceed, and you have not passed the comfiguration
  122. selection, JGPrint to 'n' (nowhere), and press Y after Go; alternatively, press
  123. Q(uit) when prompted.
  124.  
  125. .if \u10 eq arc
  126. In the initial dialogue, when there is only one selected response shown on the
  127. prompt, mouse-select is construed as the selected response AND jump to go;
  128. mouse-adjust is construed as deny the selected response BUT continue the dialogue.
  129. Mouse-menu followed by either of the first two yields the same response, but
  130. swaps jump to go with continue the dialogue.
  131.  
  132. This may at first sight seem a curious coding choice, but the purpose is to
  133. require only one click at each prompt, unless you want two or more of the extra
  134. features applied on one file. I was in two minds as to whether or not to swap
  135. the functionality of menu and adjust; I think having the modifying button
  136. seperating the two action buttons works well, although one does lose the
  137. connotation of adjust.
  138. .fi
  139.  
  140. The prefered configuration file, initially
  141. .if \u10 eq arc
  142.   'default', or selected via the JGPrint bar icon menu
  143. .fi
  144. , is first offered, and if not accepted, the available alternatives are
  145. displayed and one is prompted for; an empty string followed by select/Y will
  146. exit immediately, a misspelled string will promt for exit.
  147.  
  148. .col
  149. \s2|From:
  150.  
  151. This is a request for the specification of the filename of the 'jgprint' file
  152. from which text is to be JGPrinted. The directory in which it lives serves as
  153. the base directory relative to which any auxiliary file needed is specified.
  154. .if \u10 eq arc
  155.  In the desktop, this is automatically supplied as the full filename of the file
  156. you click on; otherwise the currently selected directory is assumed.
  157. .fi
  158. .if \u10 eq msdos
  159.  All filenames specified without extension are given the extension .TXT.
  160. .fi
  161.  
  162. .col
  163. \s2|To:
  164.  
  165. A null response signifies Printer(=l), unless the configuration in use names
  166. its printer Screen or Ansi, in which case null signifies Screen(=c).
  167.  
  168. NB. Rather than 'l' oe 'c' (see below), you may prefer to give a filename (of
  169. two characters or more); the resulting file can then be copied to the screen or
  170. to the printer, as was the case with JGDoc.
  171.  
  172. However:
  173. .hln
  174. \s3)\ The file specification is taken to be relative to the From file directory;
  175. .hln
  176. \s3)\ There will, if the configuration calls for it, be printer codes within this
  177. file;
  178. .hln
  179. \s3)\ (an approximation to) the file being written will rush past on the screen,
  180. unless you choose InDeskTop.
  181.  
  182. The purpose of this last is to enable the context of a diagnostic report to be
  183. shown. You should know that JGPrint may hold a full line and a part line between
  184. what is being read and what is being written.
  185.  
  186. The file produced will be of type JGPCopy, and consequently clicking on it will
  187. enable you to use  JGPCopy's facilities to send it to the printer or view it on
  188. the screen; JGPCopy(qv) will excise printer commands from what is sent to the
  189. screen.
  190.  
  191. Outside the desktop, pf in JGEd (qv)  can send it to the printer while doing
  192. your next editing run.
  193.  
  194. With the 'c' response, the screen pauses about every half\-page until a key or
  195. click; if you JGPrint to a file 'null:', text scrolls without interuption on the
  196. screen.
  197.  
  198. If you are using JGPrint direct to screen, the screen painting is slowed
  199. according to a parameter 'slow' among the sizes in the configuration file. (You
  200. can almost certainly live with the initial setting.) Also, after thirty lines
  201. are on the screen, the page freezes, and you are prompted to hit a key to allow
  202. it to scroll up about 2/3 of a page and continue; alternatively hitting M/m or
  203. clicking Menu will take you to the desktop with a latent window.; there is a
  204. menu there to continue, or to write to a Jot file before continuing. Continue has
  205. a submenu to choose between in own window and in desktop; if indesktop is not
  206. available, this entry will be shaded.
  207.  
  208. If some other task has overwritten a window, JGPrint does not currently restore
  209. itself over an abandoned window without visiting the desktop; however where the
  210. window was will be scrolled up and lost at the top of the screen.
  211.  
  212. If, in JGPrint mode, you print to a file, the image of what you send to the file
  213. passes quickly over the screen without paging. This is probably the best way to
  214. find the context to purge diagnostic reports from your texts. The file 'null:'
  215. is probably best; with JGSharePr, of course, you get tiresome polite requests;
  216. for this purpose, these don't matter overmuch.
  217.  
  218. However, in some circumstances, spaces are not sent to the screen and the result
  219. needs compassion to interpret. Printer codes sent to the screen are skipped on
  220. the screen in most contexts; any codes that upset the screen are always skipped,
  221. but in Verso, or if page prompting is requested, the codes <esc><esc> and
  222. <esc>0n are inserted for JGPCopy to respond to.
  223.  
  224. Some other useful responses are:-
  225. .usel list
  226. .nost
  227. d: \t}diagnostic reports; follow the resulting dialogue.
  228.  
  229. .nost
  230. i: \t(thence <file>); produce a file for subsequent editing.
  231.  
  232. .nost
  233. j: \t}as i: but in a form preferred by some word processor editors; <nl> within
  234. paragraphs are replaced by <sp>
  235.  
  236. .nost
  237. h: \t(thence <file>); interactive hyphenation; follow resulting instructions.
  238.  
  239. .usel base
  240. .col
  241. |(about 5 prompts not documented)
  242.  
  243. .col
  244. \s2+6|Many
  245.  
  246. .if \u10 eq msdos
  247. You will be prompted to name an auxiliary file. JGPrint sends its output to this
  248. file and shows it on screen, then pases it the number of times requested whither
  249. you requested (usually the printer). A key press or mouse click at either
  250. stage enforces a pause.
  251.  
  252. NB There is a known harmless bug in that bytes >= <space> from printer codes in
  253. footnotes get through to the screen; eliminating this nonsense would be more
  254. trouble than it's worth.
  255. .else
  256. JGPCopy is the preferred way of printing multiple copies in the Desktop.
  257. .fi
  258. .if \u10 eq arc
  259. JGPCopy provides an option for getting many copies of a file. Therefore this
  260. prompt is ommitted.
  261.  
  262. .col
  263. |(another prompt not documented)
  264.  
  265. .col
  266. \s2+2|Verbatim
  267.  
  268. The Directives in the To: file itself are interpreted, but, in included
  269. (\\+)files, all text except the £ character is copied. (Wordwrap is imposed if
  270. line overflow.) This facility is aimed at program documentation.
  271.  
  272. .col
  273. \s2+2|Verso
  274.  
  275. Pages 1,3,5,... are printed; pages 2,4,6,... are put to an intermediate file;
  276. after a prompt to enable paper to be reset, this file is then printed.
  277.  
  278. The pause is not provided if JGPrinting to a file for subsequent use of JGPCopy
  279. is used, but only when JGPrinting direct to the printer. An associated dotty is
  280. ..gute {-}<n> which gutters by <n> on even pages, by -<n> on odd. Small <n> is
  281. column width, large <n> 1/3600". if - is there, the wider left\-margin will be
  282. on odd rather than even pages.
  283.  
  284. See the prologue of this text for how to have different running heads on odd and
  285. even pages.
  286.  
  287. .col
  288. |-o0O0o-|
  289.  
  290. The following group of prompts concern facilities that require auxiliary files.
  291. If a null file is supplied in JGPrint's own window, the desktop is visited with
  292. a from or to File Window. Dragging a file icon to the from window gives
  293. filenames for merge and an external userstring file.
  294.  
  295. .col
  296. \s2+6|Merge:
  297.  
  298. This requires the path+name (relative to the from directory) of a file from
  299. which successive records will be read when \\f<descriptor> is encountered. \\g
  300. brings in the next record, and if the record file is not exhausted when the
  301. end of the from file is reached, the from file is restarted with the next
  302. record. See EXMERGE\/EXMERGM for an example. EXLBL/EXLBM is another example,
  303. using the .rpt directive to generate labels. Alternatively, if a merge file is
  304. required to satisfy a \\f<descriptor> directive, but on has not yet been
  305. provided, you will be prompted to do so at that point in the text.
  306.  
  307. .col
  308. \s2|Index:
  309.  
  310. Text between \\i and \\j in the from file, with the current pagenumber etc., is
  311. sent to the file requested here, in the form of records that can be
  312. subsequently used to set out contents or an index.
  313.  
  314. If a from file contains \\i...\\j brackets, but an index file is not
  315. specified, a diagnostic complaint will be generated once, but subsequently
  316. such brackets will be ignored.
  317.  
  318. .col
  319. \s2|UserStrings:
  320.  
  321. Use a file to preset userstrings in your text. This file would, usually, have
  322. been saved at the end of a previous run (see below).
  323.  
  324. .col
  325. |-o0O0o-|
  326.  
  327. The final group of choices in JGPrint's initialisation dialogue are a trio
  328. designed to help users explore their printers. A user of JGPrint who is
  329. satisfied by the configuration files available to her has no need of these,
  330. though she may find the first interesting.
  331.  
  332. What these choices print does not depend on what JGPrint file you click on, but solely
  333. solely on the configuration file in use. For this reason, if you click Select or
  334. type Y to enter either, they will, after some further dialogue,  normally send
  335. appropriate characters to the printer, and exit without printing the file you
  336. clicked on to enter JGPrint.
  337.  
  338. They can be explored without engaging the printer by responding Y/Select to
  339. "Test Printing on Screen?", a query which comes up after the user has responded
  340. Y/Select to either of the main enquiries; this transfers bytes intended for the
  341. printer to the screen, but it should be noted that this will not give an
  342. accurate idea of what would appear on the printed page; it is an option provided
  343. simply to enable the user to see on the screen the nature of the information
  344. which will be provided by going to the printer. An oportunity to spool this
  345. information to some file is provided.
  346.  
  347. After the response to "Test Printing on Screen?"  you will be asked for a
  348. range of bytes whose effects you wish to see; after printing these, JGPrint asks
  349. "More?", and you can provide another range of bytes; as noted above, a negative
  350. response causes JGPrint to exit.
  351.  
  352. The Time of the run is output, and relevent information about JGPrints' beliefs
  353. about the printer.
  354.  
  355. .col
  356. \s3|See Printer Charset
  357.  
  358. Unlike Acorn Printer drivers, JGPrint uses the printer's character set
  359. directly, rather than trying to recreate the Acorn screen character set. This
  360. prompt sets out on the page the byte number/character relation after the
  361. configuration file's init command has been executed. (If you were testing
  362. printing on screen, you would, of course, see the Acorn set, not your
  363. printer's.)
  364.  
  365. NB. Some configuration files may use later JGPrint directives to change the
  366. printer's selected alphabet. This is rare, but, if so, you will need to append
  367. these codes to init, or otherwise alter it. I suggest you work on a copy of your
  368. configuration file to do so.
  369.  
  370. .col
  371. \s3|Prop Char Width
  372.  
  373. This prompt is probably only of interest to someone building a new
  374. configuration file.
  375.  
  376. When building a new configuration file, one of the most difficult areas is
  377. working out the width of characters, which is rarely documented in your printer
  378. manual. This prompt provides you with a eight inch ruler across the page, based
  379. on the nominal cpi, with n repetitions of the character below it, where n is the
  380. number, e.g. 100, of repetitions you have asked for. You can then measure how
  381. long this group is, and therefore the width of each individual letter.
  382.  
  383. This facility assumes, in addition to the printer code 'init', that the codes ps
  384. and ps0 have been properly specified in the configuration file, and that
  385. 'horunit', the number of horizontal printer units to the inch has been correctly
  386. specified in the configuration file. You may also want emph/emph0 and
  387. ital/ital0.
  388.  
  389. As before, it may be necessary to amend init. For example, you may have set the
  390. printer to lose any printing beyond the right margin, but for this purpose you
  391. would want character wrap.
  392.  
  393. .col
  394. \s3|Check Widths of ps characters
  395.  
  396. This uses the information garnered from the preceeding, to put out as many
  397. characters as JGPrint believes will fill 6", with the upright character
  398. positioned to where it believes the rightmost point of the last character should
  399. have reached. This enables you to fine tune the character wisths.
  400.  
  401. .col
  402. \s2|In Desktop
  403.  
  404. If you are JGPrinting to screen, obviously you must keep JGPrint's window open,
  405. for that is where the text, which is the whole purpose of the run, is displayed,
  406. and this prompt will not appear. However if you are JGPrinting to a file, it is
  407. sensible to consider whether or not you want JGPrint to preempt the whole screen
  408. to display any output. You may decide not, and JGPrint will retreat to its
  409. latent window, where the rough percentage of the input text read is displayed.
  410.  
  411. This is not the only way to the Desktop. Clicking menu will move to the latent
  412. window and stop processing. Clicking on that window acquires a menu, one choice
  413. of which is continue, which reveals a submenu with the choice of Own Window, or,
  414. if available, in desktop.
  415.  
  416. Of course, JGPrint passes control to other desktop processes when it does not
  417. need to keep it, whichever window it is using.
  418.  
  419. .col
  420. \s2|Go (or Quit)?(Y/Q) :
  421.  
  422. Unless you respond Y/y to allow JGPrint to proceed, the dialogue will restart
  423. from 'From: '; Quit gives you your last chance to leave the program before
  424. opening files etc.
  425.  
  426. If your text has set userstrings, you will be invited to save your settings in a
  427. file that you can use on a later run to preset values.
  428.  
  429. While you are JGPrinting, a key, or, if to screen or printer, a mouse click,
  430. will temporarily halt JGPrint.
  431.  
  432. The configuration parameter Slow can be set to slow the ouputting of lines to
  433. screen. I keep it at 40, i.e. just less than half a second (n/a in desktop).
  434.  
  435. If you decide to re-use JGPrint without going back to the desktop, you can
  436. specify another source file. (specification understood relative to the
  437. preceeding from file.)
  438.  
  439. .col
  440. |-o0O0-
  441.  
  442. .col
  443. \s1|Vertical Matters
  444.  
  445. Unlike JGDoc mode, we have now to think in terms of absolute physical
  446. measurements. Internally, JGPrint works in terms of 1/2160" vertical units,
  447. though it is usually possible to provide more convenient numbers as parameters
  448. to directives or as 'size' parameters in configuration files.
  449.  
  450. For any printer, a key parameter is the vertical unit in terms of which motion
  451. is specified in printer commands. The configuration parameter 'Vertunit' must
  452. be set to the number of such units to the inch, e.g. 72, 144, 216. JGPrint can
  453. now translate vertical motion requests so that the printer can  respond
  454. correctly.
  455.  
  456. See the discussion of configuring below, and the online helpfile
  457. !jgp.info.JGCfgInfo for information about configuring parameters and codes.
  458.  
  459. .col
  460. \s2|New Lines
  461.  
  462. If the configuration has an absolute horizontal position code (abshor), it uses
  463. this in place of <cr> in order not to upset those printers that output a
  464. <newline> whenever the recieve a <carriage return>; if text is being sent to
  465. screen, a cariage return is output
  466.  
  467. Otherwise, if the size parameter CrandLn in the configuration file is 1, JGPrint
  468. puts out <cr><nl> for a new line. If CrandLn is 0, JGPrint just puts out <nl>.
  469. JGPrint cannot put out just <cr>, because it needs to distinguish new lines from
  470. twice printed lines (used for vertical bars).
  471.  
  472. Similarly the size parameter CrandHln controls whether or not <cr> is put out
  473. before the half-line command. (On some HP style printers, putting out <cr> seems
  474. to cause an extra linefeed.). I keep these parameters 0, and set my printer to
  475. give a carriage return only if it is explicitly called for. but some users may
  476. want their printers to handle this.
  477.  
  478. .col
  479. \s2|Windback
  480.  
  481. Before outputting to the page, JGPrint can wind the paper back a length
  482. specified by 'Initup' in the configuration file. The purpose of this is to move
  483. the top of the page of continuous paper  from the  printer's cutting bar back to
  484. just above the printhead itself. 2160 would specify 1" windback, but it is
  485. usually sensible to make exact adjustments by looking at the result on the
  486. paper. The header of EXLayout has a line of quotes to specify where the top of
  487. the page is deemed to be. NB Single sheet printers may not be able to print in this
  488. position, and it may well be appropriate to remove this line.
  489.  
  490. .col
  491. \s2|Interline Spacing
  492.  
  493. The directive .sp <n>, or the value of the configuration parameter 'initsp'
  494. determines the vertical distance between lines. Values of 1-10 are construed as
  495. lines per inch, 11-120 as lines per page, and larger values as units of 1/2160".
  496. I usually use 6 (=360), or 8 if I want to get a lot on a page. The configuration
  497. code 'spacing' determines the code bytes sent to the printer; there are two
  498. optional codes (if null ignored) LpiSpacing and LppSpacing for the case that the
  499. printer has special codes for these.
  500.  
  501. .col
  502. \s2|Interparagraph Spacing
  503.  
  504. The directive .parsep <n>, or the value of the configuration parameter
  505. 'initParsep' determines the extra space put in between paragraphs. 0,1,2,3 are
  506. lines, otherwise the number - up to 300 - is the percentage of a line added. A
  507. line is forced on screen unless parsep is 0.
  508.  
  509. .col
  510. \s2|Vmi, Downtab and Uptab
  511.  
  512. If, as with HP style printers, there is a command which, with a positive
  513. parameter, moves the printhead down the page, and with a negative parameter
  514. moves the printhead up the page, you should set the printer command Vmi to, for
  515. example, '*'+'p'+'%'+'v'+'Y'. %v specifies 'interpret the parameter as a signed
  516. numeral'.
  517.  
  518. In Epson style printers such a vmi is not used, and you must set vmi to null.
  519. You can then use the two codes 'downtab' and 'uptab' to specify the bytes to send
  520. to the printer to move the paper down and up respectively. Typical strings for
  521. downtab could be 'J'+'%'+'I', for uptab, 'j'+'%'+'i'.  The '%'+'I' specifies
  522. that a parameter is to be output as a byte. if 'esc' is set true, these strings
  523. will be preceded by the byte 27(esc).
  524.  
  525. .col
  526. \s2|Halfline
  527.  
  528. The directive .hln will move the paper by half the current line\-spacing.
  529.  
  530. .col
  531. \s2|General Vertical Motion
  532.  
  533. ><n> moves the printhead <n> vertical units (1/2160") down the page; -<n> moves
  534. up. If <n> is between -59 and 59, this is construed to be n/12 of the current
  535. line spacing. 5 lines up or down should cover most needs.
  536.  
  537. .col
  538. \s2|Inithdft
  539.  
  540. The three size parameters Inithd, Inithdss and Initft in the configuration file
  541. determine the default header height, header height if cutsheets, and footer
  542. height. With a pushing paper feed Inithdss should probably be the same number of
  543. lines as inithd, or one less; with a puller feed, inithdss should probably be 0,
  544. and you will probably need to set skipss non\-zero.
  545.  
  546. .col
  547. |-o0O0-
  548.  
  549. .col
  550. \s1|Horizontal Matters
  551.  
  552. JGPrint's internal horizontal units are 1/3600", and in order that appropriate
  553. commands be issued to the printer, the sizing prameter 'horunit' must be set
  554. to the number of units to the inch that the printer requires for horizontal
  555. motion, e.g. 300, if characters are 10 cpi (characters per inch) and can each be
  556. divided into 30 units.
  557.  
  558. .col
  559. \s2|Characters per inch
  560.  
  561. The directive .cpi\ <p>\ {<l>\ {<r>}}, as well as optionally setting the left
  562. and right margins, sets the characters per inch. 'Defp' sets the default 'Font'
  563. in which to find the width of proportionally spaced characters. <p> is passed as
  564. a prarameter to the 'pitch' command.
  565.  
  566. If any of the commands 'cpi5', 'cpi6' or 'cpi10' are non-null, they are
  567. substituted for 'pitch'; they should require no parameters. Also the font they
  568. use will be '10p', '12p', '10p' respectively. Non-null commands 'cpi8', 'cpi12'
  569. 'cpi17' are used similarly using '17p', '12p' and '17p' respectively. Also the
  570. width of each character in JGPrint horizontal units is set from '8w', '12w' and
  571. '17w' respectively. Finally, we have 'nlq' with 'nlqp' and 'nlqw', to respond to
  572. the directive .nlq\ <c>\ {<l>\ {<r>}}.
  573.  
  574. Initnlq, initcpi, initlm and initrm in the configuration file determine the
  575. default values, with initnlq taking priority over initcpi.
  576.  
  577. Example: Configuring for HP Deskjet, Pitch would be <esc>(s%JH, where %J
  578. signifies "put in a parameter". However cpi16.67 and cpi20 are available, but
  579. not cpi12 or cpi17. Define cpi12 as <esc>(s16.67H and cpi17 as <esc>(s20H,
  580. with, respectively 12w = 216 (3600/16.67) and 17w = 180 (3600/20) and the
  581. JGPrint directives .cpi 12 and .cpi 17 will, respectively, yield the narrower
  582. but available pitches. 12w is the only way to get 16.67 cpi, since the effect
  583. cannot be provided using only whole number parameters, but .cpi 20 ... would be
  584. an alternative way to get the narrower text.
  585.  
  586. If a proportionally spaced font is requested, the current cpi is not very
  587. meaningful to the printer; JGPrint continues to use it, however, to set margins,
  588. tabs and vertical bars.
  589.  
  590. .col
  591. \s2|Fonts and Proportionally spaced characters.
  592.  
  593. In the configuration file, the pseudo-command 'Propcharwidth' names an
  594. associated (q./.qqq) file which specifies the width of each character. (See
  595. below for how to set these widths.) If proportionally\-spaced characters are
  596. specified, either by 'initps'=1 in the configuration file or by the directive
  597. \\P (cancel \\Q) in the text, superior justification algorithms to .fj can be
  598. invoked. I have removed the availablity of \\P, \\Q in midline, but will replace
  599. them if given a good reason.
  600.  
  601. (I normally put this as .\\ \\P, .\\ \\Q in the prologue, since I made a design
  602. mistake in specifying these as backslashes, following what printer hardware is
  603. capable of, rather than as dotties, which is what users, in practice, always
  604. want. Indeed, I am currently generating a diagnostic if they are used online in
  605. a line.)
  606.  
  607. The pitch set when \\P is engaged is not really a property of the font, but should
  608. be set to about the average character width. JGPrint uses it if you want to set
  609. margins and tabs in terms of the notional number of character columns.
  610.  
  611. The directive .fgfj (fairly good fill and justify/fudge) puts a single
  612. part\-character width space in the line; .jgfj (jolly good fill and justify)
  613. puts part character\-width spaces between each word in the line. .jgfj requires
  614. the configuration code HMI to be set (e.g. '\\' + '%' + 'E' on my nec P2200; %E
  615. specifies "interpret the parameter as an Epson-style two-byte number").
  616.  
  617. If the printer command Abshor is non-null, each ink character, or each word, can
  618. be preceded by this command with an appropriate parameter to place the printer
  619. head at the correct position; see below for details of how to require this.
  620.  
  621. The use of proportionally\-spaced characters cannot be accurately represented on
  622. a normal vdu, and sending such to screen requires some goodwill to interpret.
  623. JGPCopy is quite successful in killing noise for Epson style codes or HP style
  624. codes, according to the choice made.
  625.  
  626. Look at the documentation for Defp, nlqp, 10p, 12p, 17p, Dots0/1, Ital0/1 and
  627. Bold0/1 below or in the online configuration document, or its source, JGCfgDoc.
  628.  
  629. .col
  630. \s2|General Horizontal Motion
  631.  
  632. \\}<n> moves the printhead <n> horizontal units (1/3600") to the right on the
  633. page; \\{<n> moves to the left. If <n> is between -59 and 59, this is construed
  634. to be n/12 of the current column width.
  635.  
  636. .col
  637. |-o0O0o-
  638.  
  639. .col
  640. \s1|Style Matters
  641.  
  642. When text appears on the screen (To: c, b, <file>), underlining
  643. causes  text to appear underlined, bolding causes text to appear in mangenta,
  644. italicizing causes text to appear in dark green, and bolding and italicizing
  645. together cause text to appear in bright blue. These effects do not carry through
  646. to JGPCopying files produced by JGPrint.
  647. .if \u10 eq arc
  648.  If, by any mischance, you leave in the middle of underlining in a way that I
  649. have not foreseen, this just might cause all letters to be underlined
  650. thereafter; *fx20 in the command line turns the effect off.
  651. .fi
  652.  
  653. In JGEd, F1 + 0 lists all dotties and backslashes; in JGCnfigInfo, the
  654. printer codes they are related to are made available online in JGConfig.
  655.  
  656. .col
  657. \s2|Character Bytes available.
  658.  
  659. JGPrint can cope with a text that sends any byte from 1 to 255 to the printer.
  660. In order to send 0 to the printer, JGPrint requires that you use the hatty
  661. vector mapping, viz ^^c, where you have defined ^^c to be 0. In JGPrint, I
  662. usually use ^^0 (in JGDoc you must use @).
  663.  
  664. If the byte sent is less than 32, JGPrint precedes it by the printer code
  665. Tochar1; if Tochar1 is null or forbidden, it precedes it with Tochars, and
  666. follows it with Toctrl.
  667.  
  668. You may well want to use the hatty mapping for other control characters that
  669. your editor may find some difficulty with, eg 10 or 13.
  670.  
  671. .col
  672. \s2|Italics
  673.  
  674. The user switches on Italics by the backslash \\I, off by the backslash \\J.
  675. JGPrint will then send to the printer the bytes of the configuration file
  676. strings Ital and Ital0 respectively. Typically, these might be 'I' and 'J'
  677. respectively, since s.esc true will precede these strings with 27<esc>. The
  678. initial default is italics off.
  679.  
  680. This typifies how typestyles are changed; a backslash directive causes the
  681. corresponding code found in the configuration file to be sent to the printer.
  682. See below for how to use JGCnfig to set Ital/Ital0.
  683.  
  684. .col
  685. \s2|Bold
  686.  
  687. \\E, \\F sets/unsets emphasised, using the code strings Emph, Emph0. \\E9, \\F9
  688. sets/unsets double-strike using Dstrk/Dstrk0. InitEmph in the configuration file
  689. sets the default state. For 9 levels of bold and faint respectively see the
  690. reference manual.
  691.  
  692. .col
  693. \s2|Underlined
  694.  
  695. \\U, \\V sets/unsets comtinuous underlining using the code strings Uln/Uln0.
  696. \\W underlines non\-blank characters, \\X underlines letters and digits only.
  697.  
  698. See the reference manual for more style directives.
  699.  
  700. ,col
  701. \s2|Quiet or Draft
  702.  
  703. \\Y, \\Z were originally designed, using the code strings Qt and Qt0, to turn
  704. on/off quiet printing; recently, however, I have been using these codes to turn
  705. on and off draft style. I am proposing to add init draft to the configuration
  706. parameters.
  707.  
  708. .col
  709. \s2|Incremental
  710.  
  711. \\K and \\L were originlally intended to switch on and off incremental printing.
  712. The BJ-10e provides a continuous overline, and in that configuration I have
  713. canabalised the incremental printing facilities to provide this. There may be
  714. some problems with overlined margins here, unless absolute horizontal
  715. positioning (see JGPrPrmDoc) is used.
  716.  
  717. .col
  718. \s2|Dotty style directives
  719.  
  720. As suggested for proportional spacing above, it is often useful to set a style
  721. directive by a dotty command, particularly to set the base layout before any
  722. characters are printed. The Dotty directive .\\ \\<sl>...\\<sn> where
  723. <sl>...<sn> are style directive lettera that allows this to be done. Not all
  724. style directives are allowed, but all those listed above except italics are.
  725. Indeed, at present I am requiring \\P, \\Q, \\Y, \\Z only appear in this dotty
  726. form.
  727.  
  728. .col
  729. \s2|Varying output according to To:
  730.  
  731. \\q returns a character according to how To: was answered in the initial
  732. dialogue ('d' in Doc mode). Thus:\|
  733. ..if \\q eq p\|
  734. .......\|
  735. ..fi'\|
  736. will only include .... when JGPrinting direct to printer.
  737.  
  738. This facility is under development and subject to variation. You should use an
  739. experimental file to check the actual character returned for the To: you are
  740. interested in. Comments on its use are welcomed.
  741.  
  742. In JGEd, F1 + 0 lists all dotties and backslashes; in JGCnfigInfo, the
  743. printer codes they are related to are made available online in JGConfig.
  744.  
  745.  
  746. .col
  747. \s1|Printer Configurations
  748.  
  749. JGPr(int)Par(ameter)Doc gives fuller documentation oriented to the supposition
  750. that you are producing a new configuration file. The discussion here is aimed to
  751. provide a background for advanced JGPrint users.
  752.  
  753. .if \u10 eq arc
  754. The file !jgp.info.JGCfginfo lists, with comments, the configuration parameters
  755. that can be set using JGConfig. These should be consulted to discover the
  756. flexibility possible. It is available online while configuring.
  757.  
  758. The printer configurations are held in a subdirectory pa relative to !JGPrint
  759. and the proportional spacing files in a subdirectory q.
  760. .fi
  761. .if \u10 eq msdos
  762. The file JGCfg.inf lists, with comments, the configuration parameters
  763. that can be set using JGConfig. These should be consulted to discover the
  764. flexibility possible. It is available online while configuring.
  765.  
  766. The Printer configurations have extensions .PPP, and the proportional spacing
  767. files have extensions .QQQ, both in the same directory as JGPrint.
  768. .fi
  769. Each of these kinds of files has a very complicated internal structure, and
  770. should only be examined or modified through the programme JGConfig, which, in
  771. the desktop, is best accessed via the JGPrint icon bar icon's menu.
  772.  
  773. The proportional spacing files are independent of the word\-size of the
  774. implementation, but the configuration files and (A)JGCdnames(.CHR) depend on the
  775. wordsize. Therefore all such files can be exchanged between the MSDOS and the
  776. Arc implementation, but only the proportional character files can be exchanged
  777. with the BBC implementation (now obsolescent). NB. if your printer has many
  778. alphabets, it is likely that you will have to use different configuration files
  779. to use them outside the standard 32-126 set. (And some of these may differ in
  780. different alphabets.)
  781.  
  782. The file (A)JGCdnames(.CHR) names the code strings and the size values in the
  783. configuration files, and must be present; this, also, can only be accessed
  784. comprehensibly through JGConfig. You can consistently change the names by which
  785. these code strings and size values are named by denying the "Keep current Names?
  786. (Y):" prompt in JGConfig's dialogue.
  787.  
  788. Altering a configuration file, or making a new one, is a very straightforward,
  789. if tedious, operation. JGConfig provides very extensive prompting to remind you
  790. of what to do at every stage. There is online documentation of what each code
  791. string or size parameter signifies in the file JGCfginfo, a text file with
  792. certain structures in it.
  793.  
  794. I fear that the following description of how to use JGConfig is more opaque than
  795. actually doing so, and does not suggest the flexibility and security that the
  796. prompts, together with the trace left on the screen, provide.
  797.  
  798. JGConfig can be entered from the commandline or via the JGPrint iconbar icon menu;
  799. it offers you a choice of the available configuration files to access, beginning
  800. with the one currently selected. Given your choice, it will confirm with the
  801. string in the pseudo\-code named 'printer' in that configuration file. In the
  802. desktop, it initially proposes the preferred configuration.
  803.  
  804. .if \u10 eq arc
  805. A sequence of clicks on Select will take you through JGConfig in the most
  806. commonly used way; however, to actually change the configuration file, you will
  807. have to use the keyboard, following the prompts.
  808. .fi
  809.  
  810. You are then prompted Codes\/Sizes\/Hatties\/Proportional\/Dump\/eXit. You
  811. return to this multiway switch when you complete your work for any C/S/H/P
  812. choice. X goes to the latent window, whence you can save, quit or continue.
  813. You can also reach this window by clicking menu from most of JGConfig's prompts.
  814.  
  815. [Remark: This is the only point in the JGP suite where I think a menu would be
  816. better than the dialogue used; everywhere else, JGPrint's dialogue seems to me as
  817. convenient as a menu. See discussion in JGDiscuss.]
  818.  
  819. D dumps to a file the code strings, size values and proportional spacing values
  820. of the chosen configuration. I recommend this as the first thing to do if you
  821. want to explore JGCnfig. You can, of course, print such a file out for elbow
  822. reference.
  823.  
  824. P enables you to set the proportional spacing width of each character in one of
  825. two 'fonts' in the file named by the pseudo\-code string Propcharwidth. See
  826. below  for how these are to be interpreted.
  827.  
  828. H enables you to set a mapping ^^<char> --> <byte> which enables non\-standard
  829. characters to be printed from pure ascii texts. If your editor allows you to put
  830. bytes other than those between 32 and 127 into your text it might be better
  831. to use your editor rather than this facility. See Exchars in Xmp for an example
  832. and further discussion.
  833.  
  834. C and S access, respectively, the the code strings and and size values
  835. respectively. Answer Y to "Keep current Names" (See reference manual). You will
  836. be prompted to have listed for you the names under which they are known unless
  837. you say you know the name of the Code/Size you want to examine or modify.
  838.  
  839. This brief description should help you start to find your way around the
  840. Configuration process made available by JGConfig; the prompts will ensure that
  841. you do not lose your way.
  842.  
  843. In the code strings provided, %<letter> specifies how parameters should be
  844. realised for specific printers in codes that require, for example, a number  to
  845. specify how far to move. 'I' and 'E', given as examples above, give bytes as
  846. Epson printers require. 'J' and 'V' give signed numerals, as HP requires. See
  847. 'JGCodeInfo' for details of the letters available, with code that interprets
  848. parameters for each %<letter>.
  849.  
  850. .col
  851. \s2|New configuration files.
  852.  
  853. Suppose you have a configuration file Printer for a printer called p1, and want
  854. to produce one for a new printer called p2. First copy Printer Newprinter, then
  855. enter !JGConfig, selecting Newprinter from the files offered to you.
  856.  
  857. You will get the response "Configured for p1, OK?(Y) ", which is to be a lie.
  858. Nevertheless, respond Y/y and then C/c. (click select twice.)
  859.  
  860. The pseudo-code string you want is called 'printer', and you should follow the
  861. prompts to reach it. It will show you the current string "'p' + '1'", with a
  862. prompt to Hide/Keep/Info/Modify. Respond M/m(click Adjust).
  863.  
  864. You want to put in the string "'p' + '2'", and as you will see from the prompts,
  865. the sequence of key strokes - ' 2 < will cancel 1 and insert 2, leaving you with
  866. the desired "'p' + '2'.
  867.  
  868. '>' will enable you to leave the code configuration section. Exit by X, and now
  869. when Newprinter is selected, "Configured for" will tell the truth.
  870.  
  871. .if \u10 eq arc
  872. Alternatively click menu at the multiway switch and choose Save + Exit on the
  873. menu at the latent window.
  874.  
  875. Other configuration strings and values can be changed similarly.
  876.  
  877. In my experience, different Epson Style files often only require Horunit and
  878. Vertunit to be reset, and everything but JGFJ and FGFJ will be OK. These two
  879. require the proportional spacing table to be mofified, and often hmi. See the
  880. the online file !JGP.Info.JGCfgInfo for further details. The advanced
  881. documentation JGCodeInfo may also be helpful if you need to make more radical
  882. changes.
  883.  
  884. It may be that JGPrinting small test files to D will help you ensure that the
  885. strings and values you put in produces the effects you want from  your
  886. new printer; See also D above.
  887.  
  888. .col
  889. \s2|JGPrint's 'Fonts'
  890.  
  891. If you are only configuring for a fixed\-width character set, all you need to
  892. know is the Pitch or 'Characters per Inch' that you get from the dotties .CPI
  893. and .NLQ. .cpi {5|6|10|12} sets the pitch to 5,...,12. However, the widths of
  894. ..nlq, .cpi 8, .cpi12 and .cpi 17, are given explicitly by the size parameters nlqw, 8w
  895. and 17w. This is to enable you to use, say .cpi 17 for charactersets with a
  896. pitch, say, of 15 or 16.667. These are to be set in terms of JGPrint's
  897. internal horizontal units (1/3600), so that 216, say, will give a pitch of
  898. 16.667 characters per inch. Your printer may also require you to set a height.
  899. JGPrint provides a directive .Point <n>, which will use the 'point' command to
  900. send <n> through to the printer. Point is remembered as part of a configuration,
  901. and is used by 'scaled' configurations to discover the width of proportionally
  902. spaced characters.
  903.  
  904. This Characterwidth(Cw.) can now be used to set margins and tabs in terms of
  905. character\-width, without needing to think about JGPrint's internal measures.
  906. When you have proportionally spaced characters, this still gives the notional
  907. width of a column when setting margins and tabs, although actual character
  908. widths are not involved.
  909.  
  910. If your printer provides you with characters of varying width, you must provide
  911. JGPrint with much more information in your configuration files. JGPrint calls
  912. this information a font, though it is only a small part of what makes up a font
  913. in other contexts; JGPrint does not need information about the shape of
  914. characters.
  915.  
  916. See JGPrParmDoc for further details.