1Last change: 23 August 1992
2
3
4			GB2PS 2.02 HELP FILE
5			====================
6
7o What is GB2PS?
8================
9	GB2PS is a conversion program, which converts the GB code and HZ
10code article into PostScript printable files that can be printed on
11PostScript printers.
12
13
14o What's new in this version?
15============================
16	In this version, GB2PS can do simple page formatting, change chinese
17font and font size, select pages to be converted, cover page, page
18number, etc. But more importantly, its performance has been
19improved dramatically (Thanks Zhi Quan Luo,xluo@lids.mit.edu), the size
20of average PS file(10 pages) reduces almost 5 times (from over 2.3MB to
21about 440KB) compare with version 1.0, and printing speed is about
2215~30 second/page. You don't need to worry about printer memory and
23spooling area any more.
24
25	Five chinese fonts are provided in this release, they are Song,
26Kai, Fang Song, Hei and FanTi fonts.  This version also supports the HZ
27ENCODING, so don't be confused by the name of 'GB2PS'.  It can do more
28than just 'GB-to-PS'.
29
30
31o Usages of GB2PS
32=================
33
34  	gb2ps 	[-h][-y year][-m month][-i issue][-p][-t][-f][-b page_no]
35		[-e page_no] input_file [output_file]
36
37	OPTIONS:
38		-h		Help, print the usage of GB2PS
39
40		-y year
41		-m month
42		-i issue	These parameters are used for generating the
43				cover page file, they will be passed to
44				the coverpage PS file directly.
45		-t              do not generate cover page.
46		-p		do not generate page number.
47		-f		enable page formatting.
48		-b page_no	begin generating PS file from page page_no.
49		-e page_no	end generating PS file at page page_no.
50
51	Normally, PostScript program is big. In this version, I have tried
52to reduce the size of PS file as much as possible. However, it's still
53possible that the spooling area be overflowed if a large print job is
54sent. In this case, use -b and -e options to generate a series of PS
55files, then print them separately.
56
57	This version of gb2ps can automatically generate cover page for the
58HXWZ printouts. The year, month and issue number can be set manually or
59generated by system following the HXWZ name convention:
60
61	cmyymmi.gb -- 	yy: year
62			mm: month
63			i:  issue
64	ie.cm9105a.gb
65
66Note: The page number of cover page is 0.
67
68	COVER.PS is the cover page description PS file, users can design their
69own cover page if they can follow the rules, see file COVER.PS for more
70details.
71
72Examples:
73	input:	gb2ps -h
74	output:	the usage of GB2PS
75
76	input:	gb2ps cm9203d.gb cm.ps
77	output: Converts gb file cm9203d.gb to PS program cm.ps.
78
79	input:	gb2ps cm9208a.hz cm.ps
80	output: Converts HZ file cm9208a.hz to PS program cm.ps.
81
82	input:	gb2ps -b 3 -e 5 cm9105a.gb cm.ps
83	output: Converts gb file cm9105a.gb to PS program cm.ps from page
84		3 to page 5.
85
86	input:	gb2ps -f -b 6 cm9202a.gb cm
87	output: Converts gb file cm9202a.gb to PS program cm.ps from page
88		6 to the end of the article with page formatting enable.
89
90
91
92o ENVIRONMENT VARIABLES
93=======================
94	GB2PS allows user to change the chinese characters font and cover page
95PS file at run time through environment variables, these variables
96are:
97
98
99	CFONT		Chinese characters font files directory.
100	COVERPAGE	Cover page PS file.
101
102o Printing the PS programs
103==========================
104
105	You can get the chinese article by sending the PS programs to your PS
106printer:
107
108		print -P printer_name -M PostScript PS_program
109Examples:
110		print -P dcslw -M PostScript cm
111
112* Note: The 'print' is a printing command in SUN OS(UNIX) system.
113
114o System environment
115====================
116	GB2PS is developed in UNIX system, but I don't think you will have any
117difficulty to port it into DOS or VMS system.
118
119o Chinese fonts
120===============
121	GB2PS version 2.02 uses a new format chinese font file, compare
122with the GB2PS version 1.0, it saves almost 220KB space. The format of
123the font file is:
124		XXXX YYYY
125XXXX -- four digits QUWEI code
126YYYY -- 24X24 chinese character bitmap
127
128	The version can support up to six 24X24 chinese fonts, Song, Fang Song,
129Kai, Hei, Fan and user defined chinese font. This release provides five chinese
130fonts (Thanks Bo Yang,eric@COEUS.UCSD.EDU, for his 'c2cc').
131
132o Basic Concepts of Page Formatting
133==================================
134	The followings are basic concepts that have being used in GB2PS.
135Margins, baseline and first indent are logical concepts, they are
136invisible.
137
138
139+------------------------------------------+
140|                                          |
141|   +----------------------------------+   |
142|<->|<-left margin(72) ^ right margin->|<->|
143|   |                  |    (72)       |   |<----blank paper
144|   |            top margin(72)        |   |
145|   |                                  |   |
146|   |                                  |   |
147|   |                                  |   |
148|   |                                  |   |
149|   | first indent(0)                  |   |
150|   |<--->|                            |   |
151|   |     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_______ <- baseline
152|   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   |
153|   XXXXXXXXXXXXXXXXXXXX  ^            |   |
154|   |                     |            |   |
155|   |                     |            |   |
156|   |                  a paragraph     |   |
157|   |                                  |   |
158|   |                                  |   |
159|   |                                  |   |
160|   |                                  |   |
161|   |                                  |   |
162|   |                                  |   |
163|   |                                  |   |
164|   |                                  |   |
165|   |                                  |   |
166|   |                                  |   |
167|   |            bottom margin(72)     |   |
168|   |                 |                |   |
169|   |                 v                |   |
170|   +----------------------------------+   |
171|                                          |
172+------------------------------------------+
173
174o Page Formatting Commands
175==========================
176	This version supports basic page formatting, this is done by user
177manually insert the page formatting command. All the commands begin
178with '<' and end with '>', you can write multiple commands in one < >.
179The units that is being used in the GB2PS is point, 1 point=1/72 inch.
180Space is the separator between commands. The correct command looks like
181<FS FZ 10 20 ML 72>.
182
183
184Note: You should give -f option when running GB2PS with page formatting.
185
1861. Font command 'F':
187	The font command allow user change current chinese font, font size and
188orientation.
189
190	s or S:		Choose Song style chinese font.
191	k or K:		Choose Kai style chinese font.
192	f or F: 	Choose Fang Song style chinese font.
193	h or H:		Choose Hei style chinese font.
194	g or G:		Choose Fan style chinese font.
195	u or U:		Choose user defined chinese font.
196
197	z XXX YYY or Z XXX YYY:
198			Change font size, follow by two numbers
199			specifies the scale of the font in X and Y
200			directions. Default XXX and YYY are 10.
201	o or O:		Switch font orientation between horizontal and vertical.
202
203	example: <FS FZ 20 10 FO>
204
2052. Margin Command 'M':
206	Margin commands control the format of the printout. For A4 paper, the
207margins are from 0 to 596 horizontally and from 0 to 842 vertically.
208
209	L nnn		Left margin, default is 72.
210	R nnn		Right margin, default is 72.
211	T nnn		Top margin, default is 72.
212	B nnn		bottom margin, default is 72.
213	I nnn
214			First indent. If nnn<0, the formatted paragraph
215			is a hang-up paragraph. The default first indent is 0.
216
217	example:	<ML 72 MR 72 MT 72 MB 72 MI 0>
218
2193. Other commands:
220	<		character '<'. Anytime when GB2PS encounters
221			'<<', it prints a character '<' in printout.
222	G nnn		Set gray level, 0<=nnn<=100, default is 0.
223	L nnn.nn	Line space, default is 3.0.
224	C nnn.nn	Character space, default is 0.07.
225	B [-]nn		Adjust baseline, if the number is negative, it moves
226			baseline up, otherwise moves baseline down.
227	m XXX YYY	Move current position to (XXX,YYY). XXX and YYY should
228			be integer. This command allows user to put text
229			anywhere on the paper.
230o Quality
231=========
232	In the laser printing world, the quality of 24X24 font is really
233not good enough, but, in my experience, if you make another copy on
234photocopier from the original printout (printed by laser printer), this
235copy will be much better in quality than the original one.
236
237o FTP site
238==========
239
240	The current GB2PS can be obtained via anonymous FTP from:
241
242        Site: bellatrix.anu.edu.au (150.203.23.14)
243        Directory:  /pub/gb2ps
244        File:   gb2ps.2.02.tar.Z
245
246
247o AUTHOR
248========
249
250  	The author can be reached by E-mail:  william@cs.anu.edu.au
251 or mail at:
252
253 	   Wei Sun
254 	   Department of Computer Science
255 	   The Australian National University
256 	   Canberra, ACT 2601
257 	   Australia
258
259Comments or reports on bugs and problems are welcome.
260=========================================================================
261
262