other references files are Notes, LABEL, CopyRight.

FREE ADVICE:
    Installing cxterm *may* require intensive UNIX and X knowledge,
    especially if you want to customerize it. If you fail in any step below
    and can not fix it quickly, your local UNIX / X guru may be very helpful.

Making cxterm from cxterm.tar.Z
-------------------------------

    First, you'd better make some dedicated directories (for management
    purpose):
	one to put executable binaries, recommended: ~/bin
	one to put fonts,               recommended: ~/xfonts
	one to put dictionaries,        recommended: ~/dicts
	one to put the manual pages,    recommended: ~/man/man1 (optional)

    Now, move the source code to a directory where you can work on:

	% zcat cxterm.tar.Z | tar xvf -
	% cd cxterm

    If you system has xmkmf (one of X11 utilities) installed properly, try

	% xmkmf
	% make Makefiles		# create Makefile for ./Dict/
	% make

    If you don't have xmkmf, try to edit the ./noimake.def yourself to
    have all the site-dependent correctly set for you.  Consult your
    system manager for the configuration of your system.

	% vi ./noimake.def		# change the configuration
	% make -f Makefile.noimake

    You'd better have your system manager install xmkmf, especially for
    those who have a very unsimilar OS platform.

    If successful, cxterm, cxresize, tit2cit, cit2tit, and the external
    input methods in subdirectories cxterm/Dict will be built.

Install cxterm and external input methods
-----------------------------------------

    If the making is successful, you will have the following executable
    binaries:

	cxterm,  cxresize,  tit2cit,  cit2tit

    and the following compiled cxterm dictionaries:

	Dict/ETZY.cit,  Dict/PY-b5.cit,  Dict/PY.cit,  Dict/Punct-b5.cit
        Dict/Punct.cit,  Dict/QJ-b5.cit,  Dict/QJ.cit,  Dict/TONEPY.cit

    You'd better put all the executable binaries in a dedicated directory
    and all the compiled cxterm dictionaries in another one.  You can copy
    them by hand, or use "make -f Makefile.noimake install" after putting
    the right directory names in "./noimake.def" file.

    After sucessful installation, put the definitions in ./CXterm.xd into
    your account's X window resource file.   The normal place is in the
    file ~/.Xdefaults (or sometime, ~/.Xresources):

	% cat ./CXterm.xd >> ~/.Xdefaults

    Before invoking cxterm, the environment variable HZINPUTDIR should be
    set to the directory name contains all compiled cxterm dictionaries
    you just installed.  Assume you have put them in ~/dicts, add the
    following to your ~/.cshrc file (for csh or tcsh):

	setenv HZINPUTDIR ~/dicts

    or the following to your $HOME/.profile file (for sh or ksh):

	HZINPUTDIR=$HOME/dicts; export HZINPUTDIR

    "Source" it after you make the changes.


How to change the keys to switch input methods
----------------------------------------------

    By the installation procedure above, you can use all GB input methods as:

	 key	input
       press	method		description of the input method
       -----	------	------------------------------------------------------
	<F1>	ASCII					(internal, of course)
	<F2>	IC	(Internal coding in 4 hexadecimal digits) (internal)
	<F3>	TONEPY	(PinYin input method with tones)	(external)
	<F4>	PY	(PinYin input method without tones)	(external) 
	<F5>	QJ	(Quan Jiao, double-byte ASCII in GB coding) (external)
	<F6>	Punct	(Punctuation marks input table)		(external)
	<F7>	QW	(GB Qui Wei, should be obsoleted by IC) (internal)

    Start cxterm in BIG5 mode as

	% cxterm -fh hku-ch16.bdf -fn 8x18big5 -BIG5

    you can use all BIG5 input methods as:

	key	input
      press	method		description of the input method
  ----------	------	------------------------------------------------------
	<F1>	ASCII						(internal)
	<F2>	IC	(Internal coding in 4 hexadecimal digits) (internal)
  <Shift+F3>	PY-b5	(PinYin input method with tones)	(external)
  <Shift+F4>	ETZY	(ZhuYin input in ETen keyboard layout)	(external)
  <Shift+F5>	QJ-b5	(Quan Jiao, double-byte ASCII in Big5)	(external)
  <Shift+F6>	Punct-b5  (Punctuation marks input table)	(external)

    If you want to change the default input method switching key binding,
    modify your "~/.Xdefaults".  (You *may* need to be an "X Window expert"
    to do this. :-)

    Each keypress definition is in form of

[optional_mod_key] <KeyPress> key_name: switch-HZ-mode(input-method-name)

    Examples:
	<F2> switch to input method named MYNEW:

		<KeyPress> F2: switch-HZ-mode(MYNEW)	\n\

	<Shift-F3> switch to input method IC:

		Shift <KeyPress> F3: switch-HZ-mode(IC)	\n\

    If your keybroad is rather strange and you don't know what key is it,
    use X11R4 utilities "xev".  Press the key in the xev window and see
    what kind of answer you can get in the text window.

    See X(1) and xterm(1) for more information about the key translation.

How to add my own input methods
-------------------------------

    Choose a name, say, FOOBAR, create a file FOOBAR.tit According to .tit
    format described below. Generate corresponding .cit:

	% tit2cit FOOBAR.tit > FOOBAR.cit

    Modify your "~/.Xdefaults" to add one line like:

	<KeyPress> key_you_perfer: switch-HZ-mode(FOOBAR)	\n\

Text Input Table (.tit) file format
-----------------------------------

    A .tit file is line-oriented file. There will Chinese characters in it.
    The whole file contains of two parts, the definition part followed by
    the dictionary part.

    All lines begin with leading '#' are ignored. Then each line consists of
    one keyword and followed by zero or more definitions. Spaces and tabs
    are used as separator between tokens. In the following formal
    specification,

	<key> means any character with ASCII code from 0 to 127, if not
	printable, the character should be in \ooo format, where ooo is
	the ASCII code in 3 octal-decimal digit form;

	<keys> means a continuous string of <key>;

	<string> means any string of ASCII characters (unprintable in \ooo)
	and Chinese characters;

	<Cstring> means string of Chinese characters;

    
    Definition Part.

	Each line is consisted of a keyword and followed by optional
	definitions:

	ENCODE:	<string>
	    Define the encoding of the input method.
	    Valid values of <string>: GB or BIG5 , default: GB .

	MULTICHOICE: <string>
	    Whether the dictionary contains many-to-one lookups.
	    Valid values of <string>: YES or NO , default: YES .

	PROMPT: <string>
	    Define prompt string to be shown in the cxterm input area.
	    Valid values of <string>: maximum length 24, Default value: none.

	VALIDINPUTKEY:	<keys>
	    Define keys to be used for input Chinese, (don't define all)
	    Default value: none.

	SELECTKEY: <keys> <keys> ...
	    Define keys to be used for Chinese input selection. They must be
	    in same order of the Chinese choices shown on the input area.
	    The first character in each set of selections key will be
	    displayed as the label of the selection.

	    Valid values:	at most 16 selection <keys> are allowed.
	    Default:	1\040 2 3 4 5 6 7 8 9 0
		(e.g. either 1 and \040 (space) gives the selection one, but
		 the corresponding label shown is "1" since 1 is before \040.)

	BACKSPACE: <keys>
	    Define keys to be used for backspace in Chinese input area. 
	    Default:	\010\177		(BackSpace, Delete)

	DELETEALL: <keys>
	    Define keys to be used to clear all input in Chinese input area. 
	    Default:	\015\025		(Return, CTRL-U)

	MOVERIGHT: <keys>
	    Define keys to be used to show more choices at the right.
	    Default:	.>

	MOVELEFT: <keys>
	    Define keys to be used to show more choices at the left.
	    Default:	,<

	REPEATKEY: <keys>
	    Define keys to be used to repeat the input of last selection.
	    Default:	\020\022		(CTRL-P, CTRL-R)

	KEYPROMPT(<key>): <string>
	    Define corresponding <string> to be displayed in input area when
	    the key <key> is input. Maximum length of each <string> is 4 bytes.
	    Default value of <string> is the <key> itself.

	COMMENT anything
	    Any thing follows COMMENT will be saved in the end of .cit file.

    The last line of definition part must be

	BEGINDICTIONARY

    Dictionary Part.

	Each lines is in the form of:

	<keys>	<Cstring>

	Input characters in exactly the same sequences as <keys> will
	cause <Cstring> to be displayed for selection.

