home *** CD-ROM | disk | FTP | other *** search
- ==============================================================================
- MAKEDOT.DOC (makedot 1.1c) VERSION: 22.09.1990
- ==============================================================================
-
- This program is used to generate parameter files for dvidot. It has two
- functions:
-
- - conversion of a text file into a parameter file (.dot)
- - conversion of a parameter file (.dot) into a text file
-
- To modify parameter files they must first be converted into a text file which
- can then be changed with an editor. The modified text file can then be
- converted back into a parameter file again.
-
-
- Usage
- =====
-
- To convert a text file into a parameter file:
-
- makedot -c <input file> [<output file>]
-
- The default extension for the output file is dot. If no output file name is
- given, the name of the input file (with the extension .dot) is used.
- If you specify - for the input file, the text file is read from standard
- input.
-
- To convert a parameter file into a text file:
-
- makedot -d <input file> [<output file>]
-
- The default extension for the input file is dot. If no output file name is
- given then the input file name (without the extension .dot) is used.
- If you specify - for the output file, the text file is written to standard
- output.
-
-
- Text file format
- ================
-
- A text file can contain comment lines which begin with `*', all the characters
- after the asterisk are ignored. Blank lines are also ignored.
-
- All other lines contain a keyword followed by an equals sign. Parameters
- for this keyword follow the equals sign. (There are keywords which don't
- require parameters.)
-
-
- Keywords
- --------
-
- The keywords given below must be used in the order given. All keywords
- (but COMMENT and VF_PATH) must be specified. Optional parts
- of a line are enclosed in square brackets, alternatives are separated by a
- vertical bar. The different kinds of argument are abbreviated as follows:
-
- d dimension: number and TeX unit (px may be used as well)
- n number
- s printer control sequence
- t text
-
- These argument types are explained below. This is the table of keywords:
-
- [COMMENT=[t]] Comment: it is saved in the parameter file
- but ignored.
-
- ENV_NAME=t Name of an environment variable, from which
- dvidot should take options.
-
- LOG_NAME=t Name of the transcript file.
-
- FONT_PATH=t Path for font files. This is the default
- setting for the /pf* option.
-
- [VF_PATH=t] Path for vf files. This is the default
- setting for the /pv* option and should
- be left empty.
-
- PAGE_WIDTH=d Page width. Default setting for /w#.
-
- PAGE_HEIGHT=d Page height. Default setting for /h#.
-
- FORM_LENGTH=[d] Form length. Default setting for /hf#.
- Needed only for FF_METHOD=LF. If not given,
- dvidot will use the value set for the page
- height as the form length.
-
- RESOLUTION=n1 n2 Resolution. n1 is the default for /rx#, n2 is
- the default for /ry#.
-
- COLUMNS=n Maximum number of horizontal dots in graphics
- mode. This value is an upper bound for /w#.
-
- ONE_LINE_FEED=[n] This value is used by INIT1 and INIT2
- to program the printer's line spacing.
- If LINE_FEED (see below) is used to reprogram
- the line spacing, then the argument to
- ONE_LINE_FEED must be empty.
-
- BLANK_WIDTH=[n] Width of a space character. Space characters
- are used at the left margin to move the print
- head to the right. For this reason, the width
- of a space character is required in graphics
- mode dots. If spaces should not be used for
- this movement, then the argument must be left
- empty.
-
- METHOD=n1 n2 Printing method. The number n1 is the number
- of bytes that must be sent to the printer to
- print a column of dots in the selected
- graphic mode (1 to 6). n2 is the number of
- passes per line (separated by the smallest
- line spacing). If, for instance, the pin
- spacing is 1/72 inch and the printer can move
- the paper in 1/216 inch steps reasonably
- reliably, then n2 can be set to 3. In this
- way this example can attain a vertical
- resolution of 216 DPI. Values from 1 to 6
- can be used.
-
- MAX_WIDTH=[n1 [n2]] If the page width, converted to graphics mode
- dots, is set to one of these values, it is
- reduced by 1 (dot), so that the printer does
- not execute an automatic line feed when it
- reaches the righthand margin. This will leave
- a blank dot at the right margin.
-
- PINS=n1 n2 The bit numbers of the print head pins: n1 is
- the bit number corresponding to the top pin
- and n2 is the bit number corresponding to the
- bottom pin (most printers are set to PINS=0 7
- or PINS=7 0). Values from 0 to 7 can be
- entered.
-
- MAX_LF=n This is the largest line spacing which can be
- set by a printer control sequence expressed in
- graphics mode dots -- see LINE_FEED.
-
- FF_METHOD=FF|LF Page throw method: either a FORM_FEED sequence
- or multiple line feeds (see FORM_LENGTH).
-
- S_OPTION=OFF|SLOW|DOUBLE_STRIKE
- This sets the meaning of the /s+ option. When
- set to OFF there is no /s+ option. If set to
- SLOW, /s+ selects INIT2 rather than INIT1. If
- set to DOUBLE_STRIKE, the /s+ option selects
- INIT2 instead of INIT1 as well as making two
- passes over each output line. In the first
- pass dots 1, 3, 5, ... are printed and in
- the second pass dots 2, 4, 6, ... This is
- intended for printers (like the FX-80) which
- cannot print two consecutive dots with the
- same needle.
-
- INIT1=[s] The printer initialization sequence which is
- output when the /s- option is selected. The
- parameter used for the printer control
- sequence is the value set by ONE_LINE_FEED.
-
- INIT2=[s] The printer initialization sequence which is
- output when the /s+ option is selected. The
- parameter used for the printer control
- sequence is the value set by ONE_LINE_FEED.
-
- EXIT=[s] This sets the printer control sequence which
- is sent to the printer at the end of the job.
-
- GRAPH_MODE=[s] This sets the printer control sequence which
- selects the desired graphics mode. The
- parameter used in the sequence is the number
- of dots per line.
-
- GRAPH_END=[s] This is the printer control sequence which is
- sent to the printer immediately after the
- graphics data -- normally empty.
-
- LINE_FEED=[s] The printer control sequence which causes a
- line feed. If ONE_LINE_FEED is set then this
- sequence must give a line feed with the line
- spacing specified with ONE_LINE_FEED. Also
- used with FF_METHOD=LF.
-
- FORM_FEED=[s] The printer control sequence required for a
- page throw. It is necessary for FF_METHOD=FF.
-
- POS_X=[s] The control sequence which positions the print
- head horizontally. The parameter used in this
- sequence is the horizontal position required
- in graphics mode dots. Not required.
-
-
- Printer control sequences
- -------------------------
-
- These sequences usually consist of serveral parts which are separated by
- spaces. Each part can be constructed from the following tokens:
-
- ASCII control code and other names.
-
- NUL Code 00(hex) 0(dec).
- SOH Code 01(hex) 1(dec).
- STX Code 02(hex) 2(dec).
- ETX Code 03(hex) 3(dec).
- EOT Code 04(hex) 4(dec).
- ENQ Code 05(hex) 5(dec).
- ACK Code 06(hex) 6(dec).
- BEL Code 07(hex) 7(dec).
- BS Code 08(hex) 8(dec).
- TAB Code 09(hex) 9(dec).
- HT Code 09(hex) 9(dec).
- LF Code 0A(hex) 10(dec).
- VT Code 0B(hex) 11(dec).
- FF Code 0C(hex) 12(dec).
- CR Code 0D(hex) 13(dec).
- SO Code 0E(hex) 14(dec).
- SI Code 0F(hex) 15(dec).
- DLE Code 10(hex) 16(dec).
- DC1 Code 11(hex) 17(dec).
- DC2 Code 12(hex) 18(dec).
- DC3 Code 13(hex) 19(dec).
- DC4 Code 14(hex) 20(dec).
- NAK Code 15(hex) 21(dec).
- SYN Code 16(hex) 22(dec).
- ETB Code 17(hex) 23(dec).
- CAN Code 18(hex) 24(dec).
- EM Code 19(hex) 25(dec).
- SUB Code 1A(hex) 26(dec).
- ESC Code 1B(hex) 27(dec).
- FS Code 1C(hex) 28(dec).
- GS Code 1D(hex) 29(dec).
- RS Code 1E(hex) 30(dec).
- US Code 1F(hex) 31(dec).
- DEL Code 7F(hex) 127(dec).
-
- ASCII printing characters.
-
- 'x A single character: the character following ' is sent as is.
- "xxx" A string of characters: the characters following " up to, but
- not including, the next " in the same line are sent to the
- printer.
-
- Numbers standing for a character's ASCII code.
-
- 0### Octal number: # is a digit from 0 to 7.
- 0x## Hexadecimal number: # is a character from the set (0-9, A-F).
- ### Decimal number: # is a digit from 0 to 9.
- Note: a leading zero will cause the number to be interpreted
- as octal (see 0###).
-
- Control characters.
-
- ^A Control characters: ^a to ^a or ^A to ^Z stand for codes 1 to
- 26, ^@ stands for 0.
-
- Parameter (inserting a numeric parameter in a control sequence).
-
- You may use one of the following templates (see below for xx):
- xx+# Add # to parameter before inserting parameter
- xx-# Subtract # from parameter before inserting parameter
- xx*#+# Multiply parameter by the first number and add the
- second number before inserting parameter
- xx*#-# Multiply parameter by the first number and add the
- second number before inserting parameter
- You cannot use xx alone, use xx+0 instead. Choose xx from the
- following:
-
- D1 to D9
- The parameter is inserted as a decimal number (in characters)
- with leading zeros (D1: one place, D9: nine places).
-
- L
- The low byte of the parameter is inserted as a binary number.
-
- H
- The high byte of the parameter is inserted as a binary number.
-
- LH
- The parameter is inserted as a binary number in two bytes
- (the low byte first then the high byte).
-
- HL
- The parameter is inserted as a binary number in two bytes
- (the high byte first then the low byte).
-
-
- Examples of printer control sequences
- -------------------------------------
-
- 240 DPI graphics mode for the EPSON FX-80:
-
- ESC '* 3 LH+0
-
- In hexadecimal this is: 1B 2A 03 n1 n2, where n1+256*n2
- is the width of the graphic in dots.
-
- Line feed for NEC P6:
-
- FS '3 L+0 LF
-
- In hexadecimal this is: 1C 33 n1 0A. The paper will be moved by n1/360 in.
-
- Horizontal positioning for a C.ITOH 8510A:
-
- ESC 'F D4+0
-
- In hexadecimal this is: 1B 46 n1 n2 n3 n4, where n1 to n4
- are numbers (30 to 39) which give the horizontal position.
-
- A 24 pin graphics mode, specify number of bytes + 1 (width * 3 + 1):
-
- ESC "[g" LH*3+1 5
-
- In hexadecimal this is (the parameter is assumed to be 100):
-
- 1B 5B 67 2D 01 05
- ^^^^^
- 301 = 3*100+1
-
- Nonsense example:
-
- ^A "abc" TAB ' 010 10 0x10 " ' "
-
- In hexadecimal this is: 01 61 62 63 09 20 08 0A 10 20 27 20.
-
-
- Notes
- =====
-
- Some of the settings can also be made through command line options of
- dvidot, this way is recommended. Each printer (and printer mode) should
- have its own parameter file. Parameter file settings which can be changed
- on the dvidot command line should be given values which are reasonable but
- not expected to cover all cases, as the right value can easily be put on the
- command line or in the configuration file.
-
- Please do not change the parameter files supplied -- if you must change them,
- copy them to a file with a different name first.
-
- When you have developed (and thoroughly tested) a set of parameters for a new
- printer or mode, please send them to the author (address in the README file),
- so that others can profit from it and so that a standard is upheld.
-
- If you cannot create a parameter file for a printer using the methods above,
- please get in touch with the author so that makedot/dvidot can be extended to
- cover this new case.
-
- If you want a set of fonts for a printer which the author does not offer,
- please get in touch with him before you torture your machine with MFjob. It
- is enough when one person generates the fonts! You should, however, find out
- the correct settings for METAFONT first and send them in.
-
- A parameter file containing xx*#+# or xx*#-# in a printer control sequence
- cannot be used with older versions of dvidot.
-
-
-
- History
- =======
-
- Version 1.0a (21.02.90):
- ------------------------
-
- First version.
-
-
- Version 1.1a (22.03.90):
- ------------------------
-
- - New keyword: VF_PATH.
-
- - METHOD=n1 n2: New range for n1 and n2: 1 to 6.
-
-
- Version 1.1b (22.06.90):
- ------------------------
-
- - xx*#+# and xx*#-#.
-
-
- Version 1.1c (22.09.90):
- ------------------------
-
- - Bug fixed (`makedot -d' output of LH+n and HL+n with non-zero n).
-
- - Bug gixed (`makedot -d' output of BLANK_WIDTH=<empty>).
-
-
- -------- End of MAKEDOT.DOC -------------
-