1 Copyright (c) 1999 Massachusetts Institute of Technology
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or (at
6 your option) any later version.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 ------------------------------
18 Character Mode for the XGP
20 The PDP-11 program for the XGP interprets character strings in files
21 in the following format:
24 Byte Usual meaning Escape significance
26 0 Null - byte is ignored Normal
42 Normal means the definition of this byte in the current font will be
43 printed. If this byte is undefined in the current font, it will be
46 ESCAPE causes the next byte to have an alternate meaning selected
47 from the column "Escape significance".
49 Backspace spaces to the left the width of
50 one space in the current font, including inter-character
53 TAB produces a column select to the column which is at least the
54 width of a blank to the right of the current column position, and
55 some multiple of 8 blank widths to the right of the left margin.
56 (this computation of the width includes the inter character spacing)
58 LF activates the current text line. The current text will be queued
59 to printed. This line will be printed at a vertical location such
60 that the distance between the baselines of of it and the preceeding line
61 is equal to the vertical spacing parameter, unless this would cause
62 the subscripts of the former line to overlap vertically with the superscripts
63 of this line. It will then be pushed down to make this not the case.
65 FF, like LF, activates the text. In addition, FF causes a page
66 eject after the current text line is printed. FF also sets the
67 defalut Y position to the first line below the top of page margin on
70 The program will automatically form feed when the next text line would
71 place characters below the bottom margin. Sequential form feeds will
72 increment the page number but will otherwise be ignored.
74 CR causes a column select to the current left margin to be
75 generated. This can be used to produce overprinting.
78 XGP ESCAPE 1 ('177&'001) causes the next 7 bits to be read as a
79 special operation code. The following codes are implemented:
82 The code, 0 to 3 is taken as the font identification
83 number of the font to use.
85 4-37 Reserved for future use.
87 40 XGP Column Selector
88 The next 14 bits are taken as the
89 x-position to print at next. (The intention is to
90 allow arbitrary width spaces for text justification.)
93 The next 7 bits are taken as the scan-line number on
94 which to underscore. It is taken as a 2's complement
95 increment to the base line. Zero is on the baseline,
96 positive bytes are down from it. Underscores outside
97 the range of the other characters on the line will be
98 ignored. The next 14 bits are taken as the length
102 This does a line feed and then takes the byte as the
103 number of lines between this line's baseline and the
104 baeline of the following line.
107 The next 7 bits are taken in two's complement as the
108 base-line adjustment to the current font. The
109 adjustment sticks until reset by another adjust
110 command or a font select. The intention is to allow a
111 font to be used for subscripts and superscripts.
112 (Increment baseline for superscript, decrement for
115 ** 44 Print the paper page number.
116 The paper page number is set to 1 by a form feed. It
117 is incremented each time the paper is cut. The
118 decimal value of this count is printed.
120 ** 45 Accept heading text.
121 The next byte is a count of bytes to follow. Those
122 bytes will be read into the heading line. When that
123 count is exhausted, the heading line will be printed.
124 If a line feed or line space command is given that
125 would cause text to be printed below the current text
126 area, a form feed is inserted by the XGP and if a
127 heading is defined, it will be printed.
130 Set the left end of an underline. See Stop Underline.
133 The next byte is the scan line on which to write the
134 underline (same as XGP Underscore). The extent of
135 the underscore is defined by this command and Start
136 Underline. If this command is not preceded by a Start
137 Underline, it will underline from the left margin.
138 Beware of column selects. No underline will happen
139 until this command is given.
141 50 Takes the next byte as the intercharacter spacing
142 This is reset to zero at the end of each line.
144 XGP ESCAPE 2 ('177&'002) causes the next 7 bits to be taken as the
145 column increment. This quantity is signed: 0-77 are positive
146 increments 100 to 177 are negative increments (100
\19 -100, 177
\19 -1).
148 XGP ESCAPE 3 ('177&'003) causes the next 2 bytes to be taken as the
149 scan line number on which to start this text line. Scan line 0 is
150 the first scan line on the page (immediately following the cut).
151 The topmost scanline of the present text line will be placed on the
152 scan line indicated in this command.
155 ** XGP ESCAPE 4 ('177&'004). This escape is used to specify a vector.
156 It is followed by 11 bytes describing the vector:
158 2 bytes Y0 Scan line number of first line of vector.
159 2 bytes X0 Column position of left edge of first line
161 3 bytes DX Delta X. 1 bit of sign; 11 bits of integer;
163 2 bytes N The number of scan lines on which this vector
165 2 bytes W The column width of each scan-line.
167 The XGP service must be presented with vectors sorted by
168 ascendending values of Y0. If the vectors are not sorted, the
169 output will be wrong.
171 The escape significance of codes 5 through 10, 13, and 16 through
172 37 is not defined at the present time but reserved for future use.