#################################################################
#								#
#                   XCIN version 2.1d Package.			#
#								#
#     Modified from  xcin-2.1c.tar.gz  package.			#
#              (by: Edward Der-Hua Liu, Taiwan)			#
#	       with  XcinFix-4         improvement.      	#
#	       (by: Suei-Jeng Wang <vvvv.bbs@cis.nctu.edu.tw>)	#
#								#
#		by  Tung-Han Hsieh  (July, 1997)		#
#		    Physics Dept., National Taiwan University.	#
#		    Email: thhsieh@twclx.phys.ntu.edu.tw	#
#								#
#################################################################


<< Thank You >>

    Thanks to Mr. Edward Der-Hua Liu and others who developed the xcin
system.  With the wonderful program, we can do a lot of operation with
Chinese under  X-window in the UN*X world.  As time goes on, more  and 
more  people use it,  and more and more comments appear.  The  package
upgraded  with  time but it seems that  the  install  process  is  not 
convenient  and  self-consistent.  These  confuse  a  lot  of  people, 
especially for new users in the UN*X world. We often see the `Big FAQs' 
about  xcin  such  as `how  can  I install the Chinese  fonts' or `the 
cj2cin  command  not  found' or `the  crxvt  terminal is too big!!' or 
something  appears  in  the newsgroup again and again.  In  fact, such 
problems  are easy to modify.  Beasuse I really like this program  and 
feel that I may do something to improve this package, so I try my best 
to  re-write  the  Makefiles  and  auto-configuration programs of this 
package to try  to  solve  these troubles.  This comes the `xcin-2.1d' 
project. 

    I used to get a lot of helpness from others when I was new, and I
am  really  thankful  to those for their suggestions.  I  treat  this 
project  as a pratice of programming in the  UN*X  operating  system,
and  I  really hope that these efforts will really make  the  program 
nicer and help the new users to install and use it.  In the world  of
Free  Software, in principle, we cannot expect any supports from  any
organization or software company.  Actually we are the end-users, but
I beleive that we are also the designers, the programmers.  We really
own the program and we have the ability to upgrade it, to improve it.
Hence, I  try to do this project, and I am glad to do this, and  find
that I can learn a lot from doing this.

    If anyone has comments or suggents about my modification,  please
mail to me.  I hope that everyone who is interesting in improving the
xcin package could work together. I believe that with our works, this
package will have much more progress in the near future.

    Finally,  I should thank to everyone who used to encourage me and
suggest me to do this project.  This time, I should especially thanks
to  Suei-Jeng Wang  <vvvv.bbs@cis.nctu.edu.tw>.  With  his  effort on
the XcinFix series from the original xcin-2.1b,  the xcin  system has
got  more  powerful, more  flexible, and more usable.  Besides  this, 
there are  a lot of  features of this version --- xcin-2.1d --- comes 
from his original idea.  Thanks for his help on alpha-test and contri-
butions on  the XcinFix-4 of this package.  Also,  I should  thank to 
Y.C. Tao (Ivan) <r5541029@ms.cc.ntu.edu.tw>  for his help on the beta
test of this version on  FreeBSD.  And finally, thank you  very  much
for your using and supporting for this xcin-2.1d package.



<< What's New >>

    Although I tried my best to produce the xcin-2.1c version,  there
are still serious problems in it.  The most serious is that it is not
usable for NON-LINUX system.  This is really my mistake, and I should
apologize to everyone who want to install xcin-2.1c one systems  such
as FreeBSD, SunOS, or others but doesn't success.  This version, xcin-
2.1d, has upgraded to become plateform independent. I rewrite all the
Makefiles and  include one auto-configur program --- configure --- to
help to do the system-dependent configuration.  This program is modi-
fied from the configure program of the GNU project.  It has the abil-
ity to determine what the features of your system and make a best con-
figuration  suggestion.  Now xcin-2.1d can successfully installed  in

	Linux (i386), 
	FreeBSD (i386),
	SunOS-4.X (Sparc-20),
	Solaries-2.5.X (Ultra-Sparc-2)
	AIX-3.2 (IBM RS6000)
	HP-UX (9000 ?) 

without any modification of the settings and source codes. Besides, I 
also write an English/Chinese installation interface to help the users 
to choose the packages.  So, in most cases, you don't need to edit the 
Makefiles by your hand  any more,  and  the installation progress will 
become very easy and very happy (I hope so .....).

    The second major change  is the including of the XcinFix-4.  This
is  really  the  improvement  of  functionality  of xcin system.  For 
details,  please refers to the  xcin.HOWTO  and  on line man pages of 
xcin.

    The third chnage is that this time xcin is completely independent
of the ETen system (I really hope so .....).  You never need the ETen
system installed to install xcin.  It now has its own phonetic input-
table  (converted  from  the  free  software  chdrv-1.0.4, thanks  to 
Yu-Chung Wang), and include one testing  hku-ch16.pcf  font (adopting
from the  Chinese-Tools-1.1,  but  I don't know  clearly who should I 
thanks to :-(((.  We also provide the dayi, pinyin input-tables  from
the XcinFix-4.  Therefore, after you installed this  version, you can
immediately use it without further helpness of other packages. If you
still have special requirement such as more fonts, more  input-method
tables, or others, you can try to find them in the  internet  or read
our documentataions for more information.

    There  are other minor changes of this version.  You can refer to
docs/ChangeLog file for more details.


<< The Structer >>

    As before, the xcin-2.1d has the following structers:

1. xcin-2.1d/configure:
	The auto-configuration program.  It uses other tools in the
	xcin-2.1d/scripts directory.  This  time you don't see  the 
	main Makefile here.  It will be generated by this program.

2. xcin-2.1d/xcin/:
        There contains  the  xcin Chinese-input  server, and  other
	important tables and utilities such as cin2tab,  tsintools,
	cli_xcin.o and others which should be used to run the  xcin
	system.

3. xcin-2.1d/crxvt/:
        The xcin client, a modified X-window rxvt terminal.  There
        are  also some  resource files in the `xcin-2.1c/crxvt/rc'
        directory.

4. xcin-2.1d/input_tabs/:
	There contains several `.cin' input-method tables provided
	by XcinFix-4.  In  the `source' directory, we also provide  
	the  programs to convert the ETen input-method tables  for
	xcin.

5. xcin-2.1d/fonts/: 
	There contains the hku-ch16.pcf font. In the source direct-
	ory, we also  provide the `et2bdf' program to convert  the
	ETen fonts for xcin.

6. xcin-2.1d/doc/:
        There are a set of documentations.  Now we provide the  on
	line manual pages, Chinese howto documentations, and other
	older documents.

7. xcin-2.1d/script/:
	There contains other shell-scripts to help others to setup
	the  xcin  system.  You should not call them by  yourself. 
	They should be called by the xcin-2.1d/configure  program.
	Also, you can see that there is a Makfile.in file.  It  is 
	the main frame of the original main Makefile of xcin-2.1c.


    After installation, the xcin package will be in the following file
systems:

1. Main binary: xcin, crxvt
	In one of your seach path. Default is `/usr/local/bin'

2. Fonts: English fonts(vga*), Chinese fonts(et*, taipei*, ...)
	By default, the  English  fonts  will be in  the
	`/usr/X11/lib/fonts/misc' directory. The Chinese
	fonts will be in the '/usr/X11/lib/fonts/chinese'
	directory.

3. Tables, Utilities and Documentations:
	There includes all the Chinese-input-method tables,
	tsin  input-method tables, keyboard mapping tables,
	and  some  utilities  such  as  cli_xcin.o, et2bdf, 
	cin2tab, tsin utilities, and others.  By  defaults,
	they  will  be installed  to `/usr/local/lib/xcin'.
	The   documentations    will   be   installed   to 
	`/usr/local/lib/xcin/doc'.



<< To Install >>

    Because in this  version, one can decide freely what  he/she  want
to install and what  he/she doesn't want just by changing the settings
in the configuration program, so there may be a problem that `At least
what  should  I  choose to  "yes" such that I can have a complete xcin
 system?'  Well, the answer depends on what you actually need.  But at 
least you should have the following installed:

1. Binaries: xcin, crxvt.

2. Chinese fonts: at least one 8x16 font.

And others are up-to-you.  In this version we provide all xcin needs
to run a complete system.  Of course, you can add others you need in
to the  system, such  as other Chinese input-method tables or fonts.
On way is to convert them from the ETen system, and in this case you
should have one ETen system installed.  The other way is try to  get
them from the internet.  As I know,  the  Chinese fonts can be found 
from the following ftp sites:

	ftp://linux.cis.nctu.edu.tw
	ftp://nctuccca.edu.tw

or other sites.


    To install the xcin package, go through the following steps:

1. Read this document README carefully.

2. Run the program:

	configure

   to begin the installation process.  You can type

	configure -help

   to see the options of this program:

   Usage:  configure [-help] [-prefix=PREFIX] [-exec-prefix=PREFIX]
                     [-X-include-prefix=PREFIX] [-X-lib-prefix=PREFIX]
                     [-X-font-prefix=PREFIX]

           -help:  Print this message.
           -prefix:  Prefix dir of the /bin, /xcin, /man dirs.
           -bin-prefix:  Prefix dir of the /bin dir.
           -x-include-prefix:  Prefix dir of the /X11/Xlib.h include dir.
           -x-lib-prefix:  Prefix dir of the /libX11* lib dir.
           -x-font-prefix:  Prefix dir of the X-win .pcf fonts.

3. In you really need, you can make changes of the Makefiles and the
   config.status, install.status by hand to suit your requirement.

3. To be the root, (you do not need to under the X-window environment),
   type:

	make
	make install

4. After installation, the make will generate xcin-2.1d/filelist file.
   It is a list of files what the installation has installed in your
   system.  Also, there is one xcin-2.1d/fonts/fonts.alias file.  It
   contains the font alias database and you can include it into your
   Chinese font path.  For example, if you have installed your chinese
   fonts into /usr/X11/lib/fonts/chinese directory, and if there is 
   no `fonts.alias' file, you can copy it to there:

	cp xcin-2.1d/fonts/fonts.alias /usr/X11/lib/fonts/chinese

   or, if there already exist one fonts.ailas file, you can append it
   with

	cat xcin-2.1d/fonts/fonts.alias >> /usr/X11/lib/fonts/chinese/fonts.alias

4. Edit your  /etc/XF86Config, add your Chinese font path into  the
   Section "Files".

5. Install completely! Now you can re-start the X-window, and enjoy.


    If you want to make additional changes or want to re-compile the 
package, be sure to type  `make clean' before `make; make install'.



<< Quick Start >>

    If you are a new user for the xcin system, the following informa-
tion may help you to get the idea to run the system. For more details,
please refers to

	man xcin
	man crxvt
	man cin2tab

and the xcin.HOWTO, cin2tab.HOWTO, Xfonts.HOWTO, Boshiamy.HOWTO.


    Now you have finished the installation, and re-start the X-window.
you can now open a xterm, and execute the following command:

	crxvt &

Then  you  will  see a  rxvt like terminal appeared.  By default, the 
crxvt  will search for 8x16 as its English font, and the hku-ch16  as
its Chinese font.  If you don't have the hku-ch16.pcf font, you  will 
see an error message as "crxvt: can't access font hku-ch16"  appeared 
and  the  execution  fails, then  you should provide a option to tell 
crxvt  to  find  the other fonts to use.  For example, if you have  a 
taipeik20, and you want crxvt to use the 10x20 English font, you  can 
use:

	crxvt -fnb5 taipeik20 -font 10x20 &

Beside these, there are still a lot of options for crxvt, and you can
see the `man crxvt' for the detailed description about those options.

    Now you can start the xcin.  Just type

	xcin &

then  you  see some messages appeared. In this version, we follow the
convension of XcinFix-4, in default the xcin window will not hid. You
can  provide the -hidden 1 option to start xcin to enable the  hidden
function.  By pressing Ctrl+Space,  you  can  switch  it  between the 
Chinese/English input mode.  If  you enable the hidden function, xcin
will  appear  only  when it is in the Chinese input mode.  Note  that  
only the xcin client can use xcin, i.e., only when the crxvt  becomes 
the  foreground,  then you can press Ctrl+Space to switch it into the 
Chinese  input  mode because currently you only have crxvt to be  the 
client of xcin.

    Similarly, by  default  the  xcin use the hku-ch15 as its Chinese  
font and the 8x16 as its English  font.  If you don't have this font, 
you can type:

	xcin -fnb5 taipeik24 -fn 12x24 &

to use the taipeik24 font.  By default, xcin will have the pho-input-
method (Ctrl+Alt+3) and the  tsin-input-method (Ctrl+Alt+6).  If  you
want to use other input-methods, such as cj-input-emthod, you can use
the command:

	xcin -in1 cj.tab &

Then in addition to the  pho-input-method, there will be a  cj-input-
method as you press Ctrl+Alt+1.

    Finally, you can integrate the xcin & crxvt to your X-win system.
For  example, you may complain that everytime you should type such  a
complicated command to start the xcin & crxvt.  In fact, you can  add
these  commands into your Window Manager source file such that  every
time you enter the X-window, the Window Manager will start them auto-
matically.  For  example, if you use fvwm95-2, you can add two  lines
in  the  $HOME/.fvwm2rc95  files  in  the  `AddToFunc "InitFunction"'
section:

+         Exec crxvt -fnb5 taipeik20 -font 10x20 &
+         Exec xcin -in1 cj.tab -fnb5 taipeik24 &

and then re-start the X-window.  All will be OK!


    If you want to type Chinese words directly under the crxvt  shell
prompt, you should execute some commands before doing this:

For bash:  (in the $HOME/.profile or /etc/profile)
    set convert-meta off
    set output-meta on
    stty pass8
    stty cs8 -istrip
    export LC_CTYPE=ISO-8859-1

For csh or tcsh:  (in the $HOME/.cshrc or /etc/csh.cshrc or /etc/csh.login)
    stty pass8
    stty cs8 -istrip
    setenv LC_CTYPE ISO-8859-1

Note: In  some FAQs in the internet, they often recommand that  you 
      should also set the environment variable `LANG=C'.  But after
      some  test I find that if  you set the `LANG=C' variable, the
      `man' and `elm' will work a little funny.  In fact, you don't
      need to set `LANG=C' and the Chinese typing directly under the 
      crxvt shell prompt still works fine.


    If you need additional information, please refer to the documents
installed with xcin package and the corresponding man pages.



<< Feed Back >>

    I hope that these changes actually make the xcin package nicer.
If  you  have any comments or suggestions, it is welcome to mail to:

	Tung-Han Hsieh <thhsieh@twclx.phys.ntu.edu.tw>

	Suei-Jeng Wang <vvvv.bbs@cis.nctu.edu.tw>


    Enjoy!!

						Tung-Han Hsieh
