home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / os2 / dvidrv1.arj / EMTEX / DOC / ENGLISH / MAKEDOT.DOC < prev    next >
Encoding:
Text File  |  1990-09-22  |  15.9 KB  |  389 lines

  1. ==============================================================================
  2. MAKEDOT.DOC (makedot 1.1c)                                 VERSION: 22.09.1990
  3. ==============================================================================
  4.  
  5. This program is used to generate parameter files for dvidot.  It has two
  6. functions:
  7.  
  8.     -   conversion of a text file into a parameter file (.dot)
  9.     -   conversion of a parameter file (.dot) into a text file
  10.  
  11. To modify parameter files they must first be converted into a text file which
  12. can then be changed with an editor.  The modified text file can then be
  13. converted back into a parameter file again.
  14.  
  15.  
  16. Usage
  17. =====
  18.  
  19. To convert a text file into a parameter file:
  20.  
  21.     makedot -c <input file> [<output file>]
  22.  
  23. The default extension for the output file is dot.  If no output file name is
  24. given, the name of the input file (with the extension .dot) is used.
  25. If you specify - for the input file, the text file is read from standard
  26. input.
  27.  
  28. To convert a parameter file into a text file:
  29.  
  30.     makedot -d <input file> [<output file>]
  31.  
  32. The default extension for the input file is dot.  If no output file name is
  33. given then the input file name (without the extension .dot) is used.
  34. If you specify - for the output file, the text file is written to standard
  35. output.
  36.  
  37.  
  38. Text file format
  39. ================
  40.  
  41. A text file can contain comment lines which begin with `*', all the characters
  42. after the asterisk are ignored.  Blank lines are also ignored.
  43.  
  44. All other lines contain a keyword followed by an equals sign.  Parameters
  45. for this keyword follow the equals sign.  (There are keywords which don't
  46. require parameters.)
  47.  
  48.  
  49. Keywords
  50. --------
  51.  
  52. The keywords given below must be used in the order given.  All keywords
  53. (but COMMENT and VF_PATH) must be specified.  Optional parts
  54. of a line are enclosed in square brackets, alternatives are separated by a
  55. vertical bar.  The different kinds of argument are abbreviated as follows:
  56.  
  57.     d       dimension: number and TeX unit (px may be used as well)
  58.     n       number
  59.     s       printer control sequence
  60.     t       text
  61.  
  62. These argument types are explained below.  This is the table of keywords:
  63.  
  64.     [COMMENT=[t]]               Comment: it is saved in the parameter file
  65.                                 but ignored.
  66.  
  67.     ENV_NAME=t                  Name of an environment variable, from which
  68.                                 dvidot should take options.
  69.  
  70.     LOG_NAME=t                  Name of the transcript file.
  71.  
  72.     FONT_PATH=t                 Path for font files. This is the default
  73.                                 setting for the /pf* option.
  74.  
  75.     [VF_PATH=t]                 Path for vf files. This is the default
  76.                                 setting for the /pv* option and should
  77.                                 be left empty.
  78.  
  79.     PAGE_WIDTH=d                Page width. Default setting for /w#.
  80.  
  81.     PAGE_HEIGHT=d               Page height. Default setting for /h#.
  82.  
  83.     FORM_LENGTH=[d]             Form length. Default setting for /hf#.
  84.                                 Needed only for FF_METHOD=LF. If not given,
  85.                                 dvidot will use the value set for the page
  86.                                 height as the form length.
  87.  
  88.     RESOLUTION=n1 n2            Resolution. n1 is the default for /rx#, n2 is
  89.                                 the default for /ry#.
  90.  
  91.     COLUMNS=n                   Maximum number of horizontal dots in graphics
  92.                                 mode. This value is an upper bound for /w#.
  93.  
  94.     ONE_LINE_FEED=[n]           This value is used by INIT1 and INIT2
  95.                                 to program the printer's line spacing.
  96.                                 If LINE_FEED (see below) is used to reprogram
  97.                                 the line spacing, then the argument to
  98.                                 ONE_LINE_FEED must be empty.
  99.  
  100.     BLANK_WIDTH=[n]             Width of a space character. Space characters
  101.                                 are used at the left margin to move the print
  102.                                 head to the right.  For this reason, the width
  103.                                 of a space character is required in graphics
  104.                                 mode dots. If spaces should not be used for
  105.                                 this movement, then the argument must be left
  106.                                 empty.
  107.  
  108.     METHOD=n1 n2                Printing method. The number n1 is the number
  109.                                 of bytes that must be sent to the printer to
  110.                                 print a column of dots in the selected
  111.                                 graphic mode (1 to 6).  n2 is the number of
  112.                                 passes per line (separated by the smallest
  113.                                 line spacing). If, for instance, the pin
  114.                                 spacing is 1/72 inch and the printer can move
  115.                                 the paper in 1/216 inch steps reasonably
  116.                                 reliably, then n2 can be set to 3. In this
  117.                                 way this example can attain a vertical
  118.                                 resolution of 216 DPI.  Values from 1 to 6
  119.                                 can be used.
  120.  
  121.     MAX_WIDTH=[n1 [n2]]         If the page width, converted to graphics mode
  122.                                 dots, is set to one of these values, it is
  123.                                 reduced by 1 (dot), so that the printer does
  124.                                 not execute an automatic line feed when it
  125.                                 reaches the righthand margin. This will leave
  126.                                 a blank dot at the right margin.
  127.  
  128.     PINS=n1 n2                  The bit numbers of the print head pins: n1 is
  129.                                 the bit number corresponding to the top pin
  130.                                 and n2 is the bit number corresponding to the
  131.                                 bottom pin (most printers are set to PINS=0 7
  132.                                 or PINS=7 0). Values from 0 to 7 can be
  133.                                 entered.
  134.  
  135.     MAX_LF=n                    This is the largest line spacing which can be
  136.                                 set by a printer control sequence expressed in
  137.                                 graphics mode dots -- see LINE_FEED.
  138.  
  139.     FF_METHOD=FF|LF             Page throw method: either a FORM_FEED sequence
  140.                                 or multiple line feeds (see FORM_LENGTH).
  141.  
  142.     S_OPTION=OFF|SLOW|DOUBLE_STRIKE
  143.                                 This sets the meaning of the /s+ option. When
  144.                                 set to OFF there is no /s+ option. If set to
  145.                                 SLOW, /s+ selects INIT2 rather than INIT1. If
  146.                                 set to DOUBLE_STRIKE, the /s+ option selects
  147.                                 INIT2 instead of INIT1 as well as making two
  148.                                 passes over each output line.  In the first
  149.                                 pass dots 1, 3, 5, ... are printed and in
  150.                                 the second pass dots 2, 4, 6, ...  This is
  151.                                 intended for printers (like the FX-80) which
  152.                                 cannot print two consecutive dots with the
  153.                                 same needle.
  154.  
  155.     INIT1=[s]                   The printer initialization sequence which is
  156.                                 output when the /s- option is selected. The
  157.                                 parameter used for the printer control
  158.                                 sequence is the value set by ONE_LINE_FEED.
  159.  
  160.     INIT2=[s]                   The printer initialization sequence which is
  161.                                 output when the /s+ option is selected. The
  162.                                 parameter used for the printer control
  163.                                 sequence is the value set by ONE_LINE_FEED.
  164.  
  165.     EXIT=[s]                    This sets the printer control sequence which
  166.                                 is sent to the printer at the end of the job.
  167.  
  168.     GRAPH_MODE=[s]              This sets the printer control sequence which
  169.                                 selects the desired graphics mode.  The
  170.                                 parameter used in the sequence is the number
  171.                                 of dots per line.
  172.  
  173.     GRAPH_END=[s]               This is the printer control sequence which is
  174.                                 sent to the printer immediately after the
  175.                                 graphics data -- normally empty.
  176.  
  177.     LINE_FEED=[s]               The printer control sequence which causes a
  178.                                 line feed. If ONE_LINE_FEED is set then this
  179.                                 sequence must give a line feed with the line
  180.                                 spacing specified with ONE_LINE_FEED.  Also
  181.                                 used with FF_METHOD=LF.
  182.  
  183.     FORM_FEED=[s]               The printer control sequence required for a
  184.                                 page throw. It is necessary for FF_METHOD=FF.
  185.  
  186.     POS_X=[s]                   The control sequence which positions the print
  187.                                 head horizontally.  The parameter used in this
  188.                                 sequence is the horizontal position required
  189.                                 in graphics mode dots.  Not required.
  190.  
  191.  
  192. Printer control sequences
  193. -------------------------
  194.  
  195. These sequences usually consist of serveral parts which are separated by
  196. spaces.  Each part can be constructed from the following tokens:
  197.  
  198.     ASCII control code and other names.
  199.  
  200.         NUL     Code 00(hex) 0(dec).
  201.         SOH     Code 01(hex) 1(dec).
  202.         STX     Code 02(hex) 2(dec).
  203.         ETX     Code 03(hex) 3(dec).
  204.         EOT     Code 04(hex) 4(dec).
  205.         ENQ     Code 05(hex) 5(dec).
  206.         ACK     Code 06(hex) 6(dec).
  207.         BEL     Code 07(hex) 7(dec).
  208.         BS      Code 08(hex) 8(dec).
  209.         TAB     Code 09(hex) 9(dec).
  210.         HT      Code 09(hex) 9(dec).
  211.         LF      Code 0A(hex) 10(dec).
  212.         VT      Code 0B(hex) 11(dec).
  213.         FF      Code 0C(hex) 12(dec).
  214.         CR      Code 0D(hex) 13(dec).
  215.         SO      Code 0E(hex) 14(dec).
  216.         SI      Code 0F(hex) 15(dec).
  217.         DLE     Code 10(hex) 16(dec).
  218.         DC1     Code 11(hex) 17(dec).
  219.         DC2     Code 12(hex) 18(dec).
  220.         DC3     Code 13(hex) 19(dec).
  221.         DC4     Code 14(hex) 20(dec).
  222.         NAK     Code 15(hex) 21(dec).
  223.         SYN     Code 16(hex) 22(dec).
  224.         ETB     Code 17(hex) 23(dec).
  225.         CAN     Code 18(hex) 24(dec).
  226.         EM      Code 19(hex) 25(dec).
  227.         SUB     Code 1A(hex) 26(dec).
  228.         ESC     Code 1B(hex) 27(dec).
  229.         FS      Code 1C(hex) 28(dec).
  230.         GS      Code 1D(hex) 29(dec).
  231.         RS      Code 1E(hex) 30(dec).
  232.         US      Code 1F(hex) 31(dec).
  233.         DEL     Code 7F(hex) 127(dec).
  234.  
  235.     ASCII printing characters.
  236.  
  237.         'x      A single character: the character following ' is sent as is.
  238.         "xxx"   A string of characters: the characters following " up to, but
  239.                 not including, the next " in the same line are sent to the
  240.                 printer.
  241.  
  242.     Numbers standing for a character's ASCII code.
  243.  
  244.         0###    Octal number: # is a digit from 0 to 7.
  245.         0x##    Hexadecimal number: # is a character from the set (0-9, A-F).
  246.         ###     Decimal number: # is a digit from 0 to 9.
  247.                 Note: a leading zero will cause the number to be interpreted
  248.                 as octal (see 0###).
  249.  
  250.     Control characters.
  251.  
  252.         ^A      Control characters: ^a to ^a or ^A to ^Z stand for codes 1 to
  253.                 26, ^@ stands for 0.
  254.  
  255.     Parameter (inserting a numeric parameter in a control sequence).
  256.  
  257.         You may use one of the following templates (see below for xx):
  258.             xx+#        Add # to parameter before inserting parameter
  259.             xx-#        Subtract # from parameter before inserting parameter
  260.             xx*#+#      Multiply parameter by the first number and add the
  261.                         second number before inserting parameter
  262.             xx*#-#      Multiply parameter by the first number and add the
  263.                         second number before inserting parameter
  264.         You cannot use xx alone, use xx+0 instead. Choose xx from the
  265.         following:
  266.  
  267.         D1 to D9
  268.                 The parameter is inserted as a decimal number (in characters)
  269.                 with leading zeros (D1: one place, D9: nine places).
  270.  
  271.         L
  272.                 The low byte of the parameter is inserted as a binary number.
  273.  
  274.         H
  275.                 The high byte of the parameter is inserted as a binary number.
  276.  
  277.         LH
  278.                 The parameter is inserted as a binary number in two bytes
  279.                 (the low byte first then the high byte).
  280.  
  281.         HL
  282.                 The parameter is inserted as a binary number in two bytes
  283.                 (the high byte first then the low byte).
  284.  
  285.  
  286. Examples of printer control sequences
  287. -------------------------------------
  288.  
  289. 240 DPI graphics mode for the EPSON FX-80:
  290.  
  291.         ESC '* 3 LH+0
  292.  
  293.     In hexadecimal this is: 1B 2A 03 n1 n2, where n1+256*n2
  294.     is the width of the graphic in dots.
  295.  
  296. Line feed for NEC P6:
  297.  
  298.         FS '3 L+0 LF
  299.  
  300.     In hexadecimal this is: 1C 33 n1 0A. The paper will be moved by n1/360 in.
  301.  
  302. Horizontal positioning for a C.ITOH 8510A:
  303.  
  304.         ESC 'F D4+0
  305.  
  306.     In hexadecimal this is: 1B 46 n1 n2 n3 n4, where n1 to n4
  307.     are numbers (30 to 39) which give the horizontal position.
  308.  
  309. A 24 pin graphics mode, specify number of bytes + 1 (width * 3 + 1):
  310.  
  311.         ESC "[g" LH*3+1 5
  312.  
  313.     In hexadecimal this is (the parameter is assumed to be 100):
  314.  
  315.         1B 5B 67 2D 01 05
  316.                  ^^^^^
  317.                  301 = 3*100+1
  318.  
  319. Nonsense example:
  320.  
  321.         ^A "abc" TAB '  010 10 0x10 " ' "
  322.  
  323.     In hexadecimal this is: 01 61 62 63 09 20 08 0A 10 20 27 20.
  324.  
  325.  
  326. Notes
  327. =====
  328.  
  329. Some of the settings can also be made through command line options of
  330. dvidot, this way is recommended.  Each printer (and printer mode) should
  331. have its own parameter file.  Parameter file settings which can be changed
  332. on the dvidot command line should be given values which are reasonable but
  333. not expected to cover all cases, as the right value can easily be put on the
  334. command line or in the configuration file.
  335.  
  336. Please do not change the parameter files supplied -- if you must change them,
  337. copy them to a file with a different name first.
  338.  
  339. When you have developed (and thoroughly tested) a set of parameters for a new
  340. printer or mode, please send them to the author (address in the README file),
  341. so that others can profit from it and so that a standard is upheld.
  342.  
  343. If you cannot create a parameter file for a printer using the methods above,
  344. please get in touch with the author so that makedot/dvidot can be extended to
  345. cover this new case.
  346.  
  347. If you want a set of fonts for a printer which the author does not offer,
  348. please get in touch with him before you torture your machine with MFjob.  It
  349. is enough when one person generates the fonts!  You should, however, find out
  350. the correct settings for METAFONT first and send them in.
  351.  
  352. A parameter file containing xx*#+# or xx*#-# in a printer control sequence
  353. cannot be used with older versions of dvidot.
  354.  
  355.  
  356.  
  357. History
  358. =======
  359.  
  360. Version 1.0a (21.02.90):
  361. ------------------------
  362.  
  363. First version.
  364.  
  365.  
  366. Version 1.1a (22.03.90):
  367. ------------------------
  368.  
  369. -   New keyword: VF_PATH.
  370.  
  371. -   METHOD=n1 n2: New range for n1 and n2: 1 to 6.
  372.  
  373.  
  374. Version 1.1b (22.06.90):
  375. ------------------------
  376.  
  377. -   xx*#+# and xx*#-#.
  378.  
  379.  
  380. Version 1.1c (22.09.90):
  381. ------------------------
  382.  
  383. -   Bug fixed (`makedot -d' output of LH+n and HL+n with non-zero n).
  384.  
  385. -   Bug gixed (`makedot -d' output of BLANK_WIDTH=<empty>).
  386.  
  387.  
  388.                   -------- End of MAKEDOT.DOC -------------
  389.