home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / DVID15G1 / EMTEX / BOOK / ENGLISH / MAKEDOT.INF (.txt) < prev   
OS/2 Help File  |  1994-09-01  |  32KB  |  1,036 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. 1 Introduction ΓòÉΓòÉΓòÉ
  3.  
  4.  The makedot program is used to generate parameter files for dvidot.  It has 
  5.  two functions: 
  6.  
  7.  o conversion of a text file into a parameter file (DOT file) 
  8.  
  9.  o conversion of a parameter file (DOT file) 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.  makedot can also be used for creating binary files as required for the 
  16.  +init-files option of dvihplj and dvidot. 
  17.  
  18.  
  19. ΓòÉΓòÉΓòÉ 2. 2 Usage ΓòÉΓòÉΓòÉ
  20.  
  21.   Converting a text file into a parameter file
  22.   Converting a parameter file into a text file
  23.   Converting between different DOT file formats
  24.   Converting a text file into a binary file
  25.   Converting a binary file into a text file
  26.  
  27.  
  28. ΓòÉΓòÉΓòÉ 2.1. 2.1 Converting a text file into a parameter file ΓòÉΓòÉΓòÉ
  29.  
  30.  The command 
  31.  
  32.      makedot -c [options] input_file [output_file] 
  33.  
  34.  converts the text file input_file into the DOT file output_file.  The default 
  35.  extension for the output file is DOT.  If no output file name is given, the 
  36.  name of the input file (with the extension DOT) is used.  If you specify `-' 
  37.  for the input file, the text file is read from standard input. 
  38.  
  39.  
  40. ΓòÉΓòÉΓòÉ 2.2. 2.2 Converting a parameter file into a text file ΓòÉΓòÉΓòÉ
  41.  
  42.  The command 
  43.  
  44.      makedot -d [options] input_file [output_file] 
  45.  
  46.  converts the DOT file input_file into the text file output_file.  The default 
  47.  extension for the input file is DOT.  If no output file name is given then the 
  48.  input file name (without the extension DOT) is used.  If you specify `-' for 
  49.  the output file, the text file is written to standard output. 
  50.  
  51.  
  52. ΓòÉΓòÉΓòÉ 2.3. 2.3 Converting between different DOT file formats ΓòÉΓòÉΓòÉ
  53.  
  54.  dvidot 1.4n and later cannot use old DOT files.  These files must be converted 
  55.  by makedot.  The command 
  56.  
  57.      makedot -r [options] input_file [output_file] 
  58.  
  59.  converts the DOT file input_file into the DOT file output_file.  If no output 
  60.  file is specified, the input file will be overwritten by the converted file. 
  61.  
  62.  If `-o' is given, an output file compatible with older versions of makedot 
  63.  will be created -- unless it cannot be converted due to usage of new features. 
  64.  To convert a DOT file to the old format, use 
  65.  
  66.      makedot -ro <input file> [<output file>] 
  67.  
  68.  If `-q' is given, makedot doesn't display its logo line. 
  69.  
  70.  
  71. ΓòÉΓòÉΓòÉ 2.4. 2.4 Converting a text file into a binary file ΓòÉΓòÉΓòÉ
  72.  
  73.  The command 
  74.  
  75.      makedot -b [options] input_file output_file 
  76.  
  77.  converts the text file input_file into the binary file output_file.  If you 
  78.  specify `-' for the input file, the text file is read from standard input. 
  79.  
  80.  
  81. ΓòÉΓòÉΓòÉ 2.5. 2.5 Converting a binary file into a text file ΓòÉΓòÉΓòÉ
  82.  
  83.  The command 
  84.  
  85.      makedot -a [options] input_file output_file 
  86.  
  87.  converts the binary file input_file into the text file output_file.  If you 
  88.  specify `-' for the output file, the text file is written to standard output. 
  89.  
  90.  If `-q' is given, makedot doesn't display its logo line. 
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ 3. 3 Text file format for generating a parameter file ΓòÉΓòÉΓòÉ
  94.  
  95.  A text file can contain comment lines which begin with `*' or `%', all the 
  96.  characters after that character are ignored.  Blank lines are also ignored. 
  97.  
  98.  All other lines contain a keyword followed by an equals sign.  Parameters for 
  99.  this keyword follow the equals sign.  (There are keywords which don't require 
  100.  parameters.) 
  101.  
  102.  
  103. ΓòÉΓòÉΓòÉ 3.1. 3.1 Keywords ΓòÉΓòÉΓòÉ
  104.  
  105.  All keywords given below (but those shown in square brackets) must be used, 
  106.  the order doesn't matter.  Optional parts of a line are enclosed in square 
  107.  brackets, alternatives are enclosed in parentheses and separated by a vertical 
  108.  bar.  The different kinds of argument are abbreviated as follows: 
  109.  
  110.  d       dimension: number and TeX unit (px may be used as well) 
  111.  
  112.  e       expression 
  113.  
  114.  n       number 
  115.  
  116.  s       code sequence 
  117.  
  118.  t       text 
  119.  
  120.  These argument types are explained below.  Depending on the setting of TYPE=, 
  121.  different keywords can be used. 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 3.1.1. 3.1.1 Keywords for all parameter file types ΓòÉΓòÉΓòÉ
  125.  
  126.  The following keywords can be used for both types of parameter files. 
  127.  
  128.  [COMMENT=[t]] 
  129.  
  130.      Comment: it is saved in the parameter file but ignored. 
  131.  
  132.  ENV_NAME=t 
  133.  
  134.      Name of an environment variable, from which dvidot should take options. 
  135.  
  136.  FONT_PATH=t 
  137.  
  138.      Path for font files.  This is the default setting for the +font-files 
  139.      option. 
  140.  
  141.  LOG_NAME=t 
  142.  
  143.      Name of the transcript file. 
  144.  
  145.  PAGE_HEIGHT=d 
  146.  
  147.      Page height.  Default setting for +height. 
  148.  
  149.  PAGE_WIDTH=d 
  150.  
  151.      Page width.  Default setting for +width. 
  152.  
  153.  RESOLUTION=n1 n2 
  154.  
  155.      Resolution.  n1 is the default for +resolution-x, n2 is the default for 
  156.      +resolution-y. 
  157.  
  158.  [TYPE=[(DOT | DOT_HORZ | BITMAP)]] 
  159.  
  160.      Type of the parameter file.  With TYPE=DOT and TYPE=DOT_HORZ, a parameter 
  161.      file for driving a dot-matrix printer will be created, with TYPE=BITMAP a 
  162.      parameter file for creating graphics files will be created.  If TYPE= 
  163.      without an argument is used or if TYPE= is omitted, TYPE=DOT will be 
  164.      assumed. 
  165.  
  166.  [VF_PATH=t] 
  167.  
  168.      Path for VF files.  This is the default setting for the +virtual-fonts 
  169.      option and should be left empty. 
  170.  
  171.  
  172. ΓòÉΓòÉΓòÉ 3.1.2. 3.1.2 Keywords for TYPE=DOT ΓòÉΓòÉΓòÉ
  173.  
  174.  TYPE=DOT is used for printers where the pins are arranged vertically and each 
  175.  byte of graphics data defines a column of dots.  Most dot impact printers are 
  176.  of this type.  The following keywords can be used only in parameter files 
  177.  containing TYPE=DOT. 
  178.  
  179.  BLANK_WIDTH=[n] 
  180.  
  181.      Width of a space character.  Space characters are used at the left margin 
  182.      to move the print head to the right.  For this reason, the width of a 
  183.      space character is required in graphics mode dots.  If spaces should not 
  184.      be used for this movement, then the argument must be left empty. 
  185.  
  186.  COLUMNS=n 
  187.  
  188.      Maximum number of horizontal dots in graphics mode.  This value is an 
  189.      upper bound for +width. 
  190.  
  191.  DOUBLE_SIDED_LONG=[s] 
  192.  
  193.      The code sequence for initializing the printer for +double-sided:long. 
  194.  
  195.  DOUBLE_SIDED_SHORT=[s] 
  196.  
  197.      The code sequence for initializing the printer for +double-sided:short. 
  198.  
  199.  EXIT=[s] 
  200.  
  201.      This sets the code sequence which is sent to the printer at the end of the 
  202.      job. 
  203.  
  204.  FF_METHOD=(FF | LF) 
  205.  
  206.      Page throw method: either a FORM_FEED sequence or multiple line feeds (see 
  207.      FORM_LENGTH). 
  208.  
  209.  FORM_FEED=[s] 
  210.  
  211.      The code sequence required for a page throw.  It is necessary for 
  212.      FF_METHOD=FF.  The amount of feed (vertical motion units, or dots for 
  213.      VMU=1) is available in the `form_feed' variable. 
  214.  
  215.  FORM_LENGTH=[d] 
  216.  
  217.      Form length.  Default setting for +form-length.  Needed only for 
  218.      FF_METHOD=LF.  If not given, dvidot will use the value set for the page 
  219.      height as the form length. 
  220.  
  221.  GRAPH_END=[s] 
  222.  
  223.      This is the code sequence which is sent to the printer immediately after 
  224.      the graphics data -- normally empty. 
  225.  
  226.  GRAPH_MODE=[s] 
  227.  
  228.      This sets the code sequence which selects the desired graphics mode.  The 
  229.      number of dots per line is available in the `pixels' variable. 
  230.  
  231.  INIT1=[s] 
  232.  
  233.      The printer initialization sequence which is output when the +slow:off 
  234.      option (which is the default) is selected. 
  235.  
  236.  INIT2=[s] 
  237.  
  238.      The printer initialization sequence which is output when the +slow:on 
  239.      option is selected. 
  240.  
  241.  LINE_FEED=[s] 
  242.  
  243.      The code sequence which causes a line feed.  Also used with FF_METHOD=LF. 
  244.      The amount of feed (vertical motion units, or dots for VMU=1) is available 
  245.      in the `line_feed' variable.  LINE_FEED won't be used (except for throwing 
  246.      the page if FF_METHOD=LF is set) if a POS_Y sequence is given. 
  247.  
  248.  MAX_LF=n 
  249.  
  250.      This is the largest line feed which can be performed by a code sequence 
  251.      expressed in graphics mode dots -- see LINE_FEED.  Greater line feeds are 
  252.      performed by using multiple smaller line feeds. 
  253.  
  254.  MAX_WIDTH=[n1 [n2]] 
  255.  
  256.      If the page width, converted to graphics mode dots, is set to one of these 
  257.      values, it is reduced by 1 (dot), so that the printer does not execute an 
  258.      automatic line feed when it reaches the right-hand margin.  This will 
  259.      leave a blank dot at the right margin. 
  260.  
  261.  METHOD=n1 n2 
  262.  
  263.      Printing method.  The number n1 is the number of bytes that must be sent 
  264.      to the printer to print a column of dots in the selected graphics mode (1 
  265.      to 8).  n2 is the number of passes per line (separated by the smallest 
  266.      line spacing).  If, for instance, the pin spacing is 1/72 inch and the 
  267.      printer can move the paper in 1/216 inch steps reasonably reliably, then 
  268.      n2 can be set to 3.  In this way this example can attain a vertical 
  269.      resolution of 216 DPI.  Values from 1 to 6 can be used. 
  270.  
  271.  ONE_LINE_FEED=[n] 
  272.  
  273.      This value is used by INIT1 and INIT2 to program the printer's line 
  274.      spacing.  If LINE_FEED (see below) is used to reprogram the line spacing, 
  275.      then the argument to ONE_LINE_FEED must be empty.  The printer must 
  276.      perform a line feed of n dots when it receives a LF character. 
  277.  
  278.  PINS=n1 n2 
  279.  
  280.      The bit numbers of the print head pins: n1 is the bit number corresponding 
  281.      to the top pin and n2 is the bit number corresponding to the bottom pin 
  282.      (most printers are set to PINS=0 7 or PINS=7 0).  Values from 0 to 7 can 
  283.      be entered. 
  284.  
  285.  POS_X=[s] 
  286.  
  287.      The code sequence which positions the print head horizontally.  The 
  288.      horizontal position required in graphics mode dots is available in the 
  289.      `pos_x' variable. 
  290.  
  291.  POS_Y=[s]} 
  292.  
  293.      The code sequence which positions the print head to an absolute vertical 
  294.      position.  The vertical position required in graphics mode dots is 
  295.      available in the `pos_y' variable.  If a POS_Y sequence is given, 
  296.      LINE_FEED is not used (except for throwing the page if FF_METHOD=LF is 
  297.      set). 
  298.  
  299.  S_OPTION=(OFF | SLOW | DOUBLE_STRIKE) 
  300.  
  301.      This sets the meaning of the +slow option.  When set to OFF there is no 
  302.      +slow option.  If set to SLOW, +slow:on selects INIT2 rather than INIT1. 
  303.      If set to DOUBLE_STRIKE, the +slow:on option selects INIT2 instead of 
  304.      INIT1 as well as making two passes over each output line.  In the first 
  305.      pass dots 1, 3, 5, ...  are printed and in the second pass dots 2, 4, 6, 
  306.      ...  This is intended for printers (like the FX-80) which cannot print two 
  307.      consecutive dots with the same needle. 
  308.  
  309.  [VMU=n] 
  310.  
  311.      Vertical motion unit.  This is the number of graphics dots per line feed 
  312.      unit.  For instance, if the printer can print at 360 DPI vertically, but 
  313.      only can feed the paper in 1/180" units, set VMU=2.  If VMU is not set or 
  314.      set to 0, VMU=1 is assumed.  VMU=1 means that vertical motion is expressed 
  315.      in graphics dots. 
  316.  
  317.  
  318. ΓòÉΓòÉΓòÉ 3.1.3. 3.1.3 Keywords for TYPE=DOT_HORZ ΓòÉΓòÉΓòÉ
  319.  
  320.  TYPE=DOT_HORZ is used for printers where each byte of graphics data defines 8 
  321.  successive horizontally arranged dots.  Some ink jet printers are of this 
  322.  type.  The following keywords can be used only in parameter files containing 
  323.  TYPE=DOT_HORZ. 
  324.  
  325.  BITS=n1 n2 
  326.  
  327.      Bit ordering within a byte of graphics data.  Bit n1 is at the left hand 
  328.      side, bit n2 is at the right hand side.  Only `BITS=7 0' or `BITS=0 7' can 
  329.      be used. 
  330.  
  331.  COLUMNS=n 
  332.  
  333.      Maximum number of horizontal dots in graphics mode.  This value is an 
  334.      upper bound for +width. 
  335.  
  336.  DOUBLE_SIDED_LONG=[s] 
  337.  
  338.      The code sequence for initializing the printer for +double-sided:long. 
  339.  
  340.  DOUBLE_SIDED_SHORT=[s] 
  341.  
  342.      The code sequence for initializing the printer for +double-sided:short. 
  343.  
  344.  EXIT=[s] 
  345.  
  346.      This sets the code sequence which is sent to the printer at the end of the 
  347.      job. 
  348.  
  349.  FF_METHOD=(FF | LF) 
  350.  
  351.      Page throw method: either a FORM_FEED sequence or multiple line feeds (see 
  352.      FORM_LENGTH). 
  353.  
  354.  FIRST_BYTE=(TOP | BOTTOM) (LEFT | RIGHT) 
  355.  
  356.      This declaration defines which corner of the image relates to the first 
  357.      byte of the first row to be printed.  TOP prints the top row first, BOTTOM 
  358.      prints the bottom row first.  LEFT prints the left column of each row 
  359.      first, RIGHT prints the right column of each row first.  The following 
  360.      settings are used most often: 
  361.  
  362.                   FIRST_BYTE=TOP LEFT
  363.  
  364.  FORM_FEED=[s] 
  365.  
  366.      The code sequence required for a page throw.  It is necessary for 
  367.      FF_METHOD=FF.  The amount of feed (vertical motion units, or dots for 
  368.      VMU=1) is available in the `form_feed' variable. 
  369.  
  370.  FORM_LENGTH=[d] 
  371.  
  372.      Form length.  Default setting for +form-length.  Needed only for 
  373.      FF_METHOD=LF.  If not given, dvidot will use the value set for the page 
  374.      height as the form length. 
  375.  
  376.  INIT1=[s] 
  377.  
  378.      The printer initialization sequence which is output when the +slow:off 
  379.      option (which is the default) is selected. 
  380.  
  381.  INIT2=[s] 
  382.  
  383.      The printer initialization sequence which is output when the +slow:on 
  384.      option is selected. 
  385.  
  386.  LINE_FEED=[s] 
  387.  
  388.      The code sequence which causes a line feed.  Also used with FF_METHOD=LF. 
  389.      The amount of feed (vertical motion units, or dots for VMU=1) is available 
  390.      in the `line_feed' variable.  LINE_FEED won't be used (except for throwing 
  391.      the page if FF_METHOD=LF is set) if a POS_Y sequence is given. 
  392.  
  393.  MAX_LF=n 
  394.  
  395.      This is the largest line feed which can be performed by a code sequence 
  396.      expressed in graphics mode dots -- see LINE_FEED.  Greater line feeds are 
  397.      performed by using multiple smaller line feeds. 
  398.  
  399.  MAX_WIDTH=[n1 [n2]] 
  400.  
  401.      If the page width, converted to graphics mode dots, is set to one of these 
  402.      values, it is reduced by 1 (dot), so that the printer does not execute an 
  403.      automatic line feed when it reaches the right-hand margin.  This will 
  404.      leave a blank dot at the right margin. 
  405.  
  406.  ONE_LINE_FEED=[n] 
  407.  
  408.      This value is used by INIT1 and INIT2 to program the printer's line 
  409.      spacing.  If LINE_FEED (see below) is used to reprogram the line spacing, 
  410.      then the argument to ONE_LINE_FEED must be empty.  The printer must 
  411.      perform a line feed of n dots when it receives a LF character. 
  412.  
  413.  POS_X=[s] 
  414.  
  415.      The code sequence which positions the print head horizontally.  The 
  416.      horizontal position required in graphics mode dots is available in the 
  417.      `pos_x' variable. 
  418.  
  419.  [POS_Y=[s]] 
  420.  
  421.      The code sequence which positions the print head to an absolute vertical 
  422.      position.  The vertical position required in graphics mode dots is 
  423.      available in the `pos_y' variable.  If a POS_Y sequence is given, 
  424.      LINE_FEED is not used (except for throwing the page if FF_METHOD=LF is 
  425.      set). 
  426.  
  427.  ROW_BEGIN=[s] 
  428.  
  429.      This code sequence is written at the beginning of each row of data. 
  430.      Graphics data will follow immediately.  The width of the row (pixels) is 
  431.      available in the `pixels' variable. 
  432.  
  433.  ROW_END=[s] 
  434.  
  435.      This code sequence is written immediately after each row of data.  The 
  436.      horizontal position may or may not be changed by ROW_END.  It is assumed 
  437.      that ROW_END moves the cursor to the next row. 
  438.  
  439.  S_OPTION=(OFF | SLOW) 
  440.  
  441.      This sets the meaning of the +slow option.  When set to OFF there is no 
  442.      +slow option.  If set to SLOW, +slow:on selects INIT2 rather than INIT1. 
  443.  
  444.  [VMU=n] 
  445.  
  446.      Vertical motion unit.  This is the number of graphics dots per line feed 
  447.      unit.  For instance, if the printer can print at 360 DPI vertically, but 
  448.      only can feed the paper in 1/180" units, set VMU=2.  If VMU is not set or 
  449.      set to 0, VMU=1 is assumed.  VMU=1 means that vertical motion is expressed 
  450.      in graphics dots. 
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 3.1.4. 3.1.4 Keywords for TYPE=BITMAP ΓòÉΓòÉΓòÉ
  454.  
  455.  The following keywords can be used only in parameter files containing 
  456.  TYPE=BITMAP. 
  457.  
  458.  ALIGN_WIDTH=n 
  459.  
  460.      The width of the bitmap will be rounded to an integral multiple of n 
  461.      bytes.  n can take the values 1, 2 and 4. 
  462.  
  463.  BITS=n1 n2 
  464.  
  465.      Bit ordering within a byte of graphics data.  Bit n1 is at the left hand 
  466.      side, bit n2 is at the right hand side.  Only `BITS=7 0' or `BITS=0 7' can 
  467.      be used. 
  468.  
  469.  CHECKSUM=n1 n2 t n4 e 
  470.  
  471.      Method for computing the value of the `checksum' variable for insertion in 
  472.      the HEADER code sequence.  First, `checksum' is set to n4.  Then, a loop 
  473.      will be performed over the HEADER sequence starting at byte position n1, 
  474.      performing n2 iterations: depending on t, 1, 2 or 4 bytes will be fetched 
  475.      from the header and assigned to the `value' variable; the expression e 
  476.      will be evaluated and the result will be assigned to the `checksum' 
  477.      variable; the position within the header is advanced by 1, 2 or 4, 
  478.      depending on t.  The value of the `checksum' variable after n2 iterations 
  479.      will be the value inserted for `checksum' into the header code sequence. 
  480.      For this computation, 0 will be inserted for the `checksum' and 
  481.      `file_size' variables in the header code sequence.  If you need to include 
  482.      these variables in the computation of the checksum, you can try to do so 
  483.      when inserting the checksum into the header. 
  484.  
  485.      You can use the following keywords for t: 
  486.  
  487.      BYTE    8 bits 
  488.  
  489.      WORD_LH 16 bits, least significant byte first 
  490.  
  491.      WORD_HL 16 bits, most significant byte first 
  492.  
  493.      LONG_LH 32 bits, least significant byte first 
  494.  
  495.      LONG_HL 32 bits, most significant byte first 
  496.  
  497.      Example: 
  498.  
  499.                   CHECKSUM=0 16 WORD_LH 0 (checksum^value)
  500.  
  501.      The checksum is computed as 16-bit XOR over the first 32 bytes. 
  502.  
  503.      If no checksum is required, you can use 
  504.  
  505.                   CHECKSUM=0 0 BYTE 0 0
  506.  
  507.  COMPRESS=(NO | MSP | PCX) 
  508.  
  509.      Type of compression for the graphics data.  COMPRESS=NO doesn't compress 
  510.      at all, the graphics data will be copied unmodified into the output file. 
  511.      COMPRESS=MSP uses a compression method as used in MSP files, COMPRESS=PCX 
  512.      uses a RLE type compression method as used in PCX files. 
  513.  
  514.  FIRST_BYTE=(TOP | BOTTOM) (LEFT | RIGHT) 
  515.  
  516.      This declaration defines which corner of the image relates to the first 
  517.      byte of the graphics data.  TOP puts the top row first, BOTTOM puts the 
  518.      bottom row first.  LEFT puts the left column of each row first, RIGHT puts 
  519.      the right column of each row first.  The following settings are used most 
  520.      often: 
  521.  
  522.                   FIRST_BYTE=TOP LEFT
  523.  
  524.  HEADER=[s] 
  525.  
  526.      The header of the graphics file.  This code sequence will be put at the 
  527.      start of the graphics file.  You can use the variables res_x, res_y, 
  528.      width, height, checksum and file_size. 
  529.  
  530.  ROW_BEGIN=[s] 
  531.  
  532.      This code sequence is written at the beginning of each row of data. 
  533.      Graphics data will follow immediately.  The width of the row (pixels) is 
  534.      available in the `pixels' variable.  Usually empty. 
  535.  
  536.  ROW_END=[s] 
  537.  
  538.      This code sequence is written immediately after each row of data.  Usually 
  539.      empty. 
  540.  
  541.  TRAILER=[s] 
  542.  
  543.      This code sequence is written at the end of the graphics file.  You can 
  544.      use the variables res_x, res_y, width, height and checksum. 
  545.  
  546.  
  547. ΓòÉΓòÉΓòÉ 3.2. 3.2 Code sequences ΓòÉΓòÉΓòÉ
  548.  
  549.  These sequences usually consist of several commands which are separated by 
  550.  spaces.  Each command can be constructed from the following tokens: 
  551.  
  552.  ASCII control codes and other names 
  553.  
  554.      These commands insert one byte: 
  555.  
  556.                   NUL     Code 00(hex) 0(dec).
  557.                   SOH     Code 01(hex) 1(dec).
  558.                   STX     Code 02(hex) 2(dec).
  559.                   ETX     Code 03(hex) 3(dec).
  560.                   EOT     Code 04(hex) 4(dec).
  561.                   ENQ     Code 05(hex) 5(dec).
  562.                   ACK     Code 06(hex) 6(dec).
  563.                   BEL     Code 07(hex) 7(dec).
  564.                   BS      Code 08(hex) 8(dec).
  565.                   TAB     Code 09(hex) 9(dec).
  566.                   HT      Code 09(hex) 9(dec).
  567.                   LF      Code 0A(hex) 10(dec).
  568.                   VT      Code 0B(hex) 11(dec).
  569.                   FF      Code 0C(hex) 12(dec).
  570.                   CR      Code 0D(hex) 13(dec).
  571.                   SO      Code 0E(hex) 14(dec).
  572.                   SI      Code 0F(hex) 15(dec).
  573.                   DLE     Code 10(hex) 16(dec).
  574.                   DC1     Code 11(hex) 17(dec).
  575.                   DC2     Code 12(hex) 18(dec).
  576.                   DC3     Code 13(hex) 19(dec).
  577.                   DC4     Code 14(hex) 20(dec).
  578.                   NAK     Code 15(hex) 21(dec).
  579.                   SYN     Code 16(hex) 22(dec).
  580.                   ETB     Code 17(hex) 23(dec).
  581.                   CAN     Code 18(hex) 24(dec).
  582.                   EM      Code 19(hex) 25(dec).
  583.                   SUB     Code 1A(hex) 26(dec).
  584.                   ESC     Code 1B(hex) 27(dec).
  585.                   FS      Code 1C(hex) 28(dec).
  586.                   GS      Code 1D(hex) 29(dec).
  587.                   RS      Code 1E(hex) 30(dec).
  588.                   US      Code 1F(hex) 31(dec).
  589.                   DEL     Code 7F(hex) 127(dec).
  590.  
  591.  ASCII printing characters 
  592.  
  593.      These commands insert one or more bytes: 
  594.  
  595.      'x      A single character: the character following the single quote ' is 
  596.              sent as is. 
  597.  
  598.      "xxx"   A string of characters: the characters following the double quote 
  599.              " up to, but not including, the next " in the same line are sent 
  600.              to the printer. 
  601.  
  602.  Numbers standing for a character's ASCII code 
  603.  
  604.      These commands insert one byte: 
  605.  
  606.      0###    Octal number: # is a digit from 0 to 7. 
  607.  
  608.      0x##    Hexadecimal number: # is a character from the set (0-9, A-F). 
  609.  
  610.      ###     Decimal number: # is a digit from 0 to 9.  Note: a leading zero 
  611.              will cause the number to be interpreted as octal (see 0###). 
  612.  
  613.  Control characters 
  614.  
  615.      This command insert one byte: 
  616.  
  617.      ^A      Control characters: ^a to ^a or ^A to ^Z stand for codes 1 to 26, 
  618.              ^@ stands for 0. 
  619.  
  620.  Repeating 
  621.  
  622.      This command performs a fixed number of repetitions of the immediately 
  623.      following command: 
  624.  
  625.      REP#    Repeat the following command # times (1 to 256).  If there are 
  626.              multiple successive REP commands, only the last one will be 
  627.              obeyed. 
  628.  
  629.  Inserting a parameter 
  630.  
  631.      These commands evaluate an expression and insert the result as byte, 
  632.      16-bit word or 32-bit word: 
  633.  
  634.      DEC# expression 
  635.  
  636.          Insert the value as decimal number (in characters) with leading zeros, 
  637.          filled to # (1 to 9) places. 
  638.  
  639.      BYTE expression 
  640.  
  641.          Insert the lower 8 bits of the value as byte. 
  642.  
  643.      WORD_LH expression 
  644.  
  645.          Insert the lower 16 bits of the value using two bytes.  The least 
  646.          significant byte is inserted first. 
  647.  
  648.      WORD_HL expression 
  649.  
  650.          Insert the lower 16 bits of the value using two bytes.  The most 
  651.          significant byte is inserted first. 
  652.  
  653.      LONG_LH expression 
  654.  
  655.          Insert the value using four bytes.  The least significant byte is 
  656.          inserted first. 
  657.  
  658.      LONG_HL expression 
  659.  
  660.          Insert the value using four bytes.  The most significant byte is 
  661.          inserted first. 
  662.  
  663.      The value of an expression is computed using 32-bit arithmetic.  An 
  664.      expression can be built as shown here (the parentheses are required!): 
  665.  
  666.      decimal number 
  667.  
  668.          decimal number (0 to 2147483647) 
  669.  
  670.      hexadecimal number 
  671.  
  672.          hexadecimal number (0x0 to 0xffffffff) 
  673.  
  674.      variable 
  675.  
  676.          see below 
  677.  
  678.      ( expression ) 
  679.  
  680.          redundant parentheses 
  681.  
  682.      - expression 
  683.  
  684.          change sign 
  685.  
  686.      ~ expression 
  687.  
  688.          bitwise NOT 
  689.  
  690.      ( expression + expression ) 
  691.  
  692.          addition 
  693.  
  694.      ( expression - expression ) 
  695.  
  696.          subtraction 
  697.  
  698.      ( expression * expression ) 
  699.  
  700.          multiplication 
  701.  
  702.      ( expression / expression ) 
  703.  
  704.          quotient 
  705.  
  706.      ( expression % expression ) 
  707.  
  708.          remainder 
  709.  
  710.      ( expression & expression ) 
  711.  
  712.          bitwise AND 
  713.  
  714.      ( expression | expression ) 
  715.  
  716.          bitwise OR 
  717.  
  718.      ( expression ^ expression ) 
  719.  
  720.          bitwise XOR 
  721.  
  722.      ( expression << expression ) 
  723.  
  724.          shift left (1 << 3 yields 8) 
  725.  
  726.      ( expression >> expression ) 
  727.  
  728.          shift right (10 >> 1 yields 5) 
  729.  
  730.      ( expression < expression ) 
  731.  
  732.          comparison: if less than, 0 otherwise 
  733.  
  734.      ( expression = expression ) 
  735.  
  736.          comparison: 1 if equal, 0 otherwise 
  737.  
  738.      Parentheses can only be omitted for successive operators of the same type, 
  739.      the operators will be evaluated from left to right.  Parentheses cannot be 
  740.      omitted for `<<', `>>', `<' and `='.  For instance, 
  741.  
  742.                   (((1+2)+3)+4)
  743.  
  744.      can be abbreviated to 
  745.  
  746.                   (1+2+3+4)
  747.  
  748.      On the other hand, no parentheses can be omitted in ((3*2)+1). 
  749.  
  750.      A <variable> is one of the following: 
  751.  
  752.      res_x 
  753.  
  754.          horizontal resolution (DPI, +resolution-x) 
  755.  
  756.      res_y 
  757.  
  758.          vertical resolution (DPI, +resolution-y) 
  759.  
  760.      width 
  761.  
  762.          sheet width (pixels, +width) 
  763.  
  764.      height 
  765.  
  766.          sheet height (pixels, +height) 
  767.  
  768.      one_lf 
  769.  
  770.          the value set with ONE_LINE_FEED= 
  771.  
  772.      blank 
  773.  
  774.          the value set with BLANK_WIDTH= 
  775.  
  776.      max_lf 
  777.  
  778.          the value set with MAX_LF= 
  779.  
  780.      pixels 
  781.  
  782.          the width of the current row of the bitmap 
  783.  
  784.      line_feed 
  785.  
  786.          the amount of line feed 
  787.  
  788.      form_feed 
  789.  
  790.          the amount of form feed 
  791.  
  792.      pos_x 
  793.  
  794.          horizontal position for POS_X= 
  795.  
  796.      checksum 
  797.  
  798.          checksum 
  799.  
  800.      value 
  801.  
  802.          used for computing the checksum 
  803.  
  804.      file_size 
  805.  
  806.          file length (only usable with HEADER=) 
  807.  
  808.      vmu 
  809.  
  810.          the value set with VMU=.  If VMU= is not set or set to 0, the vmu 
  811.          variable contains 1 
  812.  
  813.  Continuation line 
  814.  
  815.      If the last character of the line is a `\' preceded by a blank, the next 
  816.      line (which must not be a comment line) will be a continuation line. 
  817.      Using continuation lines, long code sequences can be entered more 
  818.      conveniently.  Each expression must be entered completely on in line. 
  819.  
  820.  
  821. ΓòÉΓòÉΓòÉ 3.3. 3.3 Examples of code sequences ΓòÉΓòÉΓòÉ
  822.  
  823.  240 DPI graphics mode for the EPSON FX-80: 
  824.  
  825.           ESC '* 3 WORD_LH pixels
  826.  
  827.  In hexadecimal this is: 1B 2A 03 n1 n2, where <n1>+256*<n2> is the width of 
  828.  the graphics in dots. 
  829.  
  830.  Line feed for NEC P6: 
  831.  
  832.           FS '3 BYTE line_feed LF
  833.  
  834.  In hexadecimal this is: 1C 33 n1 0A.  The paper will be moved by <n1>/360 
  835.  inch. 
  836.  
  837.  Horizontal positioning for a C.ITOH 8510A: 
  838.  
  839.           ESC 'F DEC4 pos_x
  840.  
  841.  In hexadecimal this is: 1B 46 n1 n2 n3 n4, where n1 to n4 are numbers (30 to 
  842.  39, hexadecimal) which give the horizontal position. 
  843.  
  844.  A 24 pin graphics mode, specify number of bytes + 1 (width * 3 + 1): 
  845.  
  846.           ESC "[g" WORD_LH ((pixels*3)+1) 5
  847.  
  848.  In hexadecimal this is (the parameter is assumed to be 100): 
  849.  
  850.           1B 5B 67 2D 01 05
  851.                    ^^^^^
  852.                    301 = 3*100+1
  853.  
  854.  Nonsense example: 
  855.  
  856.           ^A "abc" TAB '  010 10 0x10 " ' " REP2 "ab" 0
  857.  
  858.  This is: 01 61 62 63 09 20 08 0A 10 20 27 20 61 62 61 62 00. 
  859.  
  860.  Example for continuation lines: 
  861.  
  862.           INIT1=CAN DC2 ESC '5 0 ESC 'F ESC 'H ESC 'I 0 ESC 'T ESC 'U 0 \
  863.                 ESC 'X 1 255 ESC "[@" 4 0 0 0 17 1 ESC '_ 0 ESC '- 0 \
  864.                 ESC "[\" 4 0 0 0 0x68 0x01 ESC '3 BYTE one_lf CR
  865.  
  866.  
  867. ΓòÉΓòÉΓòÉ 4. 4 Text file format for creating a binary file ΓòÉΓòÉΓòÉ
  868.  
  869.  A text file can contain comment lines which begin with `*' or `%', all the 
  870.  characters after that character are ignored.  Blank lines are also ignored. 
  871.  
  872.  All other lines contain code sequences which are written to the binary file. 
  873.  The code sequences used for creating a binary file are a subset of the code 
  874.  sequences used for generating a parameter file. 
  875.  
  876.  
  877. ΓòÉΓòÉΓòÉ 4.1. 4.1 Code sequences ΓòÉΓòÉΓòÉ
  878.  
  879.  These sequences usually consist of several commands which are separated by 
  880.  spaces.  Each command can be constructed from the following tokens: 
  881.  
  882.  ASCII control codes and other names 
  883.  
  884.      These commands insert one byte: 
  885.  
  886.                   NUL     Code 00(hex) 0(dec).
  887.                   SOH     Code 01(hex) 1(dec).
  888.                   STX     Code 02(hex) 2(dec).
  889.                   ETX     Code 03(hex) 3(dec).
  890.                   EOT     Code 04(hex) 4(dec).
  891.                   ENQ     Code 05(hex) 5(dec).
  892.                   ACK     Code 06(hex) 6(dec).
  893.                   BEL     Code 07(hex) 7(dec).
  894.                   BS      Code 08(hex) 8(dec).
  895.                   TAB     Code 09(hex) 9(dec).
  896.                   HT      Code 09(hex) 9(dec).
  897.                   LF      Code 0A(hex) 10(dec).
  898.                   VT      Code 0B(hex) 11(dec).
  899.                   FF      Code 0C(hex) 12(dec).
  900.                   CR      Code 0D(hex) 13(dec).
  901.                   SO      Code 0E(hex) 14(dec).
  902.                   SI      Code 0F(hex) 15(dec).
  903.                   DLE     Code 10(hex) 16(dec).
  904.                   DC1     Code 11(hex) 17(dec).
  905.                   DC2     Code 12(hex) 18(dec).
  906.                   DC3     Code 13(hex) 19(dec).
  907.                   DC4     Code 14(hex) 20(dec).
  908.                   NAK     Code 15(hex) 21(dec).
  909.                   SYN     Code 16(hex) 22(dec).
  910.                   ETB     Code 17(hex) 23(dec).
  911.                   CAN     Code 18(hex) 24(dec).
  912.                   EM      Code 19(hex) 25(dec).
  913.                   SUB     Code 1A(hex) 26(dec).
  914.                   ESC     Code 1B(hex) 27(dec).
  915.                   FS      Code 1C(hex) 28(dec).
  916.                   GS      Code 1D(hex) 29(dec).
  917.                   RS      Code 1E(hex) 30(dec).
  918.                   US      Code 1F(hex) 31(dec).
  919.                   DEL     Code 7F(hex) 127(dec).
  920.  
  921.  ASCII printing characters 
  922.  
  923.      These commands insert one or more bytes: 
  924.  
  925.      'x      A single character: the character following the single quote ' is 
  926.              sent as is. 
  927.  
  928.      "xxx"   A string of characters: the characters following the double quote 
  929.              " up to, but not including, the next " in the same line are sent 
  930.              to the printer. 
  931.  
  932.  Numbers standing for a character's ASCII code 
  933.  
  934.      These commands insert one byte: 
  935.  
  936.      0###    Octal number: # is a digit from 0 to 7. 
  937.  
  938.      0x##    Hexadecimal number: # is a character from the set (0-9, A-F). 
  939.  
  940.      ###     Decimal number: # is a digit from 0 to 9.  Note: a leading zero 
  941.              will cause the number to be interpreted as octal (see 0###). 
  942.  
  943.  Control characters 
  944.  
  945.      This command insert one byte: 
  946.  
  947.      ^A      Control characters: ^a to ^a or ^A to ^Z stand for codes 1 to 26, 
  948.              ^@ stands for 0. 
  949.  
  950.  
  951. ΓòÉΓòÉΓòÉ 5. 5 Notes ΓòÉΓòÉΓòÉ
  952.  
  953.  Some of the settings can also be made through command line options of dvidot, 
  954.  this way is recommended.  Each printer (and printer mode) should have its own 
  955.  parameter file.  Parameter file settings which can be changed on the dvidot 
  956.  command line should be given values which are reasonable but not expected to 
  957.  cover all cases, as the right value can easily be put on the command line or 
  958.  in the configuration file. 
  959.  
  960.  Please do not change the parameter files supplied -- if you must change them, 
  961.  copy them to a file with a different name first. 
  962.  
  963.  When you have developed (and thoroughly tested) a set of parameters for a new 
  964.  printer or mode, please send them to the author (address in the readme.eng 
  965.  file), so that others can profit from it and so that a standard is upheld. 
  966.  
  967.  If you cannot create a parameter file for a printer using the methods above, 
  968.  please get in touch with the author so that makedot and dvidot can be extended 
  969.  to cover this new case. 
  970.  
  971.  
  972. ΓòÉΓòÉΓòÉ 6. 6 Appendix: Old method for inserting parameters in a code sequence ΓòÉΓòÉΓòÉ
  973.  
  974.  If you need to read an old parameter file: here's the old method for inserting 
  975.  parameters in code sequences.  When converting old DOT files to new ones, the 
  976.  code sequences will be automatically converted, therefore you don't have to 
  977.  read this. 
  978.  
  979.  The following commands are used for inserting a numeric parameter in a code 
  980.  sequence (see below for xx): 
  981.  
  982.  xx+# 
  983.  
  984.      Add # to parameter before inserting parameter 
  985.  
  986.  xx-# 
  987.  
  988.      Subtract # from parameter before inserting parameter 
  989.  
  990.  xx*#+# 
  991.  
  992.      Multiply parameter by the first number and add the second number before 
  993.      inserting parameter 
  994.  
  995.  xx*#-# 
  996.  
  997.      Multiply parameter by the first number and add the second number before 
  998.      inserting parameter 
  999.  
  1000.  You cannot use xx alone, use xx+0 instead.  Choose xx from the following: 
  1001.  
  1002.  D1 to D9 
  1003.  
  1004.      The parameter is inserted as a decimal number (in characters) with leading 
  1005.      zeros (D1: filled to one place, D9: filled to nine places). 
  1006.  
  1007.  L 
  1008.  
  1009.      The low byte of the parameter is inserted as a binary number. 
  1010.  
  1011.  H 
  1012.  
  1013.      The high byte of the parameter is inserted as a binary number. 
  1014.  
  1015.  LH 
  1016.  
  1017.      The parameter is inserted as a binary number in two bytes (the low byte 
  1018.      first then the high byte). 
  1019.  
  1020.  HL 
  1021.  
  1022.      The parameter is inserted as a binary number in two bytes (the high byte 
  1023.      first then the low byte). 
  1024.  
  1025.  The parameter depends on the context: 
  1026.  
  1027.  INIT1   one_line_feed 
  1028.  
  1029.  INIT2   one_line_feed 
  1030.  
  1031.  GRAPH_MODE pixels 
  1032.  
  1033.  LINE_FEED line_feed 
  1034.  
  1035.  POS_X   pos_x 
  1036.