~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ READ ME FIRST! hjCTeX Betatest 1996.02.01 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Introduction ============ HjCTeX is a group of files with which you can insert chinese charcters encoded in Big5 in TeX/LaTex documents. I hope that any package(including graphics) supporting ordinary TeX/LaTeX documents is also compatible with HjCTeX. HjCTeX support MSDOS and SUNOS. Licence ======= HjCTeX is a FREEWARE(distribute FREE and price FREE). Ok, if you want to, send me something nice, a postcard, your credit cards or anything else. But you need not do this. Just use HjCTeX and report me any bug you have found in it. At the moment, the source-code is NOT available. You are NOT allowed to resell this program, any part of it or any changed version of any part of it for profit without my written permission. If you are a shareware-vendor or sysop of a bulletin board, you may only charge a small nominal fee (as usual) for storage media material or downloading time. Warranties ========== There are NO WARRANTIES OF ANY KIND regarding this software. You can not make me responsible if this software does not fit your purposes, does not work properly, does not work at all, damages your Computer or any part of it, makes you depressive or whatever. There will definitely be bugs in this software and you may not always like them. System requirement ================== 1. For MSDOS user (a) emtex(4alltex) or gtex (b) dvips (c) ghostscript3.5.3 and gsview1.4 (b) CWindows3.1 if you want to CWindow3.1's chinese true type fonts to display/print chinese charcters in TeX's document 2. For SunOS user (a) TeX3.1415 (b) dvips (c) ghostscript3.51 Distribution: ============ HjCTeX is distributed in form of the following Files: dvicdvi.ini ascii hjcmacro.tex ascii sample1.tey ascii sample source of a SPECIAL-TEX-file sin.eps ascii used by sample1.tey sample1.hp binary output of sample1.tey for HP laserjet III by ghostscript sample2.tey ascii sample source of a TEX-file sample2.hp binary output of sample2.tey for HP laserjet III by dvicwin.exe psfonts.sap ascii sample file of psfonts.map fontmap.sap ascii sample file of fontmap makepfb.zip binary used for making pfb files For MSDOS Filename: Filetype: ~~~~~~~~~ ~~~~~~~~~ hjctt.exe binary dvicwin.exe binary dvicwin.ini ascii dvicwin.qa ascii dvicdvi.exe binary For SUNOS Filename: Filetype: ~~~~~~~~~ ~~~~~~~~~ hjctt binary dvicdvi binary How hjctex achieve typesetting chinese charcters in TeX's document: =================================================================== Hjctex use a "\special" command with chinese code as argument to make chinese typesetting in TeX's document possible. In the file "hjcmacro.tex" there are three commands "\a","\chorizontal" and "\cvertical". There is a "\special" command in the definition of command "\a". First user edit his/her TeX's document, this document can have chinese in any place where english charcters can appear. All you need is to put the line \input hjcmacro at the very begining. 你可使用指令 \cvertical 讓中文字直排[只有在 LaTeX文件中才可以使用 \cvertical (Plain TeX 文件不可使用)而且在preamble的地方 要有指令 \usepackage[dvips]{graphics}, 一旦用了 \cvertical 就必須用 ghostscript(而不能用dvicwin.exe)來print/preview]; 可使用指令 \chorizontal 讓 中文字橫排. Such a file I suggest to use ".tey" as file extension to distinct it from ordinary TeX's file which use ".tex" as file extension. From now on I will refer such a ".tey file" TEY-file, and ".tex file" as TEX-file. If I want to emphasize TEX-file have "\special" command other than that in "hjcmacro.tex", I call it a SPECIAL-TEX-file. Many packages use "\special" command to implement special effects. Second, the program hjctt can produce TEX-file from TEY-file. Program hjctt insert the necessary commands "\a" and modify some chinese code to prevent it from having TeX's special charcters. The usage of program hjctt is : hjctt filename.tey filename.tex Third, use the program TeX/LaTeX to complile the TEX-file produced by hjctt as usual. Fourth, in CWindows3.1, user can use dvicwin.exe to preview/print the DVI file produced in the third step. dvicwin.exe do not support SPECIAL-TEX-file. dvicwin.exe can use CWindows' TTF(true type font) to render chinese charcters and use TTF or PK fonts to render english chacters and symbols(TTF in higher priority). dvicwin.exe resolve the "\special" commands with modified chinese code. If user's enviroment can't use dvicwin.exe or document is SPECIAL-TEX-file, hjctex use the following steps to accommodate the preview/print job. Fifth, use program dvicdvi to produce another device independent file which I suggest use ".cdi" as file extension from the DVI file produced in third step. dvicdvi resolve the "\special" commands inserted by the program hjctt. CDI file is exactly the same as an english DVI file. The usage of program dvicdvi is : dvicdvi inifile filename.dvi filename.cdi where inifile is the pathname of the file dvicdvi.ini Sixth, use program dvips to transform CDI file produced in fifth step to produce PS file. Seventh, In CWindows3.1, you can use gsview to preview/print the output produced by sixth step. However, if you are in SunOS, ghostview can only preview but not print such an output. You should (suppose the output file in sixth step is filename.ps): (a) use command gs -sDEVICE=psmono -sOUTPUTFILE=tmp.ps filename.ps to produce ordinary postscript file tmp.ps for postscript printer or command gs -sDEVICE=ljet4 -sOUTPUTFILE=tmp.hp filename.ps to produce binary file tmp.hp for HP laserjet 4 printer (b) use command lpr tmp.ps to print it out to postscript printer or lpr tmp.hp to print it out to HP laserjet 4 printer Installation: ============ For MSDOS: (1) Installation of emtex(4alltex) or gtex (required): You should install packages TeX, DviPs, GhostScript. If you install emtex(4alltex), you need do some adjustment beacuse default installation only accept 7-bit characters. (2) Installation of hjctt.exe(required) : Put file "hjctt.exe" in your PATH. (3) Installation of dvicwin.exe(recommended, if you seldom treat SPECIAL-TEX-file) (i) If you prefer dvicwin to use TTF fonts than PK fonts, add TTF fonts TTF fonts into your CWindows. (a) download all the TTF files in dongpo.math.ncu.edu.tw/tex-archive/fonts/postscript/bakoma/ttf to subdirectory say c:\ttf (b) In CWindows, choose 主群組-控制台-字形-新增-瀏覽,將(a)中所提的字形 安裝進CWindow3.1 (c) (b)執行成功的話會在CWindows的子目錄system中產生檔案對cmr10.ttf, cmr10.fot..... (d) 此時可將原在c:\ttf中的檔案清除 (e) download all the TFM files in dongpo.math.ncu.edu.tw/tex-archive/fonts/postscript/bakoma/tfm and put in TEXTFM directory. (emtex: \emtex\tfm; gtex: \tex\tfm) (ii)因為dvicwin.exe目前只懂.pk檔而不懂.fli檔,若你不想使用TTF字形或有些pk檔 如line10.pk沒有對應的line10.ttf, 必須用fontlib.exe把那些.pk檔從.fli檔 中解開來 (iii) Put the file "dvicwin.ini" in your CWindows home directory and modified it according your setting. This file is referenced by the Windows program dvicwin.exe. (iv) Start CWindows and add the Icon of dvicwin (dvicwin.exe) to a program group you want. Remark: If you have problem about dvicwin.exe, please refer the file dvicwin.qa. (4) Installation of dvicdvi.exe(required if you need treat SPECIAL-TEX-file: (i)Installation of chinese fonts in postscript type I format: (a) 在一個臨時的子目錄內,將makepfb.zip的檔案解壓縮開來.從ftp site: ftp.ifcss.org:/pub/software/fonts/big5/ms-win內抓取ntu_kai.ttf 放於相同的子目錄.將ntu_kai.ttf改名成ntukai.ttf. 接著執行 (i) set dos4g=quiet (ii) make dos 如此會產生55個b5kai??.pfb檔與55個b5kai??.tfm檔. 將.pfb檔移到適當的 子目錄, for example, c:\psfonts. 將.tfm檔移到適當的子目錄, for example, d:\emtex\tfm\ps. 別的字形,如b5br系列,可依步驟 (i) 抓取適當的ttf檔 (ii) 適當更改檔案makefile (iii) make dos 來產生. makepfb.zip由cjk中的ntu2cjk與ghostscript各取部份混合而成 (b) append the file "psfonts.map" produced by step(a) to your dvips' file "psfonts.map" (c) append the file "fontmap" produced by step(a) to your ghostscript's file "fontmap" (d) In ghostview's menu, select "Options"-"Ghostscript config", add the chosen subdirectory(c:\psfonts) into include path (ii)Put the file "dvicdvi.exe" in your PATH and file "dvicdvi.ini" in any place you like. This file is referenced by the MSDOS program dvicdvi.exe. May be you need to modify the file "dvicdvi.ini" according to your setting. (5) Put the file hjcmacro.tex in your suitable directory(emtex: \emtex\texinput; gtex: \tex\texinput). This file should be inputed by any TEY-file. For SUNOS (1) Install your TeX3.1415(or later version),dvips and ghostscript3.51 as usual. (2) Put files hjctt dvicdvi in your PATH. (3) (a) 在PC的一個臨時的子目錄內,將makepfb.zip的檔案解壓縮開來.從ftp site: ftp.ifcss.org:/pub/software/fonts/big5/ms-win內抓取ntu_kai.ttf 放於相同的子目錄.將ntu_kai.ttf改名成ntukai.ttf. 接著執行 (i) set dos4g=quiet (ii) make dos 如此會產生55個b5kai??.pfb檔與55個b5kai??.tfm檔. 將.pfb檔移到適當的 子目錄. 將.tfm檔移到適當的子目錄, for example, /usr/local/lib/tex/fontsd:\emtex\tfm\ps. 別的字形,如b5br系列,可依步驟 (i) 抓取適當的ttf檔 (ii) 適當更改檔案makefile (iii) make dos 來產生. makepfb.zip由cjk中的ntu2cjk與ghostscript各取部份混合而成 (b) append the file "psfonts.map" produced by step(a) to your dvips' file "psfonts.map" (c) append the file "fontmap" produced by step(a) to your ghostscript's file "Fontmap" (4) Put the file dvicdvi.ini in any place you like. This file is referenced by the SUNOS program dvicdvi. May be you need to modify the file "dvicdvi.ini" according to your setting. (5) Put the file hjcmacro.tex in your TEXINPUT directory(e.g., /usr/local/lib/tex/inputs). This file should be inputed by any TEY-file. Happy TeXing, Yang, Hon-Jang (e-mail: hjyang@math.ntu.edu.tw)