***********************************************
* CNPRINT.HELP For CNPRINT Versions 3.10/3.11 *
***********************************************
 Copyright YIDAO CAI (~{2LR@5@~}), 1992-1999  
 All Rights Reserved.
 Free for non-commercial and personal use only. 

 The source code, or part of it, original or modified, may not be 
 included in any other software, without permission from the author.
 See "Author" section of this file for details.

Disclaimer: Posting CNPRINT on any FTP site does not imply the author's
	endorsement of the beliefs of the organization who owns the FTP site.

Last revised on January 10, 1999
-----------------------------------------------------------------------------
PLEASE 
   ***  READ parts 0 (What's New), II (what do you need), IV (First thing to 
	do) and VI (Font) before compile, EVEN if you have used CNPRINT before.
   ***  Users of previous versions: make sure the new version works before 
	deleting the old version. 
   ***  Test with a small file the first time, or view the PS file on screen 
	first, if possible. 
   ***  If you encounter problem using CNPRINT, read part VII.  
   ***  For quick on-line help, type "cnprint -h".
   ***  You do NOT need to get the HBF files and bitmap font files again if 
	you already have them.
   ***  The ftp site "ifcss.org" is now named as "ftp.ifcss.org". 
   ***  To print this file with CNPRINT, you must use "-s3" option.
-----------------------------------------------------------------------------

CONTENT
-----------------------------------------
0.    What Is CNPRINT and What's New
I.    Functions and Features
II.   What Do You Need to Use CNPRINT
III.  Where to Get CNPRINT
IV.   Installation
V.    Usage
VI.   Font Files
VII.  Known Problems
VIII. Author 
IX.   Acknowledgements
Appendix A, B
-----------------------------------------

0. What Is CNPRINT and What's New

CNPRINT, a utility to print Chinese/Japanese/Korean text (or convert to 
	PostScript) under DOS, VMS and UNIX systems.  It works just as 
	a print command on your system.  Currently GB, GBK, Hz, zW, BIG5,
	Big5 Plus, CNS, JIS, EUC, Shift-JIS, KSC, UTF8 and UTF7 formats 
	are supported. 

These versions are updated from V2.40/V2.41. Thanks to users for your 
valuable support and suggestions. 
 
Main changes:
V3.10/3.11
1. Add Big5 Plus and GBK support (not well tested)
2. Optimize font use, build dictionary according to usage of characters
   in each font, not just the default font. It improves efficiency for
   documents with multiple fonts, or when you do not print all pages of
   a document. However, 286 or 386 users may see a slight increase in 
   processing time.
   Now only a small step away from multiple language support. 
3. Re-do the multiple column handling, use fixed space between columns
   for whole document (based on document default settings) --- hopefully
   this will eliminate some of the previously unknown bugs.
4. -cgap=#, -vgap=# 
   command line options to specify space (in pts) between columns (def. 
   2.5 char width) and extra vertical space at the place of column number 
   change (def. 1.5 document line spacing)
5. @[+23] @[-4] to specify char sizes relative to document default.
6. -mimeqp option for decoding MIME quoted printables (=A9=D7=E3 like text).
7. Many more changes inside, and hopeful not much new bugs created.

V3.00/3.01
1. Add TTF (true type font) support using Honda Liaw's subroutines. Your 
   printer or GhostView program must support level 2 PostScript. Use command
   line option -level2 or add a line 
	POSTSCRIPT_LANGUAGE_LEVEL: 2
   in the cnprint.cmd file to set the default to level 2. 
   TTF fonts and HBF bitmap fonts can be used in the same document.
2. Allow large size with @[xxx] sequence
   @[F***]: specify a font, *** is a HBF/HTF/TTF filename (3 to 20 chars)
   The original usage of @[Fx] is still valid.
   @[T**]: specify HTF filename (see section V.2)
3. Bitmap compression using ASCII85: this function needs level 2 PostScript
   printer or Ghostview; it produces smaller PS files; printing speed can 
   be faster or slower depending on your network and printer
4. Font makers usually leave spaces around a character, but this space 
   varies, so the visual sizes of characters from different fonts may
   not equal. To make them equal, you may add a line in the HBF/HTF file
   of each font to adjust their size:
	_CharSizeScaling: 1.002
   Note that the number should be around 1, and is very sensitive to changes.
   You may also add addtional horizontal spacing between chars for a font:
	_AddCharSpacing: 1.8
   This number is relative (1 = 8% of char width), the range is -5 to 20.  
   For HBF file, these two lines must appear after all regular HBF property
   lines and before the HBF_END_FONT line   
5. -level1 or -level2 set PS language level to 1 or 2

V2.90/2.91
1. print address labels (-label option).  Need to update file cnprint.cmd 
   for this option to work properly.  See @[LBAR] in section V.3 on how to
   specify addresses of sender and receiver.
2. GB<->B5 may use the phrase dictionary from "wordg2b" 
3. added several command-line options:
   -f: two-sided format (but does not print two-sided!)
   -extr: extract/print selected pages from a PS file (use with -be, -o)
   -epsms: MS format EPS (add a CTRL-D at the beginning of the EPS file)
   -odd, -even: -o and -oo still works. 
4. @[DF] also sets char width/height ratio (Cx, Cy) to default
5. optimized comma treatment in vertical mode
6. several bug fixes supplied by Ron Grenier

V2.80/2.81
1. added several command-line options
   -mfeed (manual feed)
   -eps (-e still works)
   -nopage (do not print page number and date)
   -h#, set default English font (e.g. -h3: Helvetica)
   -big5, input file is big5 (-5 still works)
2. do not break English (ascii) words: algorithm rewritten
3. -io option, re-designed some of the messages so that it works better
   when used as a filter.  For unix, filter setup is provided in appendix.

V2.70/2.71
1. -r8: CStar format to regular DOS format (-r7 the reserve)
2. -bk, booklet format (only even number of columns allowed)
3. -rm(lm/tm/bm)=12, right (left/top/bottom) margin 12 mm
4. -size=10.5, char size 10.5 pts
5. -euro, disable/enable printing European chars.  Default: auto-detect.
6. Several functional sequences:
	  @[BR]: issue a line break (useful in Japanese document);
	  @[DF]: use default settings for font, size, line and char spaces;
	  @[F0]: use default font.
  (Note: the default setting means the setting in "cnprint.cmd",
	command-line, or selected by menu)
7. Fixed a bug with @[C0], now return to default column numbers, not 1.
8. Add -letter(legal)(a3)(a4) to select paper sizes.  Note it does not 
   actually select the proper paper tray on printer, but only use the paper 
   size to generate image.
9. Add -gb2hz, -hz2gb options (original -z and -zz still work).
10. (DOS and VMS) Accept wildcard in input file name (e.g. hxwz*.gb).
11. Set default page number position in "cnprint.cmd".
12. -env(s): envelope mode on command-line.
13. -fpg(5): (multiple input files) start new page for each new input file
	(if within 5 lines to bottom).
14. -bmps#: shift bitmap of a char.
15. CNS support (convert to Big5 and then print).
16. GB(HZ)<->B5 conversion.
17. Now write to stdout, thus can be used as a "filter". But there may be some
   problems with file protection for multiple users.  It works on my linux as 
   a filter defined in "printcap" file. 

V2.60/2.61
1. Six positions for page number
2. Allow pipeline-input for unix and DOS (-i option)
3. Support Korean KSC-5601
4. Support more Japanese formats: JIS (old-, new-, nec-), shift-JIS, EUC
5. Auto-detect input codes (either Chinese or Japanese, not both)
6. Vertical option for Japanese 
7. -f hbfname --> -f=hbfname; 
   -n 0       --> -n=0        
8. Repair functions for GB/Big5/JIS
9. Added control to make the text (e.g. titles) appear at the center
   of a line (@[CB], @[CE])
10. Support European characters generated by NJstar (those characters
	are mapped to 128-160)
11. Now do not break English (ascii) words and numbers like 123.4
12. Draw a line under text (@[UB], @[UE])
13. Specify char size on command line:
	-size=15.4
14. Support unicode (utf8, utf7)  
13. Fixed some bugs.

Version 2.x0 is for UNIX and VMS, Version 2.x1 is for DOS.


I. Functions and Features

1. Print GB/Hz/zW/Big5/JIS/EUC/KSC/UTF7/UTF8 format CJK documents (or pure
   English documents), or convert them to PostScript. (a, b)
2. Hz <-> GB conversions. (c).
3. Small disk space requirement; PS file < 400K per issue of HXWZ.  
4. Support HBF, work with almost all bitmap font files with any sizes.
5. Change font (character size) for a whole document, set font (character
    size) for a group of characters.
6. Multi-column for a page or part of a page.
7. "Intelligent" treatment of punctuation marks.
8. Set gray level for a whole document or a group of characters.
9. Page numbering, change of margins.
10. Set paper orientation: Portrait or Landscape.
11. Vertical printing mode.
12. Change line space and character space and width of English chars.
13. Change English font.
14. Multiple copies of print-out.
15. User defined default values for margins, character size, etc.
16. Start a new page at any point (@[P#]).
17. Generate and import EPS files (picture/graph/text). (see V.10, V.17)
18. Page header, i.e. put something on a specific place on every page.
    (see V.17)
19. Character or word statistics (enhanced version only, see V.18)
20. Support European characters
21. Friendly designed so that even if you make a mistake the program would
    take care for you in most cases.
22. Recently added features.

(a). SPEED of printing depends on printer and the number of characters in 
a page (from 3-4 pages per minute to 1.5 minutes per page).  The fastest 
reported so far is 135 seconds for one issue of HXWZ.  

(b). If one page, the PS file conforms to the Encapsulated PostScript file 
format EPSF 3.0 and can be included in other documents (such as a Microsoft 
Word document).  See part V for details.

(c). Simple Hz<->GB conversion for standard Hz/GB file.  For files that might
contain bugs, F. F. Lee's hz2gb is suggested.  The use of zW is discouraged,
as proposed by Mr. Ya-Gui Wei, co-inventor of zW, in ZWDOS help file.


II. What Do You Need to Use CNPRINT

A machine runing UNIX or VMS (V3.x0), or an (IBM compatible) PC 
	running DOS (V3.x1)
A PostScript printer (CAUTION: NOT ordinary laser printer)
        	OR 
    (for any other printer) install GhostScript and print from GhostScript 
CNPRINT V?.??
One or more Chinese (HBF) font file(s) (see part VI)


III. Where to Get CNPRINT

site: ftp.ifcss.org
directory: /pub/software/unix/print (cnprint300.readme, cnprint300.tar.gz)
	   /pub/software/vms/print (cnprint300.readme, cnprint300.zip)
	   /pub/software/dos/print (cnprint.doc, cnprint.zip)

Note: 
1. For fast access, you may use one of the following mirrors of
   the /software directory at ftp.ifcss.org: 
(Beijing)   info.bta.net.cn:/pub/software (partial);
(Shanghai)  info.sta.net.cn:/pub/software (partial);
(Singapore) ftp.technet.sg:/pub/chinese (full)
(Taiwan)    ftp.edu.tw:/Chinese/ifcss/software (full);
(Taiwan)    nctuccca.edu.tw (IP: 140.111.3.21);
(US)        cnd.org:/pub/software (IP: 132.249.229.100);
	
Or use these sites which carry CNPRINT (not a complete list):
  1).    pcluo.unibw-hamburg.de (139.11.212.103): /software. 
	 From:   m_luo@unibw-hamburg.DE  2-APR-1995 15:05:47.45
  2).    ftp.uwtc.washington.edu:/pub/Japanese
  3).    ftp.cdrom.com:/.13/japanese/kuso/KENLUNDE/ujip/dos(unix)
  4).    Australia  ftp.monash.edu.au/pub/nihongo
	 Some monash mirrors:    
	  ftp.cdrom.com:pub/japanese/monash     US - California
	  kuso.shef.ac.uk:pub/japanese/monu6    UK
	  enterprise.ic.gc.ca:pub/nihongo       Canada
	  ftp.u-aizu.ac.jp/pub/misc/nihongo/ftp.cc.monash.edu.au/  Japan
	
The author will only update ftp.ifcss.org and ftp.neurophys.wisc.edu (see next)
with each release, but notice will be posted to relevent newsgroups.

2. The site at ftp.neurophys.wisc.edu:/pub/cn (use "anonymous" as user name) 
   also has the above files (except fonts and HBF files). This site contains
   the LASTEST but may not formally released versions and some "bug-fix" for
   unusual systems.  You may want to read the file "00readme.0" if you have
   any questions. 

The files at this ftp site can be reached by WWW at
	http://www.neurophys.wisc.edu/~cai/software.html.
	  
3. After gunzip or unzip the file "cnprint3x0.tar.gz" (or cnprint3x0.zip,
   cnprint.zip), you will get the first 3-6 files depending on your system.
   You need to get font files and HBF files seperately (or you can use font
   and HBF files from other softwares). Please read part VI before you get
   any font or HBF file.
	
UNIX:   cnprint3x0.help, cnprint3x0.c, cns2b5.c, ttf16b.c, cnprint.cmd, 
        cnprint.1, fonts, HBF files
VMS:    cnprint.help, cnprint3x0.exe, cnprint.cmd, fonts, HBF files
DOS:    cnprint.hlp, cnprint.exe, cnprint.cmd, fonts, HBF files
	  
4. For GB(HZ)<->BIG5 conversion, a table file is needed.  You can get the 
   one at pub/software/dos/convert/hc.map (by Young & Lee). The table file
   is NOT part of CNPRINT.  See section V.27 for more information about 
   the table file and the conversion.


IV. Installation

1. Edit file "cnprint.cmd" to add/change some default settings.

(Users of V3.10/3.11 or earlier: The data in "cnprint.cmd" of this 
version is updated, old one contains a small bug) (CNPRINT can
work without "cnprint.cmd", but some functions will be lost)   
	
In "cnprint.cmd", you need to 

a. Specify the PS print command (device port) on your system. 
   (DOS only:  the device port for printing PostScript files is most 
   likely to be one of LPT1, LPT2, LPT3, COM2, COM1.  Put "LPT2:" if 
   it is LPT2.  Ask a local expert for help)

WARNING: The print command (port) MUST be the command for printing
	PostScript files.  If you are NOT sure, please DO ask your
	system manager, otherwise it could cause BIG problems. 

If you do not specify the print command (port), CNPRINT would still 
generate PostScript file(s) but would not print it, you can then print
it by sending it to a PS printer or view it with a PS viewer.

b. Specify the default Big5/JIS/KSC/unicode font (HBF) file name 
   if you are going to print Big5/JIS/KSC/unicode(Japanese, Korean or
   unicode) documents. 

c. (Users outside US) Change the paper size if needed.  The default 
   is A (8.5x11 inch).  (see Appendix A for paper sizes). 

d. (NOT required, advanced users only) Specify the path/name of the 
   temporal file and device resolution.

2. (Beginners only) Put all files in one directory and run CNPRINT under 
   that directory.  

3. (NOT required, recommended for advanced users only) Specify the full 
   path (directory) for the font files (HBF files and bitmap files) and
   the file "cnprint.cmd".

DOS: add a line in the "autoexec.bat" file: 

	set HBFPATH=C:\FONT  (if font is kept under dircetory C:\FONT)

UNIX: set an environment variable HBFPATH (put it in your .cshrc or
  .profile file, depending on the shell you use)

	setenv HBFPATH "your_subdir_for_fonts" (.cshrc)
	export HBFPATH=your_subdir_for_fonts (.profile)

VMS: follow steps in 5.

Note: HBFPATH may point to several paths, you may seperate the paths
	by ; in DOS, : in unix, and , in VMS:

	DOS:  set HBFPATH=path1;path2;path3
	unix: setenv HBFPATH "path1:path2:path3"
	VMS:  $HBFPATH :=="path1,path2,path3" (in login.com)

4. (UNIX and VMS only) Compile the source program (there is no need to 
   re-compile after making changes in "cnprint.cmd").  

UNIX:   cc cnprint.c ttf16b.c -o cnprint

if you see a lot of error messages, you may try "gcc", "acc", or ask a local
expert or system manager for help. 

VMS: get "cnprint.exe" directly.  If that did not work, you can get the 
source codes (cnprint.c, ttf16b.c) in the unix package and compile:

	cc cnprint.c
	cc ttf16b.c
	link cnprint ttf16b
	del cnprint.obj;*
	del ttf16b.obj;*

For DEC alpha stations, ignore the thousand lines of warnings. If this did
not work, ask your system manager for help on how to compile a C program.
CNPRINT may not work on old versions of VMS. If you are using old versions
of VMS, ask your system manager to update it.

5. (VMS only) You need to create a login file under your main directory
   (or modify it if already exists).  The file name is "login.com".
   Put two lines similar to the following in it:

	$cnprint :=="$mvsd:[cai.gb]cnprint.exe"
	$HBFPATH :=="mvsd:[cai.gb.font]"

here "mvsd" is my disk name; "[cai.gb]" and "[cai.gb.font]" are my
directories containing "cnprint.exe" and fonts respectively.  You 
should change them accordingly.  If this did not work, ask your
system manager for help on how to setup these things.

6. (DOS only, recommended for advanced users only) If you want to run
   CNPRINT under any directory, you can do either a) or b):

a. put the directory containing cnprint.exe in the PATH in 
   autoexec.bat (but it may make PATH too long);

b. create a file "cnprint.bat" containing a line similar to the 
   following only, 
	
	c:\your_subdirectory\cnprint %1 %2 %3 %4 %5 %6 %7 %8 %9

put this file under a directory which is included in the PATH
(but it doesn't like those options with '=', so you should
use '/' instead, e.g. -f=j24 --> -f/j24).

7. (UNIX only) If you install CNPRINT for group use, or have specified 
   the temporary file in a directory other than your home directory, 
   compile with MUSER defined.

8. Follow the instructions in part VI to get HBF files and bitmap font
   files at the ftp site listed there.

9. Test with pure English text or a short GB/BIG5/JIS/KSC file (one 
   or two lines).  If there is any problem, go to part VII.


V. USAGE  

(also see list of functions added after V2.40/2.41)
For normal usage:       cnprint filename 
For help:               cnprint [-h], or (UNIX) man cnprint
For extended usage:

 cnprint [-h] ... [-gble] [-f=font] [file1 [file2]...] ... [-o=Outfile]

-h:     More pages of help messages (more complete than listed here)
-i(-out): Use standard input (output) (21)
-big5(-55)(big5)(cns): Input is Big5(CNS) file (12)
-z(-zz)(-gb2hz)(-hz2gb)(-zzz): Hz to GB conversion only (4)
-gb2b5(-b52gb)(-hz2b5)(-b52hz): GB(HZ)<->B5 conversions (27)
-w:     Convert to PS without printing (4)
-x2:    Set character width/height 1.2  (2)
-y3:    Set character height/width 1.3  (2)
-p4:    Print/convert 4 pages at a time (8)
-c3(-c320): Divide one page into 3 columns (-c320, optionally specify 
	the space between columns as 20 points, 1 point = 1/72 inch) 
-f=font: Select font (2)
-l(-l3): Set paper orientation Landscape (5)
-j:     At the end of document, the printout does NOT go to the bottom
	of a page if multicolumn
-v(-vv): Vertical printing mode (13)
-s:     Suppress the effects of the functional sequences @[**] (6) 
-t(-tt): Do not print time and CNPRINT logo on lower-left corner 
	(-tt: print time and input file name)
-m3(-m): Print 3 copies of the document (do NOT display menu if -m)
	(-m3m or -mm3 for both)
-g:     Generate PS file of the format used in V2.30/2.31
-hz(zw)(gb): Input is a Hz (zW) (GB) file (7)
-jis(jis8)(euc): Input is a JIS (Japanese) file (7, 12)
-ksc:   Input is a KSC (Korean) file (7, 12)
-a:     Print double letters and numbers as English ones (7)
-e56(-eps): Set the width of English char 0.56 of that of Chinese char 
	(Output is an EPS file if -eps) (-e56e or -ee56 for both) (10)
-d:     Do -e5 and suppress the special treatment of punctuation 
	marks (11)
-b3(e21): begin printing at page 3, and (optional) end printing at 
	page 21 (14)
-r=450:  Print/display device resolution 450 dpi (default 300)
-o(-oo): print only odd-numbered or (-oo) even-numbered pages (14)
-o=PS/GBname: Specify output file name (4)
-q=laserps (DOS, -q=lpt2:): specify the PS print command as "laserps",
	or in DOS, specify the PS print port name as "lpt2:" (15)
-tab:   TAB mode CLK<->ASCII (default: 4 CJK chars or 8 ASCIIs if -aa)
-r#:    repair functions (#: 1-7), see on-line help for more.
-size=15.4: Char size 15.4 points.
-utf8(utf7): Input is 8-bit (7-bit) unicode file.
-lm(rm)(tm)(bm)=10.5: set left(right)(top)(bottom) margin 10.5 mm.
-letter(legal)(a3)(a4): select paper sizes.  
-env(s): envelope mode (-envs: small-sized envelope) (26).
-fpg(5): (multiple input files) start a new page for each new input 
	 file (if within 5 lines to bottom).
(type cnprint -h for updated usage) 

Note:   
a. Most of the options can be combined.
b. The order is not important in most cases.
c. Allow several input files at one time (same format, i.e. GB, Hz, 
   Big5, JIS, KSC).  
d. In unix and DOS, pipeline input is supported (for irregular
   files, don't use pipeline).
e. Input filename can include wildcats (DOS and VMS).
e.g.
	cnprint -w -x2be10 filename 
	cnprint -x2b5e10 filename -o=PSname -hz
	cnprint -x2be10 filename -c2 -o=PSname -q=laserps
	cnprint -x2be10 file1 file2 file3 -w -o=PSname

1. To set margins, line space, character space and character size for   
   the WHOLE document, run CNPRINT and follow the menu instructions,
   or use the command-line options.  You can also set your preferred
   values in cnprint.cmd.

2. To select font and character width-height ratio for the WHOLE document,
   use -f, -x -y options above.  The use of -f option is 
	
	-f k24  or -f=cnk24.hbf for 24x24 Kaishu font
	-f f16  or -f=cnf16.hbf for 16x16 Fanti font 
	(see Part VI for meaning of k24, f16, etc)

***Important*** It is recommended to set the font, line space, char space and 
	char width/height used for the WHOLE document or majority of the 
	document by -f, -x, -y or menu.  This would make the program much
	more efficient.  

3. Functional sequences (@[**]).  Insert them anywhere in your document to
   control certain features of printout.  They will not appear in the
   printout.

@[f*]            select Chinese font, 16, 24, 48.  * is the font style 
	 	 code, see d). (@[F*] is no longer valid)
@[v*] or @[V*]   select Chinese font, 40, 56, 64  (d)
@[F0]            change back to default Chinese font
@[h1] or @[H2]   select English font, normal (upright)
@[q3] or @[Q4]   select English font, italic/oblique (Xieti)
		 capital H/Q: Bold; number 0-9 for different font, 
		 see menu at run time for a list.

@[18]   Set character size in points.  1 point=0.355mm
@[E7]   Set width of English character 0.7 of that of Chinese char
	
@[X2] or @[Y3]  Set character width/height Cx 1.2 or height/width 
	Cy 1.3.  In both cases, the line space, Ci, is set as 
	Ci = Cy + (Cx-1)/2 - 1; if @[X0] (@[Y0]), Ci is set
	to the default value displyed in menu.  @[X#] and @[Y#] are 
	locked, change one will automatically reset the other
	
@[G2]   Set gray level 0.2, 1=white, 9=black, default: 0 (1.0) 
	= full black. 
@[C2]   Column formatting, i.e. divide the text into 2 columns 
	begining at this point.

@[Ix]   Set line space, x must be 0-9, a-f.  1-9 set the line space 
	0.1-0.9 of the standard value and a-f set it 1-6 times of 
	the standard value (standard value = 50% of char size).
	If x is 0, default value is used (as displayed in menu)
@[Ax]   Set character space, x must be 0-9, a-f.  1-f set the char
	space 1-15 times of the standard value (standard value = 8% 
	of char size).  If x is 0, default value is used.

@[EP]   Include EPS file, enter EPS filename when asked by program.
	
@[P2]   Start a new page if the current position is within 2 lines
	of the page end.  If @[P0], start a new page immediately.
	If used with multicolumn option, this command may produce 
	effects some people don't like (while others may like).

@[AS] or @[AR]  (In envelope mode) Mark the beginning of the Address
	of Sender or Receiver.  If AR, CNPRINT moves the left margin
	3.25 or 2 inches to the right so that the address of receiver
	be printed at the desired position.  If the input file
	contains more than one receiver's address, add @[P0]@[AS] at 
	the beginning of each subsequent sender's addresses and select 
	manualfeed option.

@[LBAR], @[LBxx], @[LB]  Use with -label option on command-line,
	mark address of sender and receiver.  

		@[LBAR]
		Address of sender
		limit to 511 chars 
		this address appear on every label
		@[LB02]
		Name and address of receiver 1
		will be printed on label position 2 
		(count from top to bottom, left to right)
		@[LB]
		Name and address of receiver 2
		If label position is not specified, 
		use the next one, which is 3 here.  

@[MVxxxyyy] Move current point to (xxx, yyy), allow you put text
	anywhere on the page.  xxx, yyy are in points (1inch = 72pts)
	and are relative to the upper-left corner of the text.  If 
	(3, 25), put @[MV003025] instead of @[MV325] or @[MV 3 25].  
	If xxx (or yyy) equals 001, then do NOT change x (y) position.
	This is not designed to work with multicolumn at this stage 
	so it may affect the column formatting.

@[CB] or @[CE] Begin/End central adjust.  Make text line(s) (e.g. 
	titles) in between appear at line center, leaving equal 
	spaces on both sides of the text.  The text line(s) must 
	not be part of a long line (i.e. they must be seperated by
	end of line characters at both ends by pressing return or
	enter key.  Spaces before the text will not be counted in  
	determining the position of the text, BUT space after the 
	text will.  Extra spaces may make the line too long to be 
	fit into one printed line and thus cause failure.  
		
	If @[Cb] is used instead of @[CB], non-ASCII spaces befor the
	text will be counted in determining the position of the text. 

@[UB] or @[UE] Begin/end underline.  Draw a line under the text.
	If @[uB]/@[uE], broken line (on:off ratio 10:7). [the sequence 
	UB/UE/uB/uE may be changed in the next version]

@[BR] Insert a line break (useful in Japanese document)
@[DF] Use default settings for font, char size, line and char spaces


a. All the above letters, except otherwise stated, must be in upper case;
   0 or 00 would select the default value in most cases.  The default 
   setting means the values in "cnprint.cmd", command-line, or selected
   through menu.

b. Each of the above sequence would take effect immediately and stop
   only after a selection of the same/similar nature is chosen again, 
   except noted otherwise.  For example, if you select a character 
   size 12 by @[12], it would remain 12 points until you select another
   size, say 15 by @[15].  

c. Column marker @[C*] must begin at the beginning of a paragraph and 
   must end at the end of a paragraph right after the hard return (i.e.
   the beginning of next line, even if it is a blank line).

d. To select font, you must specify font style by j, f, n, k, h, ...
   or J, N, K, H, ... in the place of * in @[f*].  The 
   meaning of j, f... is j/J for Jianti, f/F for Fanti, etc (this is 
   actually set by yourself, see the FONT part).  The font size are 
   small (16x16), middle (24x24) and large (48x48).  To specify small
   size font, both 'f' and '*' in @[f*] must be in lower case; to 
   specify middle size font, one and only one of them should be in 
   lower case, the other in upper case.  For example, @[fH] or @[Fh]
   both select 24x24 Heiti font, and @[ff] select 16x16 Fanti font.
   Similar rules apply to 40x40 (small), 56x56 (middle) and 64x64
   (large) fonts.  But for these three sizes, you should use @[v*]
   or @[V*] to select instead of @[f*] or @[F*].
   (From V3.00/3.01, you may use the full HBF/HTF/TTF file name with the
   @[F***] sequence)

*** The metric information about English font is obtained from HP printers
   and may NOT apply to other printers.  Besides, only printable 
   characters are included.

e. The program will use whatever character size, width/height ratio
   right before the column maker @[C#] setting the parameters for the 
   columns, so it is best to select the character size and width/height
   ratio for most of the multicolumn portion right before the column
   marker @[C#].
 
4. If -w is selected, CNPRINT would generate a PS file but would not send
   it to the printer.  If a PS file name is given, the PS file would
   be kept.  The optional PS/GB name is taken as PS file name unless 

	-z(z)(z) or -r# is selected.
	-zz:  GB -> Hz only; 
	-zzz: GB/[...] -> GB[...]: filter out the functional sequences @[**].

5. If you use -l to change paper orientation to Landscape, the page will be 
   divided into 2 columns (to make it one column, use -lc1 or -c1l).

   -l1, -l2, -l3, -l4:  select one of the sepecial landscape modes, the 
	settings in "cnprint.cmd" will be suppressed.  These modes are 
	designed for printing HXWZ (l1, l2) or LYTX (l3, l4).
	
6. Option -s would suppress the effect of the functional sequence @[**] and
   would not print it.  But if you want it to be printed, use -s# 
   (# is any single digit number and # > 2). 

7. If you use -hz/zw to tell CNPRINT that the input is a Hz/zW file, CNPRINT
   would not ask for conformation.  But this is only optional.

    -a: Print GB-ASCII alpha-numericals to English ones.  Also convert 
	non-ASCII spaces between GB-ASCIIs to ASCII space. [GB only]
    -aa: Input is a pure English text (some settings to make it look nice).
    -jis(euc, jis8)(ksc): Necessary when you print JIS(euc, shift-jis)/KSC 
	(Japanese/Korean) files unless you defined the default encoding as
	JIS/KSC in CNPRINT.CMD.
    -gb: Necessary when printing GB files if the default encoding is not GB.

8. If you do not have enough disk space (this is less likely to happen because
   the PS file generated by CNPRINT is quite small), try -p# option.

9. You MAY not need to wait until the print job finishes to press RETURN.  In
   most machines, you can hit return after the print job is STARTed (not
   just put on the queue). You can test this with a small file. 

10. Default is -e5, i.e., the width of English char half of that of a Chinese
   char.  But since CNPRINT still adjust the punctuations in this case, 
   the print out may not be the same as you expected.  Try -d (see 11) 
   if you need the text to line up.

   If -e, the PS file conforms to EPSF-3.0 standard and can be included in 
   other document such as Microsoft Word on PC (which I tested, may not 
   work on others).  You can NOT preview it properly, but the final 
   print-out is OK(*).  Use -we option to generate the PS file and 
   name the PS file as *.eps.  Be sure to transfer the PS file as a TEXT
   file but open it as an "eps" file.  Also see (17) for more important 
   infomation about EPS file.

   * You must select a PostScript printer as the default printer, 
   otherwise it would not work.  You can "add" a PS printer even if it
   is not present.
   -e can also used to specify the page number to end printing, see (14).

11. In this case, the output would be the SAME as what you see on the screen
   when you edit the text IF you adjusted the number of characters in 
   a line properly.  Also, you should select Courier (the default) for 
   English font if you want the text to line up.  CNPRINT would not 
   adjust the punctuation marks in this case.  For example, a comma (,)
   may appear at the left end of a line.
	
   Note, some popular Chinese editors treat TABs differently, but I believe 
   the way CNPRINT does is the correct way.  Some editors store TAB as
   spaces, this would cause the text not line-up properly if you change
   the size of chars.

12. For KSC documents, adjustment of punctuation marks is disabled.  If you
   did not specify the default Big5/JIS/KSC HBF file in "cnprint.cmd", 
   you need to specify font with -f option.  If -5 is selected twice 
   (by -55 or -5 -5), some horizontal punctuations would be printed as 
   their vertical counterparts in vertical mode and vice versa.  Although 
   CNPRINT can detect Big5 files automatically, it may fail in some 
   extreme cases, so it is best to supply -5 (or define the default
   encoding to BIG5 in CNPRINT.CMD).
	
   Note -e5 (-e55) is NOT interpreted as -e and -5 (-55), use -5e (-55e)
   in this case.

13. In vertical mode, adjustment of punctuation mark is disabled. If document
   is GB/Hz/ZW, selected symbol characters are rotated to make them 
   appear better, and some ASCII punctuations would be printed as their
   Chinese counterparts.  For GB/HZ/ZW, if -v is selected twice, some 
   punctuations are replaced with better looking ones (for BIG5, -v is
   enough).  For JIS/KSC, -v is enough, but this function needs improvement.
	
14. These page numbers are the actual numbers that appear on the print-out, 
   please make sure they do not conflict with the starting page number.

	-b3e:           page 3 to end
	-b3:        set starting page number to be 3
	-b3e8:          page 3 to page 8
	-be21:          beginning to page 21
	-b3e20o:        odd-numbered pages between 3 to 20
	
   Note any -e option immeadiately following the -b option is considered to 
   specify end-printing page number.  If the -e option is before the -b 
   option or there are other options after -b but before -e, the -e
   option is considered to be those defined in (10) above.  

15. This would disable the PS print command (DOS: port name) in "cnprint.cmd".
   Another way to enter the PS print command (port name) is to select -w
   option on command line, then select P and answer YES in the menu.

16. The multi-input function can be used to merge several text files, e.g.
   cnprint -wn99 file1 file2 file3 -o=file.all


17. Generate/Import EPS file and Page Header.  Use -e to generate and @[EP] 
   to import EPS file.  For page header, enter the name of EPS file in 
   the menu option.  

a. For ALL EPS files, either generated by CNPRINT or to be imported
   to CNPRINT, you NEED to adjust the BoundingBox at line 4 in the EPS
   file, otherwise it may be placed outside the print/display range 
   by CNPRINT or other programs.  In BoundingBox, llx and lly are 
   the x and y coordinates of the lower left corner, urx and ury are 
   the x and y coordinates of the upper right corner (relative to lower
   left corner of the paper).  The unit is point (1 inch = 72 points)
   and the numbers must be integers.  You must actually print the EPS
   out and measure to get the number if you are not good at guessing.

b. To import an EPS file, you also need to leave enough space for the
   imported image.  CNPRINT will use the position of the @[EP] marker
   as the lower left corner of the imported image.


18. Character/Word Frequency Statistics (UNIX user, please contact author to
   get this function).  To activate, use -ttt or -tttt options (-ttt 
   excludes symbols), then you will be asked to do either character or 
   word statistics.  To do word statistics, you need to prepare a GB 
   (or BIG5, JIS, KSC) file, called Keyword File, containing the key 
   words you want to know the frequencies in a document.  The following
   guidelines must be followed in preparing the key word file:

a. one word per line;
b. each line must be terminated by a hard return (i.e., by pressing
   "return" or "enter" key);
c. ASCII space is ignored but non-ASCII space is considered to be part 
   of the key word.

   You can use -k=filename option to specify the key word file, or enter
   the filename when asked.

   The results can be printed, saved in PS file, or saved in a GB/BIG5
   /JIS/KSC file.  The output for char frequency looks like:

32. ~{:sDGF1P!<:~}3 83 1.44/39.90%
|                 |  |   |    |__ total percentage adding to the CURRENT ones
|                 |  |   |_______ actual percentage of THE CURRENT ONE(S)
|                 |  |___________ total usages adding to the CURRENT ones
|                 |______________ actual useage of THE CURRENT ONE(S)
|_________________________ the number of all previous characters - 1

   I expect you give proper credit if you publish your results generated
   with this function.

19. To get the best print quality:
a. Provide your printer resolutin (in dpi) in CNPRINT.CMD;
b. use larger size bitmap fonts if possible.
c. Select character size according to your printer resolution and 
   font size (bitmap size).  It should be multiple of

	Font_Size * 100 / Printer_resolution

   for example, if font size is 24x24 and printer is 300dpi,
   24*100/300 = 8 (points), then 8 16 24 32 40 ... will give the best results;
   for 48x48 fonts, 16, 32, ... will do.

20. If the output file (either PS or others) is missing, look for CNPRINT.TMP
   under your current directory (or C: drive in DOS). 

21. CNPRINT can now accept standard input and write to standard output, but 
   these may not work on VMS.  If -i is selected, the menu and conformations
   to questions will be skipped and the default values will be used.

22. Menu options.  Most of the menu options are straight forward and need
   no explanation.  
	 
F: If YES, switch left and right margins and page number positions
   on odd and even pages.  It did NOT actually produce TWO-SIDED copies,
   but when later two pages are copied to two sides of the paper, it
   looks nicer.  Duplex printing is not supported on most printers.

N: When selected, you have the option to specify page position.

23. Unicode support.  Only UTF7 and UTF8 are accepted.  The input is then
   converted to 2-byte format (but with 0x4D-->0x4D4D, 0x00-->0x4D21,
   other bytes unchanged).  Standard 2-byte unicode could NOT be handled 
   by string functions and thus by CNPRINT.

24. Paper size selection on command-line.  It only change the size of
   the "paper" CNPRINT works with, which is imaginary.  It does not
   automatically select the right size paper in your printer (which
   can only be determined by your computer system).

25. Paper margins and gap between columns.  When they do not match, the
   requested values of gap, right and left margins will be adjusted
   slightly.  The left margin will be least affected and the gap most
   most affected (by as much as 30%).  If one column, 65% of the 
   needed adjustment will be made on right margin and the rest on left
   margin.  The margin is set as the requested value is. 

26. The envelope (-env) option.  A more powerful option 
		"-env1 lastname firstname" (wildcats accepted)
   automatically search your data base and prints the address on your
   envelope.  The data base is organized in a way similar to HUST/HBMed
   alumni lists (http://www.neurophys.wisc.edu/~cai/hust/).  This option
   needs the alumni list maintaining program, CNLIST, to work properly.
   Contact author for CNLIST. 

27. GB(HZ)<->B5 conversion.  The HZ<->B5 is actually HZ<->GB<->B5.
	
There are two modes, "char mapping" and "phrase mapping". The "char mapping"
mode is the same in nature as used in most existing programs. Due to the 
"non one-to-one" nature of GB<->B5 mapping, the drawback of is obvious. The 
"phrase mapping" or "word mapping" mode allows you to map "phrase to phrase",
which partially solves the problem of "non one-to-one". CNPRINT supports both
modes, with "phrase mapping" having higher priority. 
	
All mapping data should be in one or two files, stored under a directory 
refered to by HBFPATH, or selected with "-k=tablefile" option. The file 
name(s) can be specified in "cnprint.cmd".

For "char mapping" data, one may use the table in HC package by Young & Lee 
(also a supplemental table).  For "phrase mapping", the table from "wordg2b"
(pub/software/unix/convert) can be used. The tables are copyrighted (see the
table file).

You may construct one yourself according to rules detailed in 
"cnprint.technotes".  


VI. FONT FILES

Please --FINISH-- reading this part before using CNPRINT.  Skip it only if
you have used CNPRINT V2.20/V2.21 or later versions and you will not use 
TTF fonts.

1. HBF font support

You need at least ONE font to run CNPRINT, and CNPRINT can use almost any 
HBF font.  If you do not have enough space, I suggest you get only one of 
the following fonts.  The font-list below is only for the convenience of 
new users.  For a full list please see the README file (00index.txt, or 
README, or similar ) under /software/fonts directory (or its subdirectories).
All HBF files for bitmap font files with different style and size (both GB 
and Big5, JIS/KSC) are stored under that directory.  Please read the README
file under that directory before you get any bitmap font file or HBF file, 
and make sure the HBF file and the bitmap font file(s) match.

There are more fonts JIS/KSC fonts stored at crl.nmsu.edu [128.123.1.33] 
under /CLR/multiling/japanese(korean)/fonts, in BDF format. You can convert
these BDF fonts to HBF using the programs in the /software/fonts/utils 
directory at ftp.ifcss.org.
	
FTP site for fonts & HBF files:         

   ftp.ifcss.org:/pub/software/fonts/(gb)(big5)(misc)(unicode)/hbf 
		(misc: for JIS/KSC)  

	(Bitmap font files)             (HBF files)

   GB:  cclib.j24, ccsym.24 (Jianti)    ccs24.hbf
	cclib.f24, ccsym.24 (Fanti)     ccs24f.hbf
	(There is also a set of nice 48x48 fonts)

   Big5: kcchin24.f00 (Fanti)           etkcm24.hbf (or kcm24.hbf)
	kcchin24.f15 (Jianti)           etkcs24j.hbf(or kcs24j.hbf)
	(there is also a set of 48x48 and 64x64 (?) fonts)

   JIS: jiskan24.bin                    jiskan24.hbf
	(There is also a 32x32 font and several 48x48 fonts)

   KSC: hanglm24.bin                    hanglm24.hbf

   unicode: unihan24.bin                unihan24.hbf
 
   Big5 Plus or GBK: (do not know yet)

NOTE: 
a). Get all bitmap font files in BINARY mode, HBF files in ASCII mode.  If 
   the fonts have extension .gz, use gunzip (or gzip -d) to unzip it.  The
   gzip program can be found at pub/software/dos(unix)(vms)/utils directory.

b). The bitmap font files, HBF files and the file "cnprint.cmd"
   (Beginners) should be put under the same directory;
   (Advanced Users) can be put under any directories you want, but those 
      directories must be specified by HBFPATH (Note: "cnprint.cmd" should 
      also be put under a directory specified by HBFPATH).

c). An HBF font consists of one or more existing bitmap files and one HBF 
   file (See article about HBF carried on HXWZ #128, CM9309B, or 
   http://www.neurophys.wisc.edu/~cai/software.html for more). You need to 
   get BOTH the bitmap files and the HBF files in order to use CNPRINT.  
   The main benefit of HBF is that the software author does not need to 
   design the program with a specific font in mind and that you can add 
   any other HBF fonts the author never heard of. 

d). It is suggested that, after you get the HBF file, you rename them (make 
   a link, or make a copy to the new name). (see part e) For example: 
(no longer needed since V3.00/3.01)

		ccs24.hbf    --> cnj24.hbf
		kcm24.hbf    --> cn5m24.hbf
		jiskan24.hbf --> cnjk24.hbf
		hang24.hbf   --> cnkh24.hbf
		unihan24.hbf --> cnun24.hbf
		---------------------------
	
If you skip this step, the font selection function within document (e.g. 
@[fK]) will be lost.  However, other functions will not be affected.

e). For the font selection function within document to work, the name of 
   the HBF file must be in the following format:
(no longer needed since V3.00/3.01)

		cn&##.hbf   (GB)
		cng&##.hbf  (GBK)
		cn5&##.hbf  (BIG5)
		cnp&##.hbf  (BIG5 Plus)
		cnj&##.hbf  (JIS)
		cnk&##.hbf  (KSC)
		cnu&##.hbf  (unicode)

where & can be any letter (a-z, if your system is case-sensitive, use lower
case only) and ## be the number reflecting the size of the font, e.g. 24 
for 24x24.  
	
The command-line and "cnprint.cmd" still accepts HBF names other than 
"cn*##.hbf" format.

It is suggested that you make the letters meaningful, for example, 'k' for 
Kaishu, 'f' for Fanti.

For some non-square bitmap fonts, like kcchin16.f00, the HBF file is named 
as kcm14.hbf, it is better to rename it as cnm16.hbf (i.e. use numbers 16,
24, 48, 40, 56, 64).  If you name it as cnm14.hbf, you can select it on 
command line with "-f=m14", but you could not select it with @[f*].  Since 
CNPRINT gets the size information from the HBF file, it is able to use fonts
with any size.  For example, if you have a 32x32 font and you name the HBF 
file as cnx56.hbf, it is still OK. 

f). From V3.00/3.01, you can use @[F***] to specify a font within a document.
   The *** is the full name of the HBF (or ttf, htf) font file, and should 
   be 3 to 20 char long. So the requirements in notes d) and e) is no longer
   neccessary. However, other sequences for specifying fonts (e.g., @[V*],
   @[q*]) are still valid.
 
g). You can also write your own HBF file according to HBF standard at 
   http://ftp.ifcss.org:8001/www/pub/software/info/HBF-1.1/index.html.
   Notice that CNPRINT only uses the simple properties.

For users who might use HBF in their own programs, the CNPRINT codes dealing
with fonts are optimized and saved as a seperate file (HBF API) in ftp site
ftp.neurophys.wisc.edu:/pub/cn/hbfapi2.c.


2. TTF font support
	
From V3.00/V3.01, CNPRINT supports TTF fonts. However, a lot of so-called 
TTF fonts are actually not "TTF" fonts or do not fully conform to TTF 
standards, you may experience problems.

There are some TTF fonts in public domain for Big5:
		ftp.ifcss.org:/pub/software/fonts/big5/ms-win (or mac) 
Note the NTU fonts are non-standard and may cause problems.

I am not aware of any TTF font in public domain for GB KSC or unicode at the
time of release, but things can change, and you should check.

TTF support was well tested with Big5 TTF fonts (over 60), but was not tested
for GB, JIS, KSC and unicode.

To specify a TTF font, you may use the name of the TTF file directly, or use
a *.htf file (header file for a TTF font) indirectly, on either command-line
(-f=fontfilename) or in the document with the @[F***] sequence (*** is the 
FULL name of the TTF or HTF file, 3 to 20 char). 

You may also use @[T**] in a way similar as with HBF fonts, where ** can 
be any two characters and in this case the name of the HTF file must follow
this rule:

		cn**.htf   (GB)
		cng**.htf  (GBK)
		cn5**.htf  (BIG5)
		cnp**.htf  (BIG5 Plus)
		cnj**.htf  (JIS)
		cnk**.htf  (KSC)
		cnu**.htf  (unicode)

The header file *.htf should contain the following as the first line,
followed by optional comment or property lines:
		
TTF_FILE:   your_ttf_filename
# lines below are optional	
# some fonts have too much space around a char, "amplify" the char. This
# is used to make chars from one font looks as big as those from other fonts
_CharSizeScaling: 1.02	
# add/reduce horizontal spacing between chars (1=8% of normal space)
_AddCharSpacing: -1.2   


VII. Known Problems 

No software is without bugs.  As CNPRINT is getting bigger, it contains
more bugs.  A lot of bugs were created when new functions were added.  
So I am sympathetic to Bill Gates.  Anyway, your help in identifying
those bugs is appreciated.  

1. Q: The characters look OK but are meaningless, or they are distorted,
   shifted up/down, left/right.
A1: Check HBF file, make sure it matches the bitmap font file.  If you write 
   you own HBF file, make sure the offset information is correct.
A2: The bitmap font is distorted in transmission.  Try to get it again,
   using BINARY mode and transmit properly.
A3: You are printing a Big5 file with GB fonts.

2. Q1: CNPRINT failed to print, but I saw the printer was processing the job.
Q2: CNPRINT failed to print when I use larger-size font (e.g. 56x56) to print
   long documents.  It is OK when I print short documents. 
A1: This happens on some printers. There are two possibilities: font cache
   is too small or printer memory is used up.  To avoid the first problem, 
   you need to decrease the number of characters put on the font cache, but
   this is going to increase the second risk.  Generally the problem can be
   solved with -n=# option (# is a number <= 1024, default 2048).  For Q2, 
   you may need to try different numbers (including numbers > 1024). (Thanks 
   to Gong Wei, eng30219@leonis.nus.sg) 
A2: It might be due to network setup.  Somehow before the PS file reaches 
   the printer, some characters were deleted/added or words seperated.

3. (DOS) Q: The printer stops printing after one or two pages.  Something 
   like "printer is not ready, abort, ignore or retry?" is displayed on 
   screen.  If 'R' is typed, it would continue to print the next page.
A1: Add MODE LPT2: RETRY=B in the autoexec.bat file (if the printer is
   connected to LPT2). (cf. p529, MS-DOS version 5.0 User's Guide and
   Ref., Microsoft Co 1991.  Courtesy of Chang, KSU211@UKCC.uky.EDU)
A2: see 4.

4. Q: CNPRINT only printed the first page.
A: It may be due to the way your printer is connected to the computer, or 
   the printer setup.  You may get around by using -p1 option, i.e. print 
   one page at a time (it helps if you also use -n=200 with -p1 if the 
   document is large).  Sometimes it is due to network setup, in that case,
   try not to print through the network.

5. Q: (VMS and UNIX) CNPRINT stops running after displaying 
   "*** Page 1 has been done ***" or "1".
A: Change line 26 of cnprint.c from "#define TIME 1" to "#define TIME 0".
   Or delete the lines containing those unsupported functions. Some machines
   do not support function "remove()", just delete it.

6. Q: (DOS) When I typed "cnprint ...", the computer hung up.
   (VMS) When I typed "cnprint ...", strange messages were displayed on the 
   screen.
A1: The files may not be successfully unzipped, or you forgot to get the 
   zipped file in BINARY mode.
A2: (VMS) Did you follow the steps in IV CAREFULLY ?

7. (DOS) Q: The message "Not enough memory" was displayed at some stage.
A: Disconnect network and other things and try CNPRINT again.  You may want 
   to generate PS file only (use -w option) if your printer is connected 
   via network.

8. (Big5) Q: Some non-frequently used characters are not printed correctly, 
   but the frequently used chars or symbols are OK.
A: It is due to different versions of Big5.  Try to match the font and the 
   text, or use a conversion program, such as et2hku. In fact, the so-called
   HKU-Big5 did not exist at all. It was created by some HKU students and 
   has been recalled.  It would be best if you stop using it and convert 
   all your text to "standard" Big5.

9. I am a user of V2.30/2.31.  After I upgraded to V2.70/2.71, I can not
   print/view the PS files properly.
A: From V2.40/2.41 a slightly different PS format was adopted.  This change 
   will benefit more users than it will bring trouble to.  Use -g option to
   select the format of V2.30/2.31.  There has been no major change in the 
   PS format since V2.40/2.41.
  
10. Q1: When I print Hz files from ACT (or some GB/JIS/KSC files), the line
   breaks down at unusual places.
Q2: (JIS/KSC/HZ/ZW) The lines are joined together (it seems that return 
   characters were "eaten" by CNPRINT). 
A1: Some softwares omitted a '~' before the hard return in Hz files, so a soft
   return becomes a hard return for other softwares.  Some GB/JIS/KSC file 
   inserted a hard return at each display line.  A partial solution is to use
   -n# option to set characters per line N (equal or slightly less than the 
   number of chars in a Hz line, default value is determined automatically 
   according to the input).  
   A better solution is to use the repair function (-r#, see on-line help).
A2: This is just the opposite of the above.  Set a larger N with -n#.

11. Q: The English characters are printed but all CJK characters are missing.
A: Your system could not read Hex numbers properly.  Get HBFHX2D.c at 
   ftp.neurophys.wisc.edu and follow the instructions.

12. Q1: (UNIX) The program says it could not find HBF file but it IS there,
   and I did everything correctly.
Q2: (UNIX) I could not find the PS file with the name displayed on screen, 
   but I found CNPRINT.TMP, which is a PS file.
Q3: (UNIX) all other problems.
A: Problems 1 and 2 should not exist in V2.70 or later.  But if they are 
   there, (Q1) move all files into one directory or (Q2) rename CNPRINT.TMP,
   and report to author.

13. Q: The program complains it could not find file "cnprint.cmd", but it
   is there.
A: Read section VI(b) and question 12 of this section.

14. Q: (UNIX) The pipeline input did not work properly.
A: Near the beginning of the source file, there is a line 
   "#define copystdin 1".  Uncomment that line.

15. Q1: When I select 7 columns, the program did not work properly.
Q2: When I select very small character size, the program did not work 
   properly.
A1: This is 'normal'.  The maximum number of columns you can select depends
    on the character size and paper margins.  
A2: V2.70/2.71 contains a fix to this problem, but somehow it does not work
    on some machines.
A3: (DOS) In some cases it is due to small memory available.
A4: (UNIX) Increasing MAXLINES (near the top of source) may help.

16. Q: I got a lot of error messages when I compile V2.70, (UNIX) but I had 
   no problem with previous version.
A1: (DEC Alpha VMS) Ignore the warnings as long as the .exe file is workable.
A2: (UNIX, AIX, ConvexOS) Somehow the file contains CTRL-M at the end of each
   line.  Open the file under DOS and save as another name, or use 
   "fixctrlm.c" to get rid of the CTRL-Ms.
A3: (UNIX) Use "gcc" or add the following line near the top of the program 
   (thinks to Shih-Yin Lin, sylin@u1iu8.ccl.itri.org.tw): "#define const NULL".
A4: (UNIX) Some features in V2.70 are not supported by your compiler. The 
   exact "bug" has not determined at the time of this release.  

17. Q: I got some out of range characters.
A: This is most likely to be normal.  The public fonts are usually 'standard'
   fonts, i.e., they do not cover those vendor-defined characters. Most 
   softwares usually add some of their own characters. This is especially 
   true for big5 since it seems there is no absolute standard. You can check
   the reported code against the code ranges in the HBF file or a standard
   table.

18. Q: When I print CNS file, it stops after displaying "CNS-->B5".
A: (UNIX) Follow the instructions in file cns2b5.c. If you don't have it,
   get it at ftp.neurophys.wisc.edu:/pub/cn (use "anonymous" as user name).
   (VMS/DOS) Contact author.

19. Q: (UNIX) I could not specify printer options using -q option.
A1: A simple shell program may help you get around it, but it is known not 
   to work on all machines.  ("cnprint.2nd_printer" at 
   ftp.neurophys.wisc.edu:/pub/cn)
A2: Use the -out option and direct output to lpr, e.g., 
   cnprint my_GBfile -out | lpr -Pmyprinter
A3: If you are a system manager, you may set up a print queue using cnprint
   as a filter. ("filter.script" at ftp.neurophys.wisc.edu:/pub/cn). 

20. Q: I changed the settings in "cnprint.cmd", but they seem to be ignored 
   by the program.
A: You must have several "cnprint.cmd" in different directories, check the 
   directories specified by your HBFPATH and keep only one copy of 
   "cnprint.cmd".

21. Q: I can no longer print on my printer after I upgraded to V3.00/V3.01.
A1: If you set PS language level to 2, then CNPRINT uses compression 
   (a level 2 PostScript feature that could not be emulated in level 1 PS). 
   Change the default setting back to level 1 in "cnprint.cmd".
A2: If you used TTF font, it might be that your printer doesn't have enough
    memory to handle it. 


VIII. AUTHOR   

Yidao CAI (~{2LR@5@~})
Auditory Physiology
Boys Town National Research Hospital
555 N 35th ST
Omaha, NE 68131
USA
402-498-6526
cai@neurophys.wisc.edu, caiy@boystown.org
http://www.neurophys.wisc.edu/~cai/

Please send suggestions and report bugs to the above address.  Check
part VII before you ask any question.  The answer to your question 
might already be there.  Please include your e-mail address in the 
mail body as I sometimes could not reach users with distorted e-mail
addresses, and I understand those users need help the most because 
of their not-so-popular machines.  Thank you for using CNPRINT.

The author will try his best to offer technical support.  However,
there is no warranty for CNPRINT.

CNPRINT is free for non-commercial and personal use ONLY.  However,
I would highly appreciate the following as a way to show your support:  
a). a postcard or e-mail, indicating the machine and system you are 
running;  b). donation in any amount (suggested $5-$20). Those who
are not full time students are especially encouraged to donate. Your 
contribution will be solely used in an educational fund (in memory 
of my mother) to help and encourage children from rural areas with
their primary and high school education.  Thank you for your generous
support. 
	
Linux users: you may use this version and any previous version of 
CNPRINT (in its original form) for free under the linux operating 
system. Please note that this is not a GPL license. 

For ANY OTHER use, please contact author to get permission.  The 
general rule is that if you use it not for profit, and you are not 
compensated for the work, your request will be granted free of charge 
(however, donation to the educational fund is more than welcome).
If you use CNPRINT for profit, or you are compensated for the work,  
a small amount of fee will be charged.  In any case, the money 
collected will go to the educational fund.

If you install CNPRINT for group use (shared by more than one user on 
systems other than linux), you must inform author.

Requests for using part of CNPRINT source code in your own software
will be processed on individual basis.  In particular, you may use
the parts for conversions of unicode, Japanese formats, and CNS to 
BIG5 in your software as long as you informed me, but since the codes
were modifed from the work of others (see part IX), you may also 
need to contact the original authors.  The author grants free use of
the GB<->BIG5 conversion portion of the source codes in freeware 
as long as credit is given, but its use in shareware or commencial 
software is subject to other conditions.  The part handling HBF 
files is subject to the conditions in my HBF API, available at ifcss
site or my neurophys site. 

Most of the subroutines for TTF support are copyrighted by Honda Siaw.


IX. Acknowledgement

Thanks to numerous users of previous versions for valuble suggestions,
encouragements, and bug fixes, which make the continuous improvement of 
CNPRINT possible. In particular, I would like to mention Nelson Chin 
(butta1@cs.bu.EDU), for both his suggestions and testing of CNPRINT on his 
systems, and Yigen Zeng (yigen.zeng@mop.luth.se), his valuble suggestions
and testing efforts makes many important functions possible. Some initial
ideas came from GB2PS V1.00 (Dr. Wei Sun, william@anucsd.anu.edu.au).  
The subroutines for conversion of Japanese format texts were modified from
jconv.c by Ken Lunde. The subroutines for unicode were modified from the 
unicode package of Ross Paterson and/or Guo Jin.  The cns2b5 subroutine 
is modified from that of Ross's package.  The core subroutines for TTF 
handling are simplified from those of Honda Liaw, with benefits from the
"freetype" project and "ttf2ps.c" of Liang Shing Ng.  See file "cnprint.his"
for names of other people who contributed to CNPRINT either directly or 
indirectly.


Appendix A
----------
paper sizes    
	A (letter):     8.5 x 11 inch  or  215.90 x 279.40 mm
	legal:          8.5 x 13.5         215.90 x 342.90
	A4:             8.27 x 11.69       210.00 x 297.00
	B:              11 x 17            279.40 x 431.80
	A3:             11.69 x 16.54        297.00 x 420.00    

Appendix B
----------
Dr. F. F. LEE's hz2gb can be found at /pub/software/unix/convert
For HBF standard, see /pub/software/fonts/HBF
jconv.c is at ftp.ora.com:/pub/examples/nutshell/ujip/src.
GB/BIG5/JIS/KSC table files can be found at ftp.neurophys.wisc.edu:/pub/cn
The HBF API used in CNPRINT can be found at ftp.neurophys.wisc.edu:/pub/cn
A brief history of CNPRINT can be found at ftp.neurophys.wisc.edu:/pub/cn,
	file name "cnprint.his"
If you want to know more about the technical aspects of CNPRINT, read file
	"cnprint.technotes" at ftp.neurophys.wisc.edu:/pub/cn
All the files at ftp.neurophys.wisc.edu can be reached by www at
	http://www.neurophys.wisc.edu/~cai/software.html.
The script file needed to setup cnprint as a filter for unix printers can be
	found at ftp.neurophys.wisc.edu:/pub/cn, "filter.script". 

Note: "Appendix C" is now a seperate file "cnprint.cmd".  It should be kept
	in the same directory where the fonts are kept.
