summaryrefslogtreecommitdiff
path: root/fonts/poorman/pmsintro.tex
blob: d1ab17275769be89615958d281235022abf543fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
\hsize=5in\vsize=7in\hoffset=1in\voffset=1in
\parskip=2pt plus 4pt minus 1pt
\font\logo=logo10
\input pmCs

\def\pmC{{\tt pmC}}
\def\mf{{\logo METAFONT}}
\font\bigfont=cmr17
\font\russ=wncyr10

\centerline{{\bigfont Poor Man's Chinese in \TeX}}
\centerline{featuring simplified characters}
\vskip.15in
\centerline{Thomas Ridgeway}
\centerline{Humanities and Arts Computing Center}
\centerline{University of Washington}
\vskip.1in

This little document is intended as an illustration of and preliminary
guide to {\it poor man's 
Chinese} [\pmC].  \pmC\ is a temporary expedient for
printing texts with Chinese via \TeX\ until such time as we have a
well-thought-out system (and fonts) for handling Chinese. 

\pmC\ has a small number of virtues; among these are:

\item{$\bullet$}\pmC\ is available now.

\item{$\bullet$}\pmC\ is available free of charge.

\item{$\bullet$}\pmC\ is available now.

\item{$\bullet$}\pmC\ is device-independent (although it must be admitted that you
will get relatively more pleasing results on less sophisticated printers)

\item{$\bullet$}\pmC\ is available now.

\item{$\bullet$}\pmC\ is sufficiently simple-minded you will not need to be a rocket
scientist to make modifications for your own use.

\item{$\bullet$}\pmC\ is available now.

\item{$\bullet$}\pmC\ uses fonts mechanically faked-up from dot matrix quality fonts; if you
want you can incorporate new characters of your own design using a bitmap
font editor which {\it may} be easier to use than \mf.

For those who might be previously unacquainted with \TeX, let us put forth a few of
the advantages of \TeX\ which are inherited by \pmC: it can run on almost any
modern computer; it can print to any of a large number of printers/typesetters;
it can print (if desired and suitably instructed) elaborate formatting of the text;
it is available at very low cost, or free (which is an instance of very low cost).

The disadvantages are at least equally compelling:

\item{$\bullet$}\pmC\ is crude and unlikely to ever be greatly improved as regards the quality of its Chinese.

\item{$\bullet$}\pmC\ uses emulation-in-\mf\ techniques to produce a dot-matrix
font on your output device.  No matter how talented your printer may be,
the Chinese output by \pmC\ will looked like it was stripped in from
a dot-matrix printer.

\item{$\bullet$}\pmC\ is crude and unlikely to ever be greatly improved as regards the quality of its Chinese.

\item{$\bullet$}\pmC\ uses a large number of fonts which occupy a finite and
measurable quantity of diskspace for each font.  Your screen previewer had 
{\it better} be able to use the same resolution your printer uses, or you
may experience a little tightness around the disk.  You probably will not want
the fonts in multiple magsteps (they will just get uglier if you enlarge them).

\item{$\bullet$}\pmC\ is crude and unlikely to ever be greatly improved as regards the quality of its Chinese.

\item{$\bullet$}\pmC\ does not do slanted, bold, or other fancy Chinese although one could
in principle.  However, insofar as even a minimal installation requires
88 fonts {\it for Chinese alone}, we must at this point quote The Master:
\medskip
{\narrower\narrower\noindent the format of a {\it char\_node} allows for up to 256
different fonts and up to 256 characters per font; $\ldots$ \TeX\ intended for oriental languages
will need even more than 256 $\times$ 256 possible characters when we consider different
sizes and styles of type.\footnote{*}{Donald E. Knuth, {\it \TeX : The Program}.
Addison Wesley, Reading MA: 1986. (Volume B of {\it Computers and Typesetting}). \S 134, p.~57.\par
Ahh-hum.  If we wanted to combine different-face or different-size versions of characters in a font, we could make fuller
use of the fonts which are declared for \pmC.  Since currently only 94 characters are defined in
each font, we could put a different version of each character into currently empty space in the same font.
A light rewriting of the macro which handles the chinese characters could then
select one or the other version of a character depending on what we have indicated our desires to be.
As of November 21, 1990 I am not convinced that this is worth doing.}

}
\medskip

\item{$\bullet$}\pmC\ is based on \TeX\ (hooray!), not on  J\TeX\  (hooray!) nor
any not-known-to-me to-be-extant Chi\TeX\ (huh?) which might
know how to set type vertically, handle thousands of fonts, make 
doughnuts, and do all the other things that we might want software to do.
\pmC, therefore, does not set type vertically, handle thousands of fonts,
emulate Spads or Spitfires, or any of the other real neat stuff.

\item{$\bullet$}\pmC\ may take a long time to set up if you need to make your
own fonts.  Preparing {\it one} set of fonts on a NeXT computer for use
at 400 dpi required a \mf\ run of over 18 hours.  The \mf\ source code
files for the fonts occupied 17 megabytes of disk space when all were 
stored.\footnote{\dag}{If one looks at the simple-minded brute-force \mf\ code
which the \pmC\ fonts use, one may roughly estimate that a staggering number
of computations (probably even more than eight) are needed to emulate a dot-matrix font through this method.
There might, indeed, be a better way to do it.  On the other hand, Pac-Man worldwide
has consumed several hundred million times the number of CPU cycles consumed
by compiling \pmC\ fonts, so we are not exactly talking about wasting a scarce
resource, are we?}  You will not ordinarily wish to make up the fonts more
than once, assuming a relative absence of masochism in your personality makeup, nor will you probably want to keep the \mf\ source code permanently
{\it since you can mechanically regenerate it.}  
\bigskip\goodbreak
\centerline{How to use \pmC}
\medskip
Assume a text editor capable of enabling entering text in GB-encoded
Chinese characters.  Assume a text editor capable of editing text in ``normal''
Latin characters.  Use the first text editor to prepare a plain text file
containing the Chinese text; {\it plain text file} means that there are no
tricky codes in the text file which are intended to be used only by the
program that produced the file---``ASCII file'' frequently conveys what we
mean by ``plain text file'', but by virtue of having encoded Chinese, your
file will not be ASCII.  Use the second text editor to enter the Latin-letter
strings providing instructions to \TeX; (if your first text editor is o.k. for
Latin too, you can continue using it for this step! --- but watch out, the JIS 
and GB encoding schemes have some Latin characters (graphemes) included in the two-byte code
space: we need ``normal'' Latin (one-byte coded) text).  On a separate line
before the first line of Chinese, put a line saying ``$\backslash$input pmc $\backslash$beginchinese''.
Pmc.tex is intended to be the name of a file containing the basic set of 
instructions for \pmC.  ``$\backslash$beginchinese'' is a \pmC-defined magic-word
signifying that everything until an ``$\backslash$endchinese'' is to be interpreted
as Chinese, if possible.  Using whatever text editor you want, incorporate text in
whatever other language you want.  Other languages will conflict with Chinese in \pmC\ only if they
use character codes in the range 160 to 254;  such languages must be separated from
Chinese by enclosing the Chinese in ``$\backslash$beginchinese'' ``$\backslash$endchinese''
structures.  Create a new last line saying ``$\backslash$bye''.  Put a blank line
between paragraphs in the text, and use any other \TeX\ commands with which you
may be familiar to further adorn your text.  Save the file, and say the appropriate
words to run \TeX\ on your file, preview it, print it, or whatever.

\centerline{What can go wrong}

Well, for one, you may not have an editor for entering Chinese.  [Sorry; \pmC\
has nothing to offer you if you have no way to compose your text].  Or,
for another, your editor may not use GB-encoding.  [Easy: convert your text
to GB-encoding!  (How?  That's not my problem; or, to be a {\it little} more gracious
about it, there are some converters out there, see if you can find one $\ldots$)].
You may not know ``any other \TeX\ commands with which you
may further adorn your text''\footnote{\S}{Careful study will reveal this phrase to be a direct
quotation of nothing except itself.}  [So take a class].  Something else
goes wrong. [Fix it].  You don't have a copy of \pmC\null.  [Get one].

\centerline{How to get \pmC}

From a friend is good.  If you have no friend who has \pmC\ and is prepared to make
a copy for you $\ldots$ (that was supposed to be phrased as delicately as possible) 
$\ldots$ you may get it through an {\it Established Channel}.  There are a number
of ``\TeX\ distributions'' which may elect to incorporate \pmC\ in their offerings
of \TeX\ and \TeX-related software.  You will very likely be able to get a copy
from the NWCSC, distributors of \TeX\ for Unix systems; they will have to charge you
a fee, however, as even though they are non-profit they still have to pay their employees, pay phone bills, and all
the rest of the drag with which I am sure you are familiar.  You might also be able to get it
electronically and free-of-charge via {\bf ftp} from some place or other, but I
couldn't tell you where.  As I write, November 21, 1990, none of these alternatives which I
have suggested will actually work, and there is no way that you can get \pmC\ short
of enrolling in a course of study at the University of Washington, or you have a friend
who has done so.

%\tracingall
\centerline{Are we really going to show any Chinese or what?}

Oh yes, this is roughly how it looks: \beginchinese
至今为止,大家所用的中文
编辑器,毋论用的是何输入方式
都不过于 WYSWYG (What you see is what you get) 类型
,例如中文 WordStar 即联想汉字
, 天马,飞马,
 五笔字型。  (Please note that we may intermix all
kinds of other stuff in with the Chinese, such as {\russ Rodina,
Moskva, Kiev}.
这些软件有它们好的一面, 即
直观性强。它们大都用于 IBM 兼容机与 Macintosh 个人微机, 并需
特殊的中文操作系统来启动机器。然而,它们的弱点却是不可弥补的,
即输入速度太慢而且太费脑力和眼
力。 想想看,当键盘
输入英文时

你只需机械地挥动手指,眼睛和头脑
全力贯注在屏幕上出现的文章
十分轻松, 愉快,同时也能保证出好
文章。但是用中文 WordStar  时,你的
头脑和眼睛却要繁忙地碾转在打字
、选字、和文章内容之间,如连续
两小时如此作业,你将觉得腰酸
眼痛脑力竭尽,毫无乐趣可言。下回一提起打
中文你便有一种恐惧感。本人三年
以来使用中文软件的结论便是如此。
那末 ChText  用的又是什么方法呢?
首先 ChText  不是个编辑器,而是个
拼音 

\endchinese

\bye