summaryrefslogtreecommitdiff
path: root/language/gurmukhi/singh/manual.gm
blob: ebbee2a41a42be520d27087fa840f30686c41192 (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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
@punjabi
%________________________________________________________________________
%
%    This program is free software; you can redistribute it and/or modify
%    it under the terms of the GNU General Public License as published by
%    the Free Software Foundation; either version 1, or (at your option)
%    any later version.
%
%    This program is distributed in the hope that it will be useful,
%    but WITHOUT ANY WARRANTY; without even the implied warranty of
%    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%    GNU General Public License for more details.
%
%    You should have received a copy of the GNU General Public License
%    along with this program; if not, write to the Free Software
%    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%________________________________________________________________________
\input gmmacs
\nopagenumbers
\hsize=6in

\font\title=cmr9 scaled\magstep5
\relax
\font\subtitle=cmr9 scaled\magstep2
\relax
\font\pal=cmr9

\bigskip\vbox{






}\bigbreak
\centerline{{\title Gurmukhi for \TeX}\footnote*{\TeX\ is a trademark of the
American Mathematical Society}}
\smallskip
\centerline{\title User Manual}
\smallskip
\centerline{\subtitle Version 1.0}
\centerline{\subtitle October 1995}
\bigskip
\bigskip
\centerline{\title Amarjit Singh}
\bigskip
\eject
{\subtitle Introduction}
\bigskip

The purpose of the ``Gurmukhi for \TeX'' software package is to convert the 
characters in a document from English Alphabet to Gurmukhi 
(script for the Punjabi language), utilizing the \TeX [1][2] and
METAFONT\footnote*{METAFONT is a trademark of Adddison Wesley Publishing Company}[3]
software packages.  \TeX\ is a typesetting system developed by the American
Mathematical Society, used widely on Unix systems, and occassionally on
other operating environments.  METAFONT is a font generation tool supported
by \TeX .  Both \TeX\ and METAFONT are free software packages which can be 
downloaded from \TeX\ archive sites[4].  A working knowledge of \TeX\ will 
greatly help in using the 'Gurmukhi for \TeX ' package.

This document provides information for preparing input text files and use of
the 'Gurmukhi for \TeX ' software.  This is the first version of the software
and it may undergo changes in the near future, so keep an eye out for
enhanced future releases.

\bigskip
{\subtitle Acknowledgement}
\bigskip
The Gurmukhi package was inspired by the Devanagari script generation 
package ``Devanagari for \TeX \footnote\dag{``Devanagari for \TeX '' is a copyright
of Frans J. Vethuis}'' which is developed by Frans J. Velthuis
and has been brought to you with his permission to support Gurmukhi script.
I would also like to thank my mother for repeatedly prompting me to write
a letter to her in Gurmukhi. Last, but not least, I would like to thank
everyone who might use this software package.

\bigskip
If you have comments or suggestion, feel free to send them to me at 
the following address:
\smallskip
\leftline{ E-mail: asingh@evolving.com }

\leftline{ Postal Mail: Amarjit Singh }
\leftline{ 8405 E. Hampden Ave \#11N Denver CO 80231 USA }
\leftline{ A-3 Mansarover Garden, New Delhi 110015 India }
\bigskip
\bigskip
{\subtitle Preparing a Document for Trans-literation }
\bigskip

A document is initially created using regular ASCII text. The text is 
then converted into Gurmukhi using simple transliteration rules, and 
most of \TeX\ features from the initial document are passed to an 
`intermediate' \TeX\ file. The generated output can be sent to a printer or
to the screen

This section describes what ASCII characters can be used to produce
Gurmukhi characters, and the delimiters which are required to put 
together these characters to pass to \TeX . Some control commands are
presented which you might use to modify the behaviour of this
tool to transform ASCII input text into Gurmukhi text. There is a macro
file for \TeX\ which should be included in your text file.
\bigskip
{\bf Characters}

Table 1 presents the ASCII to Gurmukhi character set translation.

To maintain the simplicity of transliteration, more than one 
character may be used, for example; 'kh' would be used to produce 
the Gurmukhi character {\gm kh}. Depending upon the context of 
a vowel, between the word or beginning of a word, a sign 
(like '{\gm \char69}') or a character (like '{\gm i}') will appear. 
An exception to this rule will be two vowels appearing together. 
There is a very limited number of half-characters in Gurmukhi and 
they are for h, v and r.

There are more than one ASCII character sets which can be used in 
input text, for representation of some Gurmukhi characters, like
'kh' and 'K' can be used for '{\gm K}' and it
is totally your choice to use any of them. 

In Gurmukhi text mode digits will appear as :
 
{\gm 0 0 1 2 3 4 5 6 7 8 9 }
\bigskip
\eject
\centerline{\bf Table 1: ASCII Character sets for Gurmukhi characters}
\smallskip
\settabs 8 \columns
\+u&{\gm u}&k&{\gm k}&t&{\gm t}&sh, S or "s&{\gm "s}\cr
\+uu&{\gm uu} or {\gm \char1}&kh or K&{\gm K}&th or T&{\gm T}&.kh or .K&{\gm .K}\cr
\+U&{\gm U} or {\gm \char1}&g&{\gm g}&d&{\gm d}&.g&{\gm .g}\cr
\+a&{\gm a} or&gh or G&{\gm G}&dh or D&{\gm D}&z&{\gm z}\cr
\+aa or A&{\gm A} or {\gm \char65}&"n&{\gm "n}&n&{\gm n}&f&{\gm f}\cr
\+i&{\gm i} or {\gm \char69}&c&{\gm c}&p&{\gm p}&N&{\gm N .ti~apI}\cr
\+ii&{\gm ii} or {\gm \char70}&ch or C&{\gm C}&ph or P&{\gm P}&.m or M&{\gm M biNdI}\cr
\+I&{\gm I} or {\gm \char70}&j&{\gm j}&b&{\gm b}&/&{\gm / caNdrabiNdU}\cr
\+e&{\gm e} or {\gm \char3}&jh or J&{\gm J}&bh or B&{\gm B}&\~\relax a&{\gm ~a aD~ak}\cr
\+ai or E&{\gm E} or {\gm \char123}&\~\relax n&{\gm ~n}&m&{\gm m}&@&{\gm @ (tOR)}\cr
\+o&{\gm o} or {\gm \char111}&.t&{\gm .t}&y&{\gm y}& {\tt |} &{\gm | (.dN.dA)}\cr
\+oo&{\gm oo} or {\gm \char79}&.th or .T&{\gm .T}&r&{\gm r}& {\tt ||}&{\gm ||}\cr
\+O&{\gm O} or {\gm \char79}&.d&{\gm .d}&l&{\gm l}&.o&{\gm .o}\cr
\+s&{\gm s} &.dh or .D&{\gm .D}&v&{\gm v}\cr
\+h&{\gm h} &.n&{\gm .n}&R&{\gm R}\cr

\bigskip
{\bf Delimiters}

All text appearing after \% up to the end of the line, will be
considered comments and will not generate any output. 

All the text between '$\{ \backslash gm$'  and '$\}$' will be converted to
Gurmukhi according to the character set shown in Table 1.

All the text between \$ signs will be converted to Gurmukhi when the @dollars
preprocessor command is given.

The following characters are allowed but do not change representation inside
Gurmukhi delimiters:

    ! ` ' ( ) * - : ; = ? , [ ] +

The following characters are not allowed inside Gurmukhi delimiters:

    {\tt <}  {\tt >} F L Q V W X Y Z \^ \_ q w x

Obviously, characters outside Gurmukhi delimiters will not be changed to
Gurmukhi and will be printed in English Alphabet or will follow the 
rules which you specify.

To change the pointsize of characters within '$\{ \backslash gm$' and '$\}$'
the following delimiters can be used, in incremental sizes, :
\smallskip

\bigskip
\settabs 2 \columns
\+ $\backslash gmsmall$     & 8 point font \cr

\+ $\backslash gmnine$      & 9 point font \cr

\+ $\backslash gmnormal$    & 10 point font \cr

\+ $\backslash gmbig$       & 10 point font, magnified at 1 step \cr

\+ $\backslash gmlarge$     & 10 point font, magnified at 2 steps \cr

\+ $\backslash gmhuge$      & 10 point font, magnified at 3 steps \cr

\bigskip
{\bf Examples}

Different character sets, following above mentioned rules, within Gurmukhi
delimilters can produce desired output, like $\{ \backslash gm$ paNjaab$\}$
and $\{ \backslash gm$ pNjAb$\}$ will print {\gm pNjAb}.

Sometimes, you may have to type an extra `a' to complete a syllable, even
though it may not appear in the Gurmukhi representation of that word.

There are additional gm files other than the source of this document, which
can be referred to for examples.
\bigskip
{\bf Control commands}

At the start of input text, the following preprocessor commands 
can be used, to control the functionality of the preprocessor:

@obeylines
    To follow the line breaks which you type. 

@dollars
    To activate \$ as a special symbol such that text delimited by \$
    is converted to Gurmukhi.

@punjabi
    Does not do anything right now, but may be used when the tool 
    supports other languages.

After the above preprocessor commands, insert the following command 
to include a macro file.  This ia a very important step because 
without the macro file, \TeX\ will not recognize the translated 
text generated by the preprocessor.

\input gmmacs

\bigskip
{\subtitle Transforming a Document}
\bigskip

The ``Gurmukhi for \TeX'' package consists of a preprocessor, font files
and a macro file. See the file ``readme'' and ``install.unix'' for 
installation steps. Installation should be fairly easy, as there is 
no system dependent code. Wherever you can find \TeX\ and metafont, 
you can very possibly install and use this package.
\bigskip
{\bf The Preprocessor}

The job of the preprocessor is to find the correct representation of a 
character according to its context. When a vowel appears in a word, 
a syllable completes, and context changes to what it was at the 
beginning of a new word. It also finds possible half representation of
characters. Output of this preprocessor is a \TeX\ document.
\bigskip
{\bf Example session of commands}

Lets assume that during installation you have prepared the preprocessor 
with name "gurmukhi" and have set paths in your environment to locate font and
macro files. Lets also assume that you have an input file with the name "text.gm".

You would start the preprocessor on the file 'text.gm' as follows:
\bigskip
\settabs 2 \columns
\+ gurmukhi text  & (to get a \TeX\ file)\cr
\bigskip

The \TeX\ file produced here, text.tex, can be used as any other input
file for \TeX . After this a typical sequence of commands may be
\bigskip
\settabs 2 \columns
\+   tex text     & (to get dvi file) \cr
\smallskip
\+   xdvi text    & (to view dvi file) \cr
\bigskip


Another sequence after this may be
\bigskip
\settabs 2 \columns
\+   dvips text    & ( to get postscript file text.ps from text.dvi ) \cr
\smallskip
\+   gs text.ps    & ( to view postscript file ) \cr
\smallskip
\+   ghostview text.ps & ( another way to view postscript file ) \cr
\bigskip


Now it is time to send the postscript file to a postscript printer, and
a command command for this may be:

   lp text.ps    


\bigskip
{\subtitle Devanagari}
\bigskip

This section is presented for those who have used the Devanagari package
or would also like to use the Devanagari package. There are not many 
differences between the two. In Devanagari, you create a text file
in the same manner as with Gurmukhi, but you have slightly different 
character sets for representation and you will use a similar sequence of
commands.

The differences in character sets in Gurmukhi and Devanagari are as
follows:

In Gurmukhi, S and sh can also be used in addition to "s to produce {\gm S}
and N is used in Gurmukhi to print {\gm N (.ti~apI)}, ii produces {\gm ii}
 and not {\gm I}, \~\relax a produces {\gm ~a}.

The Devanagari software package allows many character sets such as .s,
.h, H, q which are not valid in Gurmukhi.

\bigskip
{\subtitle What may be next:}
\bigskip

Support for LaTeX

Porting to different systems and platforms

Combination of Devanagari and Gurmukhi.

\bigskip
{\subtitle Biblography}
\bigskip
[1] Norman Walsh {\it Making \TeX Work} O'Reilly \& Associates, Inc. July 1994.

[2] Donald E. Knuth {\it The \TeX book} Addison Wesley Publishing Co. Sep 1993

[3] Donald E. Knuth {it The METAFONT Book} Addison Wesley, 

[4] FTP Site for \TeX\ and related softwares, including METAFONT, and Devanagri

\indent { \indent{ftp.shsu.edu/tex-archive}}

[5] Frans J. Velthuis {\it Devanagari for \TeX} Version 1.2 

\bye