
================================================================

           hTeXp, an implementation of TeX for hangul

                      1996/02/12 Version

  Copyright (C) 1995-96 Jae Choon Cha. All Rights are reserved.

================================================================


hTeXp is a replacement of a TeX complier in the sense that hTeXp compiles a
text file created by any text editor into a dvi file for further processing
such as previewing or printing.

There are many reasons using hTeXp but the most important one is that it
handles hangul nicely. A non-localized version of TeX has serious problems
in displaying hangul messages on a terminal screen and writing hangul 
textual information onto the auxiliary files such as log or index.

hTeXp has solved such problems, therefore, the use of hTeXp is strongly
recommanded when using hLaTeXp, a version of hangul LaTeX2e created by
the same author.


This document contains the followings.

 - Platforms on which hTeXp can be used
 - How to Install hTeXp
 - How to use hTeXp
 - Licensing agreement



1. PLATFORMS ON WHICH hTeXp CAN BE USED
---------------------------------------

hTeXp can be used on platforms listed below, because the source code of
hTeXp is not aviliable to users for private reasons of the author; only
binary excutables are provided. The followings are the platforms for which
hTeXp excutables are provided.

 - Windows NT with i386 processor(s)
   (Compiled on IBM-PC compatible, Windows NT 3.5 Korean version)
 - Windows 95, Windows 3.1 DOS box
   (Compiled on IBM-PC compatilbe, Windows 95 Korean version)
 - SunOS
   (Compiled on sun4, SUNOS 4.1.3)
 - HP-UX
   (Compiled on HP 9000/755, HP-UX 9.03)
 - Linux
   (Compiled on IBM-PC compatible, Linux 1.3.67, ELF/a.out)
 - DEC OSF1
   (Compiled on DEC alpha machine, OSF V3.2 148 alpha)
 - IRIX
   (Compiled on SGI machine, IRIX 5.3)

If you want to use hTeXp but your platform is not included in the above 
list, then the author may help you by building a new hTeXp binary for your
platform provided you offer an account on your machine with a standard C
compiler like gcc or MSVC++.

The author thanks the following people for offering machines on which the
binaries of hTeXp are compiled:
 - ZuWhan Kim (Linux machine)
 - Jeong So Young (DEC alpha machine)
 - Lee, Jeong Wan (SGI machine)




2. HOW TO INSTALL hTeXp
-----------------------


In most cases, you may already have an installation of TeX system. Then
hTeXp can be easily added to your installation and can work coherently with
TeX utilities in your installation. In this case you need to do:

 - Put htexp excutable file and tex.poo file into your binary directory
 - Set up Environment variables
 - Dump TeX formats using hTeXp

If you have no TeX installation, then you must install additional files
and TeX utilities after or before install hTeXp according to the
documentations of each TeX utility.


(1) Necessary files

You need following files to install hTeXp.

 - htexp (or htexp.exe in case of Windows NT), the binary excutable file.

 - htexp.poo, TeX pool file.

 - 00README, this file, which contains installation instructions.


(2) Install the binary excutable file and the TeX pool file.

Simply copy the two files htexp (or htexp.exe) and htexp.poo into a
excutable file directory that you prefer.
If you want to collect excutable files related to TeX in some directory,
like C:\TeX\bin or /usr/local/tex/bin, then it is the recommended directory
to put the above two files. On un*x machines, /usr/local/tex/bin is
recommended since it is the default directory where hTeXp tries to find
tex.poo file.


(3) Install additional files like TeX macros and dvi drivers
    (IMPORTANT: you must dump your formats again!)

In addition, you should install more files into your system to use TeX.
Important catagories of such files are:

 - TeX macro files, like hLaTeXp and LaTeX2e packages.
 - TeX format files, like hlatex.fmt
 - TeX font files, like various TFM files and PK files.
 - DVI drivers, like xdvi for X windows systems and dvips for PostScript.
 - TeX utility programs, like MakeIndex and BibTeX.

As mentioned above, hTeXp package does not provide such files and you
should get them separately and install them according to their
documentations.

If such programs and files are already installed on your system, then you
need not to install them again. Everything except TeX format (.fmt) files
can be used coherently with hTeXp. TeX format files are the files (usually
with .fmt externsion) obtained by dumping TeX formats like plain, hLaTeXp
and LaTeX2e. A TeX format file is necessary in order to write documents
using the format.

Even though you already have .fmt files for formats that you want to use,
in order to use hTeXp .fmt files must be created again using hTeXp. In
general it is not possible to use with hTeXp .fmt files dumped by other TeX
compilers.

Usually, a special version of TeX, called INITeX, is used to dump TeX
formats. To dump TeX formats using hTeXp, you use hTeXp without any special
options. That is, hTeXp has the functionalty of both INITeX and VIRTeX.
For example, the command "htexp plain" is sufficient to dump the plain
format of D. E. Knuth.

When you dump TeX formats, some environment variables like TEXFONTS and
TEXPOOLFILE should be set. See below descriptions on how to use hTeXp.

After you dump, resulting .fmt files should be copied into your TeX format
directory. This directory must be contained in the TEXFORMATS environment
variable as below.



3. HOW TO USE hTeXp
-------------------


(1) Set up environment variables

In order to use hTeXp, some environment variables of the user must be
set correctly. First of all, the directory containing htexp.exe (or htexp
on un*x machines) must be contained in the "path" environment variable.

The followings environment variables should be set up.

 - TEXINPUTS      paths for TeX input files.
 - TEXFORMATS     paths for TeX format files.
 - TEXFONTS       paths for TFM files.
 - TEXPOOL        paths for tex.poo file.
 - TEXEDITOR      an editor running command.

When hTeXp try to access a file, it looks the current working directory. If
fails, then it looks the directories specified in the above environment
variables. Paths are separated by ';' on Windows NT/95 or MS-DOS, and by ':'
on un*x machines.

A wildcard notation // is allowed in directory names. If you use // instead
of / between directory names in a path, like /a//b, then any directories like
/a/b, /a/x/b, /a/x/y/b are considered as specified directories.
If a path ends with //, like /a/b//, then all subdirectories of the path,
like /a/b, /a/b/x, /a/b/x/y are considered as specified directories.

For example, suppose that the value of TEXINPUT environment variable is

  /usr/local/tex/htexpinputs//:/home/jccha/tex//input//

Then the directories

  /usr/local/tex/htexpinputs
  /usr/local/tex/htexpinputs/packages
  /usr/local/tex/htexpinputs/packages/graphics
  /home/jccha/tex/xypic/input
  /home/jccha/tex/input/mystyles

are considered as TeX input directories.

A TECHNICAL REMARK: To be faster, hTeXp on a un*x machine uses a trick to
determine whether a directory is a leaf or not. If the number of links of a
directory is exactly two (i.e . and ..), then it is considered as a leaf.
It is a usual trick of un*x programs, but of course it is not correct
method in general. A typical situation at which the trick fails is when a
directory has no real subdirectory but has some symbolic links of other
directories. An easy way to resolve this problem is to create an empty
real subdirectory. Sorry for this inconvinience, however, hTeXp and many
other programs become much faster by this trick, and usually the trick
works correctly. :)

TEXEDITOR environment variable contains an editor running command. An
editor is excuted when an user enters "e" as a response to an error during
hTeXp's running. When excuting an editor, hTeXp substitutes each occurance
of %f and %n in the editor running command by the file name and the error
line number, respectively, and excute the command. To use "%" in the editor
running command line, use %%.

On un*x machines, default values are used if environment variables are not
defined. Default values are:

  TEXINPUTS   /usr/local/tex/htexpinputs//
  TEXFONTS    /usr/local/tex/htexpfonts//
  TEXFORMATS  /usr/local/tex/htexpformats
  TEXPOOL     /usr/local/tex/bin
  TEXEDITOR   helvis +%n %f

If you have a TeX installation with different directory structure, then a
good tricky way is to provide soft links as above. Then users of the system
need not to set up their environment variables.

For example, to set up environment variables for a typical un*x installation
of hTeXp, use the commands

  setenv TEXINPUTS /usr/local/tex/htexpinputs:~/otherinputs
  setenv TEXFONTS /usr/local/tex/htexpfonts
  setenv TEXFORMATS /usr/local/tex/htexpformats
  setenv TEXPOOL /usr/local/tex/bin
  setenv TEXEDITOR 'helvis +%n %f'


(2) Run hTeXp

To run hTeXp, just use the command "htexp". Typical command line is
as follows.

  htexp <&format> <.tex file>

If '&' has a special meaning in your shell, then you need to quote the
argument. For example,

  htexp '&hlatexp' thesis

will process the "thesis.tex" file under "hlatexp" format.
hTeXp understands any usual command line arguments for TeX. For example,

  htexp '\relax'

will just display the prompt "*" (after the logo of hTeXp).

If you want to run INITeX, then just use "htexp" instead of "initex" or
"tex -i" of other TeX systems. That is, the command "htexp" can be used
instead of both "initex" and "virtex" of other TeX systems.

To system admistrators, it is strongly recommended to provide a shell 
script for TeX formats that are used often, like hLaTeXp or plain. For
example, on most systems, it is not so difficult to provide a shell
script named "hlatex" such that "hlatex thesis" is equivalent to "htexp 
&hlatexp thesis".



If you have no troubles in installing hTeXp, then now hTeXp will replace
your old TeX compiler and will provide better TeX environment for hangul
typesetting, especially when used with hLaTeXp format.

Please send any comments about hTeXp to the author: jccha@math.kaist.ac.kr.

Enjoy TeX!



4. LICENSING AGREEMENT
----------------------


Copyright (C) 1995-96 Jae Choon Cha. All Rights are reserved.

The author of hTeXp grants to any individual or non-commercial organization
the right to use and to make an unlimited number of copies of hTeXp package
when this is done without charge and has attached this file with licence
agreement.

No part of hTeXp can be sold or distributed as a part of any commercial
product, and used in any commercial organization, without additional
agreement with the author.

