Debian Codegraph @

texmf-dist/doc/omega/base/torture.tex

raw
1 % This file is changed by Roozbeh Pournader to make it work
2 % with Omega 1.23 and fixing obvious bugs
3 \documentclass[a4paper,11pt]{article}
4 \usepackage{amsmath}
5 \usepackage{omega}
6 %\usepackage[dvips]{draftcopy}\draftcopyName{\today}{140}
7 \def\shortarab#1{{\pushocplist\ArabicOCP\fontfamily{omarb}\selectfont#1\popocplist}}
8 \def\shortberber#1{{\pushocplist\ArabicBerberOCP\fontfamily{omarb}\selectfont#1\popocplist}}
9 \def\shortgreek#1{{\pushocplist\GreekOCP\fontfamily{omlgc}\selectfont#1\popocplist}}
10 \def\shortlatberber#1{{\pushocplist\LatinBerberOCP\fontfamily{omlgc}\selectfont#1\popocplist}}
11 \def\shorttifi#1{{\pushocplist\TifinaghOCP\fontfamily{omlgc}\selectfont#1\popocplist}}
12 \def\shortpashto#1{{\pushocplist\AfghaPashtoOCP\fontfamily{omarb}\selectfont#1\popocplist}}
13 \def\shortpashtop#1{{\pushocplist\PakiPashtoOCP\fontfamily{omarb}\selectfont#1\popocplist}}
14 \def\shortsindhi#1{{\pushocplist\SindhiOCP\fontfamily{omarb}\selectfont#1\popocplist}}
15 \def\tl#1#2#3#4#5#6{\hline\rule[-5pt]{0pt}{14pt}\texttt{#1}&\shortarab{#1}&\texttt{#2}&\shortarab{#2}&\texttt{#3}&\shortarab{#3}&
16 \texttt{#4}&\shortarab{#4}&\texttt{#5}&\shortarab{#5}&\texttt{#6}&\shortarab{#6}\\}
17 %
18 \def\ttl#1#2#3{\hline\rule[-5pt]{0pt}{14pt}\texttt{#1}&\shortlatberber{#1}&\shortberber{#1}&\shorttifi{#1}&
19 \texttt{#2}&\shortlatberber{#2}&\shortberber{#2}&\shorttifi{#2}&
20 \texttt{#3}&\shortlatberber{#3}&\shortberber{#3}&\shorttifi{#3}\\}
21 %
22 \def\stl#1#2#3#4#5#6{\hline\rule[-5pt]{0pt}{14pt}\texttt{#1}&\shortsindhi{#1}&\texttt{#2}&\shortsindhi{#2}&\texttt{#3}&\shortsindhi{#3}&
23 \texttt{#4}&\shortsindhi{#4}&\texttt{#5}&\shortsindhi{#5}&\texttt{#6}&\shortsindhi{#6}\\}
24 \def\patl#1#2#3#4#5#6{\hline\rule[-5pt]{0pt}{14pt}\texttt{#1}&\shortpashto{#1}&\texttt{#2}&\shortpashto{#2}&\texttt{#3}&\shortpashto{#3}&
25 \texttt{#4}&\shortpashto{#4}&\texttt{#5}&\shortpashto{#5}&\texttt{#6}&\shortpashto{#6}\\}
26 \def\paptl#1#2#3#4#5#6{\hline\rule[-5pt]{0pt}{14pt}\texttt{#1}&\shortpashtop{#1}&\texttt{#2}&\shortpashtop{#2}&\texttt{#3}&\shortpashtop{#3}&
27 \texttt{#4}&\shortpashtop{#4}&\texttt{#5}&\shortpashtop{#5}&\texttt{#6}&\shortpashtop{#6}\\}
28 \begin{document}
29 \setcounter{page}{63}
30 \title{Multilingual Typesetting with \OMEGA, a Case Study: Arabic}
31 \author{Yannis Haralambous\thanks{Atelier Fluxus Virus, 187, rue Nationale,
32 59800 Lille, France, \texttt{[email protected]}}
33 \and
34 John Plaice\thanks{School of Computer Science and Engineering,
35 The University of New South Wales, Sydney 2052 Australia,
36 \texttt{[email protected]}}
37 }
38 \date{}
39 \maketitle
40 \begin{abstract}
41 In this paper we describe the internal structure of the Arabic script
42 package for the \OMEGA{} typesetting system, as well as the techniques
43 and tools used for its development. This package allows typesetting
44 using regular \LaTeX{} styles, in all Arabic alphabet languages:
45 Arabic, Berber, Farsi, Urdu, Pashto, Sindhi, Uighur, etc.
46
47 We also give a description of the character codes added to Unicode, to
48 obtain the Unicode++ encoding, used by the \OMEGA{} system for
49 typesetting purposes.
50 \end{abstract}
51
52 \section{Overview of the \OMEGA{} Arabic Script Package}
53
54 Typesetting with \OMEGA{} is a process similar to typesetting with
55 \TeX: the user prepares a ``source'' file, containing the text of
56 \hisher{} document and a certain number of macro-commands for
57 attribute changes of the text (font characteristics, language, case,
58 etc.), references to figures (included in graphical format files on
59 disk) and other material included in or accompanying the text.
60
61 Once this source file prepared, \OMEGA{} is launched: it reads the
62 file, expands the commands and typesets the text accordingly. To
63 perform this task, \OMEGA{} loads and executes several \OTP{}s
64 (\OMEGA{} Translation Processes), which take care of low level
65 properties of the document (contextual analysis of the script, case
66 switching according to script and language, etc.). It also uses
67 different fonts, most of which are \emph{virtual}, in the sense that
68 they themselves call other fonts. On a higher level, such a document
69 uses \LaTeX{} packages, some of them modified to take advantage of the
70 additional features of \OMEGA{} vs.\ \TeX.
71
72 The leading idea of the \OMEGA{} Arabic Script Package (as of any
73 \OMEGA{} language package) is that the low level properties of the
74 script have to be separated from higher level typesetting
75 commands. For example, contextual analysis of the Arabic script has to
76 be completely independent of the \LaTeX{} command level, so that one
77 can use Arabic text in any context (inside a table or a formula, or
78 deeply nested inside several \LaTeX{} environments and commands, etc.)
79 and under any circumstances, as in the following example, which has been
80 typeset with ordinary \LaTeX{} environments and macros:
81
82 {%\pardir TRT\textdir TRT
83 \pushocplist\ArabicOCP\fontfamily{omarb}\selectfont
84 \begin{center}\begin{tabular}{|c|c|}\hline
85 {\textdir TRT HayA"t} & {\textdir TRT mayyit}\\\hline
86 {\mathdir TLT$\displaystyle\int_{\text{\textdir TRT Sif<>r}}^{\hbox dir TRT{\textdir TRT ghyr maH<>duUd}}f(x)\,dx$} & {\textdir TRT 'aanA}\\\hline
87 \end{tabular}\end{center}
88 \popocplist}
89
90 There are two key aspects to Arabic script typesetting,
91 unfortunately of unequal complexity: the first one is contextual
92 analysis, that is the fact that Arabic letters change shape according
93 to their position in a word, or according to the fact that they are
94 part of an abbreviation, etc. This aspect can be handled easily and
95 efficiently by \OTP{}s. The second aspect is more global: it is the
96 fact that Arabic script is written from right to left.
97
98 Two methods can be applied: the first one is to change the default
99 direction of the whole document. This method is extremely efficient
100 when the document is entirely in Arabic, or if left-to-right text
101 excerpts are exceptional. Being global, this method applies also to
102 page-level typesetting methods, such as the order of columns in a
103 multicolumn environment, etc. Of course, mathematical formulas are not
104 affected by this global direction change.
105
106 The second method is to keep left-to-right as default direction and to
107 temporarily switch to right-to-left for every Arabic script
108 sentence. This can be practical for a document where Arabic excerpts
109 are exceptional.
110
111 \section{Parts of the \OMEGA{} Arabic Script Package}
112
113 This package consists of the following elements:
114
115 \begin{enumerate}
116 \item{}\tolerance=3000 The \texttt{OmegaSerifArabic} PostScript fonts:
117 files \texttt{omsea1.pfb}, \texttt{omsea2.pfb}, \texttt{omsea3.pfb}
118 and the corresponding AFM files. A Sans-serif font
119 (\texttt{Omega\-Sans\-Arabic}), as well as additional styles of the
120 Serif font are under development.
121 \item{}\tolerance=3000 The virtual font \texttt{omrl}: files
122 \texttt{omrl.ovf}, \texttt{omrl.ofm}, \texttt{omsea1.tfm},
123 \texttt{omsea2.tfm}, \texttt{omsea3.tfm}.
124 \item{} The configuration file \texttt{omrl.cfg}, which is used by the
125 PERL utility MakeOVP to create the virtual font out of the AFM files
126 and other information.
127 \item{} A certain number of \OTP{}s:
128 \begin{enumerate}
129 \item{} \texttt{7arb2uni.otp}, 7-bit Arabic/Farsi transcription to Unicode;
130 \item{} \texttt{7ber2uni.otp}, 7-bit Berber transcription to Unicode;
131 \item{} \texttt{7urd2uni.otp}, 7-bit Urdu transcription to Unicode;
132 \item{} \texttt{7pas2uni.otp}, 7-bit Afghanistani Pashto transcription to Unicode;
133 \item{} \texttt{7pap2uni.otp}, 7-bit Pakistani Pashto transcription to Unicode;
134 \item{} \texttt{7snd2uni.otp}, 7-bit Sindhi transcription to Unicode;
135 \item{} \texttt{uni2cuni.otp}, contextual analysis, sending Unicode++ to cUnicode++
136 (`c' for `contextual');
137 \item{} \texttt{cuni2oar.otp}, cUnicode++ to \texttt{omrl} font.
138 \end{enumerate}
139 These \OTP{}s are available in human-readable and compiled binary
140 format (OCP), the latter being loaded by \OMEGA{} on runtime.
141 \item{} A \LaTeX{} style (\texttt{arabic.sty}) defining a command that
142 will activate and deactivate the \OTP{}s.
143 \item{} Documentation and test files (\texttt{testarab.tex},
144 \texttt{testsind.tex}).
145 \end{enumerate}
146
147 \section{Installation of the \OMEGA{} Arabic Script Package}
148
149 To use the \OMEGA{} Arabic Script Package you must have \OMEGA{}
150 version 1.45 or higher installed on your machine. Place OFM, OVF, TFM
151 and OCP files where the system expects to find them (if in doubt,
152 consult the \texttt{texmf.conf} file). Keep the \texttt{arabic.sty}
153 file somewhere where it can be found by \OMEGA{}. Finally add the
154 following few lines to the \texttt{psfonts.map} configuration file of
155 \texttt{odvips}:
156 \begin{verbatim}
157 omsea1 OmegaSerifArabicOne </foo/omsea1.pfb
158 omsea2 OmegaSerifArabicTwo </foo/omsea2.pfb
159 omsea3 OmegaSerifArabicThree </foo/omsea3.pfb
160 \end{verbatim}
161 where \texttt{/foo} stands for the absolute path of the directory
162 containing the PFB files.
163
164 This is all you need to do: you can start already by launching
165 \OMEGA{} on files \texttt{testarab.tex} and \texttt{testsind.tex}.
166
167 In the following sections we will describe the use of the package,
168 from the end users' point of view. We will assume that the user is
169 familiar with the \TeX{} typesetting system and the \LaTeX{} macro
170 package.
171
172 \section{Basic Macros}
173
174 Before starting a new document one has to choose if the ``background
175 language'' is going to be an Arabic alphabet language, in other terms,
176 if we expect pages and columns to be typeset from right to left, and
177 the whole global page design to be right-to-left oriented.
178
179 If this the case, then the macro
180 \verb=\GlobalArabic[=\texttt{\textit{language}}\verb=]= has to be used
181 in the document header, where the optional argument
182 \texttt{\textit{language}} is one of the following: \texttt{arabic}
183 (by default), \texttt{farsi}, \texttt{urdu}, \texttt{pashto},
184 \texttt{sindhi}, \texttt{custom}.
185
186 This macro will switch the global typesetting direction of the
187 document to right-to-left and will launch the \OTP s necessary for the
188 language chosen.
189
190 Inside the document, independently of the choice of background
191 language, one can use \LaTeX{} environments \texttt{arabic},
192 \texttt{berber}, \texttt{farsi}, \texttt{urdu}, \texttt{pashto},
193 \texttt{pashtop}, \texttt{sindhi} to switch to the corresponding
194 language, and \texttt{latin} or \texttt{greek} to switch to a Latin
195 alphabet language or some flavour of Greek. It should be noted that
196 these macros are only temporary and will be adapted to a more global
197 language-switching scheme, currently being elaborated by the \LaTeX3
198 and \OMEGA{} working groups.
199
200 \section{Input of Arabic Alphabet Text}
201
202 \subsection{You Have an Arabic Keyboard}
203
204 If you have an Arabic Keyboard, containing sufficiently many keys for
205 the language you want to typeset (for example, with a standard Arabic
206 keyboard one can perhaps typeset Farsi, possibly Urdu but not Pashto
207 and certainly not Sindhi), you need to configure \OMEGA{} to your
208 \emph{input encoding}, by providing the appropriate input \OTP{} by
209 use of the \verb=\ArabicInputEncoding= macro, which you have to place
210 in the header of your document. We have already written such \OTP{}s
211 for three input encodings: Macintosh Arabic (\texttt{applemac},
212 covering Arabic, Farsi, Urdu), Windows Arabic (\texttt{1256}, covering
213 Arabic and Farsi), MS-DOS Arabic ASMO (\texttt{708}, covering Arabic
214 only) and ISO~8859-6 (\texttt{iso8859-6}, covering only Arabic). If
215 your equipment is not in this list, go to section~\ref{writingOTPs} to
216 see how to write your own \OTP{}s.
217
218 \subsection{You Don't Have an Arabic Keyboard}
219
220 In that case you can use a Latin transcription: we have prepared ASCII
221 Latin transcriptions for each of the main Arabic-alphabet languages:
222 Arabic, Berber, Farsi, Urdu, Pashto (Afghanistani and Pakistani),
223 Sindhi. Here they are:
224
225 \subsubsection{Arabic/Farsi Transcription}\label{arabtrans}
226
227 \begin{center}
228 \begin{tabular}{|c|c||c|c||c|c||c|c||c|c||c|c|}
229 \tl{A}{p}{z}{`}{m}{I}
230 \tl{'a}{j}{zh}{gh}{n}{y}
231 \tl{'i}{H}{s}{f}{'n}{'y}
232 \tl{'A}{kh}{sh}{q}{-h}{||}
233 \tl{"A}{ch}{S}{v}{"h}{E}
234 \tl{b}{d}{D}{k}{e}{}
235 \tl{t}{dh}{T}{g}{U}{LLah}
236 \tl{th}{r}{Z}{l}{'u}{SLh}
237 \hline
238 \end{tabular}
239 \end{center}
240
241 \noindent
242 Remarks:
243
244 \begin{enumerate}
245 \item The \emph{tah marbutah} \shortarab{"h} can be written in two
246 ways: \texttt{"h} or \texttt{"t}.
247 \item The \emph{waw} \shortarab{w} can be written in two ways:
248 \texttt{w} or \texttt{U}.
249 \item The hyphen in front of the transcription of \shortarab{h} is
250 only necessary to prevent confusion between cases such as \texttt{kh}
251 (\shortarab{kh}) and \texttt{k-h} (\begin{arab}k-h\end{arab}). We
252 suggest you use it all the time.
253 \item VERY IMPORTANT: the duplication of consonants (\emph{shaddah})
254 is obtained by writing the consonants twice. So for example,
255 \texttt{Dmm"h} will produce \begin{arab}Dmm"h\end{arab} and not
256 \begin{arab}Dm-m"h\end{arab}; to obtain the latter, type \texttt{Dm-m"h},
257 as for example in the word \begin{arab}t-tHrrk\end{arab}, which
258 presents both cases, and which is typed \texttt{t-tHrrk}.
259 \end{enumerate}
260
261 Vowels and other diacritics are obtained in the following way: (they
262 are typed after the consonant to which they belong)
263
264 \begin{center}
265 \begin{tabular}{|l|c|}
266 \hline fatha & \texttt{a}\\
267 \hline kasra & \texttt{i}\\
268 \hline damma & \texttt{u}\\
269 \hline soukoun & \texttt{<>}\\
270 \hline vertical fatha & \texttt{a|}\\
271 \hline fathatan & \texttt{aN}\\
272 \hline kasratan & \texttt{iN}\\
273 \hline dammatan & \texttt{uN}\\\hline
274 \end{tabular}\end{center}
275
276 Example: it is a trivial task now to welcome you to this system of
277 Arabic input, by saying
278
279 \begin{verbatim}
280 \begin{arab}
281 \Huge
282 'aahlAaN wa sahlAaN!
283 \end{arab}
284 \end{verbatim}
285
286 {\pardir TRT\textdir TRT
287 \begin{center}
288 \begin{arab}
289 \Huge
290 'aahlAaN wa sahlAaN!
291 \end{arab}
292 \end{center}
293 }
294
295 \noindent
296 Example of vowelized Arabic:\\[8pt]
297
298 {\pardir TRT\textdir TRT
299 \begin{quote}
300 \pushocplist\ArabicOCP\fontfamily{omarb}\selectfont\LARGE li'aannahaA
301 "Al<>'Ana laA tufakkiru fiI naf<>sihaA, walakinnahaA tufakkiru fiI
302 'aakhaway<>haA wafiI "Al<>khaTari "AlladhiI laHiqahumaA. \popocplist
303 \end{quote}
304 }
305
306 \noindent transcribed:
307
308 \begin{quote}
309 \texttt{li'aannahaA "Al<>'Ana laA tufakkiru fiI naf<>sihaA,\\
310 walakinnahaA tufakkiru fiI 'aakhaway<>haA\\
311 wafiI "Al<>khaTari "AlladhiI laHiqahumaA.}
312 \end{quote}
313
314 \subsubsection{Urdu Transcription}
315
316 The Urdu transcription is similar to the Arabic/Farsi one described
317 above, with a few additional characters, and one exception.
318
319 The additional characters are \shortarab{'t}, \shortarab{'d} and
320 \shortarab{'r}, transcribed by \texttt{'t}, \texttt{'d},
321 \texttt{'r}. The exception concerns the two different uses of the
322 \emph{hah} glyph \shortarab{h}. In Urdu it can be used as the second
323 part of a digraph, such as for example
324 \begin{smallurdu}jh\end{smallurdu}, in which case we transcribe it as
325 \texttt{-h}; it can also be the standard consonant \emph{hah}, in
326 which case we transcribe it by \texttt{x}. Notice the four forms of
327 the latter in Urdu: \begin{smallurdu}x-x-x x\end{smallurdu}, while in
328 Arabic the same letter is written \begin{smallarab}h-h-h
329 h\end{smallarab}.
330
331 \noindent
332 Example:
333
334 {\pardir TRT\textdir TRT
335 \begin{quote}
336 \pushocplist\UrduOCP\fontfamily{omarb}\selectfont xmArI Trf prAnE
337 zmAnE my'n dstUr t-hA kx Agr ksI shkhS kU kAghdh pr kchh lk-hA xUA grA
338 p'rA ml jAtA tU Uh As przE kU AHtyAT sE A't-hA kr kxy'n rk-h dytA yA
339 pAnI mI'n bxA dytA tAkx lk-hE xU'yE HrUf kI bE HrmtI nx xU.
340 \popocplist
341 \end{quote}}
342
343 \noindent
344 transcribed:
345
346 \begin{quote}
347 \texttt{xmArI Trf prAnE zmAnE my'n dstUr t-hA kx Agr ksI\\
348 shkhS kU kAghdh pr kchh lk-hA xUA grA p'rA ml jAtA tU Uh\\
349 As przE kU AHtyAT sE A't-hA kr kxy'n rk-h dytA yA pAnI mI'n\\
350 bxA dytA tAkx lk-hE xU'yE HrUf kI bE HrmtI nx xU.}
351 \end{quote}
352
353 \subsubsection{Pashto Transcription}
354
355 The Pashto transcription is similar to the Arabic/Farsi one described
356 beyond, with a few additional characters and some exceptions. We are
357 proposing two \OTP{}s, using the same transcription, for the two
358 flavors of written Pashto: Afganistani and Pakistani.
359
360 1. Afghanistani Pashto
361
362 \begin{center}
363 \begin{tabular}{|c|c||c|c||c|c||c|c||c|c||c|c|}
364 \patl{A}{'z}{'r}{D}{g}{-y}
365 \patl{b}{c}{z}{T}{l}{e}
366 \patl{p}{H}{zh}{Z}{m}{ay}
367 \patl{t}{kh}{'g}{`}{n}{ey}
368 \patl{'t}{d}{s}{gh}{'n}{||}
369 \patl{'s}{'d}{sh}{f}{w}{}
370 \patl{j}{dh}{x}{q}{-h}{LLah}
371 \patl{ch}{r}{S}{k}{L}{SLh}
372 \hline
373 \end{tabular}
374 \end{center}
375
376 2. Pakistani Pashto
377
378 \begin{center}
379 \begin{tabular}{|c|c||c|c||c|c||c|c||c|c||c|c|}
380 \paptl{A}{'z}{'r}{D}{g}{-y}
381 \paptl{b}{c}{z}{T}{l}{e}
382 \paptl{p}{H}{zh}{Z}{m}{ay}
383 \paptl{t}{kh}{'g}{`}{n}{ey}
384 \paptl{'t}{d}{s}{gh}{'n}{||}
385 \paptl{'s}{'d}{sh}{f}{w}{}
386 \paptl{j}{dh}{x}{q}{-h}{LLah}
387 \paptl{ch}{r}{S}{k}{L}{SLh}
388 \hline
389 \end{tabular}
390 \end{center}
391
392 Nevertheless, one should be aware that an automatic transcription from
393 one glyph set to the other is not possible because, for example, a
394 letter such as \begin{pashto}x\end{pashto} is not used in Pakistani
395 Pashto and can be replaced by \begin{pashto}kh\end{pashto} or
396 \begin{pashto}sh\end{pashto}, depending on its pronunciation in a given word.
397
398 \noindent
399 Example of Afghanistani Pashto:
400
401 {\pardir TRT\textdir TRT
402 \begin{quote}
403 \pushocplist\AfghaPashtoOCP\fontfamily{omarb}\selectfont k-h ghUA'ray
404 chh d`ql yh zyAn AUDrrpUh shay dA U mnI || chh `ql hghh. qUtUnh
405 p-hs'rI kxI wzhnI zhh zhUnde wlA'rdI. zhUndUn p-h`ml AUArAd-h
406 wlA'rdI. ghUxtnh lUArAd-h d-hre-yshr ft ASl AUAsAs dI. cUmrh chh `ql
407 zyAtebz hghUmrh ArAd-h D`yf-h kebzI. \popocplist
408 \end{quote}}
409
410 \noindent
411 and the same in Pakistani Pashto:
412
413 {\pardir TRT\textdir TRT
414 \begin{quote}
415 \pushocplist\PakiPashtoOCP\fontfamily{omarb}\selectfont k-h ghUA'ray
416 chh d`ql yh zyAn AUDrrpUh shay dA U mnI || chh `ql hghh. qUtUnh
417 p-hs'rI kxI wzhnI zhh zhUnde wlA'rdI. zhUndUn p-h`ml AUArAd-h
418 wlA'rdI. ghUxtnh lUArAd-h d-hre-yshr ft ASl AUAsAs dI. cUmrh chh `ql
419 zyAtebz hghUmrh ArAd-h D`yf-h kebzI. \popocplist
420 \end{quote}}
421
422 \noindent
423 transcribed:
424
425 \begin{quote}
426 \texttt{k-h ghUA'ray chh d`ql yh zyAn AUDrrpUh shay dA\\
427 U mnI || chh `ql hghh. qUtUnh p-hs'rI kxI wzhnI zhh zhUnde\\
428 wlA'rdI. zhUndUn p-h`ml AUArAd-h wlA'rdI. ghUxtnh lUArAd-h\\
429 d-hreyshr ft ASl AUAsAs dI. cUmrh chh `ql zyAtebz hghUmrh\\
430 ArAd-h D`yf-h kebzI.}
431 \end{quote}
432
433 A variant form \shortpashto{^^^^015d} of \shortpashto{'g} is provided
434 in the font. The user can change the \OTP{}s (see~\ref{writingOTPs})
435 so that the former is used instead of the latter.
436
437 \subsubsection{Sindhi Transcription}
438
439 Sindhi being a language with many more letters than Arabic, and using
440 Arabic letters in a way quite different than Arabic, it is not
441 surprising that the Sindhi transcription is fundamentally different
442 from the Arabic, Farsi, Urdu and Pashto ones. As a matter of fact we
443 have tried to use as few non-alphabetic characters as possible,
444 following a more-or-less rational scheme loosely based on the
445 correspondence between Sindhi written in Arabic and in Devanagari
446 script and the standard transcription of the latter. Since shadda is
447 much more seldom in Sindhi than in Arabic, the ``double consonant $=$
448 consonant $+$ shadda'' convention is not valid in this transcription;
449 instead we propose a transcription of the shadda diacritic:
450 \texttt{+}.
451
452 \begin{center}
453 \begin{tabular}{|c|c||c|c||c|c||c|c||c|c||c|c|}
454 \stl{A}{p}{dh}{sh}{kh}{y}
455 \stl{'A}{ph}{.=d}{.s}{.n}{'y}
456 \stl{b}{j}{.d}{.z}{g}{meN}
457 \stl{=b}{=j}{.dh}{..t}{=g}{||eN}
458 \stl{bh}{=n}{=z}{..z}{l}{||}
459 \stl{t}{c}{r}{`}{m}{}
460 \stl{th}{ch}{.r}{gh}{n}{}
461 \stl{.t}{.h}{z}{f}{'n}{}
462 \stl{.th}{=kh}{zh}{q}{U}{LLah}
463 \stl{=s}{d}{s}{k}{-h}{SLh}
464 \hline
465 \end{tabular}
466 \end{center}
467
468 \noindent
469 Remarks:
470
471 \begin{enumerate}
472 \item The transcription \texttt{/} is used for constructions such as
473 \begin{sindhi}b/\end{sindhi} (\texttt{b/}),
474 \begin{sindhi}t/\end{sindhi} (\texttt{t/}), \begin{sindhi}kh/\end{sindhi}
475 (\texttt{kh/}), etc.
476 \item The \emph{waw} \shortarab{w} can be written in two ways:
477 \texttt{w} or \texttt{U}.
478 \end{enumerate}
479
480 \noindent
481 Example:
482
483 {\pardir TRT\textdir TRT
484 \begin{quote}
485 \pushocplist\SindhiOCP\fontfamily{omarb}\selectfont tn-hn kry AsAn khy
486 pn-hnjy =z-hnn khy sjA=g rkh'nU pUndU ||eN pn-hnjy jdUj-hd meN .=dA-hp
487 pydA kr'ny. AhU b/ m`lUm kr'nU pUndU t/ sndh meN hr 'A'yy wqt chA chA
488 thy r-hyU 'Ahy ||eN dshmn AsAn jy ||eN AsAn jy jdUj-hd jy khlAf k-h.rA
489 k-h.rA g-hA.t g-h.ry r-hyU 'Ahy. \popocplist
490 \end{quote}}
491
492 \noindent
493 transcribed:
494
495 \begin{quote}
496 \texttt{tn-hn kry AsAn khy pn-hnjy =z-hnn khy sjA=g rkh'nU\\
497 pUndU ||eN pn-hnjy jdUj-hd meN .=dA-hp pydA kr'ny. AhU b/\\
498 m`lUm kr'nU pUndU t/ sndh meN hr 'A'yy wqt chA chA thy r-hyU\\
499 'Ahy ||eN dshmn AsAn jy ||eN AsAn jy jdUj-hd jy khlAf k-h.rA\\
500 k-h.rA g-hA.t g-h.ry r-hyU 'Ahy.}
501 \end{quote}
502
503 \subsubsection{Berber Transcription}
504
505 The Berber transcription is different from the previous ones because
506 it is based on a tri-alphabetic system (Tifinagh, Latin and Arabic
507 alphabets).\footnote{The reader can find more information in \emph{Un
508 syst^^^^00e8me \TeX{} berb^^^^00e8re}, ^^^^00c9tudes et Documents
509 Berb^^^^00e8res, 11 (1994), La bo^^^^00eete ^^^^00e0
510 Documents/^^^^00c9disud, Paris (France).} The goal of this
511 transcription is to enable output in the three alphabets, out of the
512 same code. In particular, since Latin alphabet has upper and lower
513 case, it should be possible to distinguish these (and of course ignore
514 the distinction when typesetting in Arabic or Tifinagh). In the table
515 below, all transcribed letters are in lowercase ASCII, but can very
516 well be written also in uppercase, producing the same result:
517 \texttt{Tifinagh}, \texttt{tifinagh} or \texttt{TIFINAGH} will all
518 three produce \begin{arab}tyfynAgh\end{arab}.
519
520 \begin{center}
521 \begin{tabular}{|c|c|c|c||c|c|c|c||c|c|c|c|}\hline
522 Tr. & Lat. & Ar. & Tif. & Tr. & Lat. & Ar. & Tif. & Tr. & Lat. & Ar. & Tif. \\\hline
523 \ttl{a}{.h}{.s}
524 \ttl{b}{i}{t}
525 \ttl{c}{j}{.t}
526 \ttl{gh}{k}{u}
527 \ttl{d}{l}{x}
528 \ttl{.d}{m}{z}
529 \ttl{.e}{n}{.z}
530 \ttl{f}{.n}{.i}
531 \ttl{g}{q}{--}
532 \ttl{.g}{r}{}
533 \ttl{h}{s}{}
534 \hline
535 \end{tabular}
536 \end{center}
537
538 \noindent
539 Remarks:
540
541 \begin{enumerate}
542 \item Letter \shortarab{U} can also be transcribed \texttt{w}.
543 \item Letter \shortarab{I} can also be transcribed \texttt{y}.
544 \item The stroke \shortberber{^^^^063f} is not to be confused with the
545 graphical connecting stroke \emph{keshideh}. It is placed between
546 words and plays a grammatical role.
547 \item Duplication of consonants (\emph{shaddah}) again is transcribed
548 by writing the corresponding consonant twice.
549 \end{enumerate}
550
551 \noindent
552 Example:
553
554 {\pardir TRT\textdir TRT
555 \begin{quote}
556 \pushocplist\ArabicBerberOCP\fontfamily{omarb}\selectfont Tifinagh,
557 d--tira timezwura n .imazighen. Llant di tmurt--nnegh dat tira n
558 ta.erabt d--tla.tinit. Nnulfant--edd dat .imir n ugellid
559 Masinisen. .Imazighen n .imir--en, ttarun--tent ghefi.zra, degg
560 .ifran, ghef .igduren, maca tiggti ghef i.zekwan~: ttarun fell--asen
561 .isem n umettin, d wi--t--ilan, d wayen yexdem di tudert--is akken ur
562 t ttettun .ina.tfaren. \popocplist
563 \end{quote}}
564
565 \noindent
566 transcribed:
567
568 \begin{quote}\small
569 \texttt{Tifinagh, d--tira timezwura n .imazighen.\\
570 Llant di tmurt--nnegh dat tira n ta.erabt d--tla.tinit.\\
571 Nnulfant--edd dat .imir n ugellid Masinisen. .Imazighen n\\
572 .imir--en, ttarun--tent ghefi.zra, degg .ifran, ghef .igduren,\\
573 maca tiggti ghef i.zekwan~: ttarun fell--asen .isem n umettin,\\
574 d wi--t--ilan, d wayen yexdem di tudert--is akken ur t ttettun\\
575 .ina.tfaren.}
576 \end{quote}
577
578 \noindent
579 The same code will produce the following output in the Tifinagh alphabet:
580
581 \begin{quote}
582 \begin{tifinagh}Tifinagh, d--tira timezwura n .imazighen.
583 Llant di tmurt--nnegh dat tira n ta.erabt d--tla.tinit. Nnulfant--edd
584 dat .imir n ugellid Masinisen. .Imazighen n .imir--en, ttarun--tent
585 ghefi.zra, degg .ifran, ghef .igduren, maca tiggti ghef i.zekwan~:
586 ttarun fell--asen .isem n umettin, d wi--t--ilan, d wayen yexdem di
587 tudert--is akken ur t ttettun .ina.tfaren.\end{tifinagh}
588 \end{quote}
589
590 \noindent
591 and the following one in the Latin alphabet:
592
593 \begin{quote}
594 \begin{latberber}Tifinagh, d--tira timezwura n .imazighen.
595 Llant di tmurt--nnegh dat tira n ta.erabt d--tla.tinit. Nnulfant--edd
596 dat .imir n ugellid Masinisen. .Imazighen n .imir--en, ttarun--tent
597 ghefi.zra, degg .ifran, ghef .igduren, maca tiggti ghef i.zekwan~:
598 ttarun fell--asen .isem n umettin, d wi--t--ilan, d wayen yexdem di
599 tudert--is akken ur t ttettun .ina.tfaren.\end{latberber}
600 \end{quote}
601
602 \section{Writing Your Own Transcription}\label{writingOTPs}
603
604 We have developed and presented in this paper a certain number of
605 Arabic alphabet language transcriptions for two reasons: first, to
606 show the possibilities and power of \OMEGA, and second, to give a
607 starting point for the user to create \hisher{} own transcriptions.
608
609 The process of creating a new transcription is twofold: the first
610 part, which can be very difficult and painful, consists of finding the
611 combination of letters, digits and ASCII symbols which will transcribe
612 each character; the second one, which is straightforward (modulo some
613 precautions) is to implement this in \OMEGA{} by writing the
614 appropriate \OTP.
615
616 \subsection{A Good Transcription: Is it Possible?}
617
618 There are (at least) two goals for a good transcription:
619
620 \begin{enumerate}
621 \item \emph{It has to be readable and easily memorizable}. In other
622 words, \texttt{AHmd} is better than \texttt{'.hmd}, for denoting
623 \begin{smallarab}AHmd\end{smallarab} : although an apostrophe can be
624 considered a logical choice for transcribing an alif and the period in
625 front of the h may denote that it is an emphatic `h' sound, taking an
626 A for alif and a capital H for the emphatic h is more readable; also
627 using rules such as ``uppercase ASCII characters transcribe emphatic
628 letters'' is an easy way to memorize the transcriptions of
629 \shortarab{H}, \shortarab{T}, \shortarab{D}, \shortarab{S},
630 \shortarab{Z}.
631 \item \emph{It has to be complete and avoid ambiguities}. Of course
632 all letters of the target language have to be covered, but having many
633 letters to transcribe leads sometimes to ambiguities: for example
634 taking \texttt{h} for \shortarab{h}, \texttt{k} for \shortarab{k} and
635 \texttt{kh} for \shortarab{kh} are perfectly logical choices;
636 nevertheless there is a hitch: when you need to transcribe
637 \begin{smallarab}k-h\end{smallarab} you are tempted to write simply
638 \texttt{kh} and this will of course produce \shortarab{kh}
639 instead. The solution we have given to this problem is to type a
640 hyphen between the letters which are not considered as a `digraph',
641 but this is only a compromise solution: the user must constantly be
642 aware of this problem, and this is hardly the case when you are
643 concentrated in your text...
644 \end{enumerate}
645
646 It is clear that these two goals are contradictory: an accurate and
647 unambiguous transcription has to be complicated and will be difficult
648 to read and memorize; a friendly and easily readable transcription
649 will be full of ambiguities.
650
651 An additional problem when making a transcription is to choose between
652 \emph{(etymo)logical}, \emph{phonetic} and \emph{graphical}
653 representations of characters. A typical example is the standard
654 \OMEGA{} transcription of Greek: \texttt{w} is chosen for letter
655 \shortgreek{w}, this is a purely \emph{graphical} choice: the `w'
656 looks like an omega, but has absolutely no other relation with,
657 neither historical nor phonetic (the letter omega represents the sound
658 `o' in modern Greek); \texttt{b} is chosen for letter \shortgreek{b},
659 this is an \emph{etymological} choice: the Latin `B' derives from the
660 ancient Greek `B', otherwise \shortgreek{b} looks quite different than
661 `b' and is pronounced `v' in modern Greek; finally, \texttt{x} is a
662 \emph{phonetic} transcription of letter \shortgreek{x}; clearly they
663 do not bear any resemblance, and historically it is not clear (at
664 least to the author) why `x' should be derived from \shortgreek{x}
665 (their positions in the alphabet is quite different as well, and this
666 is an argument speaking against an etymological relation between the
667 letters).
668
669 The reader may object that this distinction between etymological,
670 phonetic and graphical representations is not relevant for Arabic
671 alphabet transcriptions; actually this is only partly true: take for
672 example \texttt{bh} for \shortsindhi{bh}, this is an
673 \emph{etymological} transcription in the sense that it reflects the
674 standard transcription of the Indic alphabet letter which corresponds
675 to that Sindhi letter. Also \texttt{`} for ayn is in some sense a
676 \emph{graphical} representation: it has been chosen because it
677 resembles the IPA transcription of the ayn, which is ^^^^0295. For the
678 same reason, \texttt{'} has been chosen for the hamza with carrier (in
679 \shortarab{'a}, \shortarab{'u}, etc.): the hamza's IPA transcription
680 is ^^^^0294.
681
682 We hope to have convinced the reader that the making of a
683 transcription is a difficult task, needing a lot of thought,
684 compromises and tests. Once again, we would like to emphasize the fact
685 that our transcriptions are only temptative proposals and should not
686 be taken as standards of any kind; after all the power of \OMEGA\ is
687 that it can work with any input transcription without affecting
688 further processing, be it contextual analysis, diacritic placement or
689 esthetical ligaturing.
690
691 In the next section we will see how to implement a new transcription
692 or change an existing one by writing/modifying an \OTP\ file. But
693 first some generalities on the \OTP{}s used by the Arabic \OMEGA\
694 system.
695
696 \subsubsection{The \OTP{}s used by the Arabic \OMEGA{} system}
697
698 When \OMEGA{} reads the text flow it places letters, digits and
699 punctuation (whatever is not an escape or special character) into a
700 buffer. When it encounters a special character it stops buffering and
701 executes one after the other all currently active \OTP{}s on the
702 buffer. In theory, \OTP{}s could be used to arbitrarily send
703 character combinations to other combinations: one could very well
704 imagine an \OTP{} sending the string "Yannis" to "John" and "John" to
705 "Yannis", or "Microsoft Word" to
706 "^^^^02a7\kern-1pt^^^^04a9^^^^03be^^^^0468^^^^029a"; nevertheless,
707 such an \OTP{} would not be of general use...
708
709 Our development has mainly been focused in building \OTP{}s in
710 accordance to the following scheme:
711 $$
712 \boxed{\text{Input text}} \xrightarrow{\text{\texttt{foo2uni}}} \boxed{\text{Unicode++}}
713 \xrightarrow{\text{\texttt{uni2foo}}} \boxed{\text{DVI output}}
714 $$
715 where \texttt{foo2uni} sends text encoded in an arbitrary encoding
716 into Unicode++ (Unicode++ is Unicode extended for the needs of
717 \OMEGA{} and typography), and \texttt{uni2foo} converts
718 Unicode++-encoded data into the encoding of the output font. By this
719 method we are able to keep completely separate input encoding and font
720 encoding.
721
722 In the case of Arabic things are slightly more complicated since an
723 additional step is needed: contextual analysis. This is where our
724 scheme proves to be extremely efficient: by performing contextual
725 analysis on the level of Unicode++, and hence obtaining the following
726 new scheme:
727 $$
728 \boxed{\text{Input text}} \xrightarrow{\text{\texttt{foo2uni}}} \boxed{\text{Unicode++}}
729 \xrightarrow{\text{\texttt{uni2cuni}}} \boxed{\text{cUnicode++}}
730 \xrightarrow{\text{\texttt{cuni2oar}}} \boxed{\text{DVI output}}
731 $$
732 we still remain independent of both the input and the font
733 encoding. This means that if we need to adapt \OMEGA{} to a new Arabic
734 encoding we only need to indicate which code position corresponds to
735 which Unicode character, and, on the other hand, if we want to adapt a
736 new font to \OMEGA, we only need to indicate which font position
737 corresponds to which contextual form of which character, in
738 cUnicode++.
739
740 In the next section we will partly describe the syntax of \OTP{} files
741 by giving examples of \texttt{foo2uni} cases.
742
743 \subsection{Implementing a Transcription}
744
745 The \OTP{} files we will need for input encoding $\to$ Unicode++
746 transformations use only part of the syntax of \OTP{}
747 files.\footnote{The \texttt{uni2cuni} \OTP{} file already needs more
748 complicated constructions.} Such an \OTP{} file is of the following
749 form:
750
751 \begin{verbatim}
752 input: 1;
753 output: 2;
754 expressions:
755 ...
756 ...
757 \end{verbatim}
758
759 \noindent where \texttt{input: 1; output: 2;} means that input is
760 8-bit while output is 16-bit, and \texttt{...} are lines of the
761 following form:
762
763 \begin{verbatim}
764 before => after ;
765 \end{verbatim}
766
767 \noindent where \texttt{before} is an expression before the
768 transformation, and \texttt{after} after it. For example,
769
770 \begin{verbatim}
771 `a' => "o" ;
772 \end{verbatim}
773
774 \noindent will transform all `a's in the file into `o's.
775
776 How do we describe characters and strings? On the left side of
777 \texttt{=>} we can only put separate characters: they can be written
778 either as ``grave accent+ASCII character+apostrophe'' or as
779 \texttt{@"XYZT} where \texttt{XYZT} are hexadecimal digits: in this
780 case we are not restricted to ASCII characters. The latter syntax can
781 also be used on the right side. For example,
782
783 \begin{verbatim}
784 `i'`j' => @"0133 ;
785 @"008E => @"00E9 ;
786 \end{verbatim}
787
788 \noindent will send the string `ij' to the Unicode++ character
789 representing the Dutch ^^^^0133 ligature, and the 8-bit code 8E (a
790 Macintosh `e' with acute accent) to the Unicode++ character 00E9
791 (which is the Unicode `e' with acute accent).
792
793 On the right side of \texttt{=>} we can also write complete strings,
794 possibly containing \OMEGA{} commands, which will be forwarded to the
795 next \OTP{} or to the typesetting engine of \OMEGA. For example,
796
797 \begin{verbatim}
798 `~' => "\penalty10000" ;
799 \end{verbatim}
800
801 \noindent sends the tilde character to the \TeX{} command of infinite
802 penalty.\footnote{By this we obtain the same result as in \TeX{} but
803 without turning tilde into an active character, a fact that \TeX{}
804 users will surely appreciate.} We can also use ranges on the left
805 side: for example, \texttt{`a'-`k'} means ``all characters between a
806 and k''.
807
808 By using parentheses and the vertical bar on the left side, we obtain
809 the Boolean `or' operator:
810
811 \begin{verbatim}
812 (`E'|`e') => ;
813 \end{verbatim}
814
815 \noindent for example, will send both uppercase and lowercase letters
816 `e' to nothing (a transformation which would leave Perec's book
817 \emph{La disparition} unchanged\footnote{Although there are rumors
818 that there is a single `e' in that book... The authors were not able
819 to find it yet.}).
820
821 This operator becomes even more useful by the fact that we can use on
822 the right side the exact character matched on the left side: the
823 commands \verb=\1=, \verb=\2=, ... , \verb=\9= used on the right side
824 stand for the first, second, ..., ninth character matched on the left
825 side. For example:
826
827 \begin{verbatim}
828 `c'(`a'|`e'|`i'|`o'|`u')`t' => "m" \1 "p" ;
829 \end{verbatim}
830
831 \noindent will send cat, cet, cit, cot, cut respectively to map, mep,
832 mip, mop, mup.
833
834 We can go even further: \OTP{} syntax allows us to add or substract a
835 fixed offset to the characters matched on the left side. For example:
836
837 \begin{verbatim}
838 `a'-`z' => #(\1 - @"0020) ;
839 \end{verbatim}
840
841 \noindent will substract 20 from the code position of the character
842 found on the left side. The characters on the left side being
843 precisely lowercase letters, this offset will turn them into uppercase
844 ones.
845
846 \subsubsection{Examples}
847
848 The beginning of the \OTP{} \texttt{7arb2uni}, used to send the ASCII
849 transcription of Arabic to Unicode++, described in~\ref{arabtrans}, to
850 Unicode++, looks like this:
851
852 \begin{verbatim}
853 input: 1;
854 output: 2;
855
856 expressions:
857
858 `L'`L'`a'`h' => @"FDF2 ;
859 `S'`L'`h' => @"FDFA ;
860
861 `|'`|'`|'`|' => @"0621 @"0651 ;
862 `|'`|' => @"0621 ;
863 `z'`h'`z'`h' => @"0698 @"0651 ;
864 `z'`h' => @"0698 ;
865 `z'`z' => @"0632 @"0651 ;
866 `z' => @"0632 ;
867 `y'`y' => @"064A @"0651 ;
868 `y' => @"064A ;
869 `v'`v' => @"06A4 @"0651 ;
870 `v' => @"06A4 ;
871 `u'`N' => @"064C ;
872 `u' => @"064F ;
873 \end{verbatim}
874
875 Let us take a closer look at these lines. The left sides
876 \texttt{`L'`L'`a'`h'} and \texttt{`S'`L'`h'} correspond to the
877 (religious) ligatures \shortarab{LLah} and \shortarab{SLh} which
878 appear in the \emph{Arabic Presentation Forms} part of Unicode, that's
879 why the code positions we send them to are so high. The line
880 \texttt{`|'`|'`|'`|'} corresponds to a double hamza; according to our
881 transcription rules, by writing a letter's transcription twice without
882 intermediate hyphen, we get the letter followed by a \emph{shaddah}
883 diacritic. On the right side of \texttt{`|'`|'`|'`|'} you see two
884 codes: 0621 stands for the stand-alone hamza in Unicode++, and 0651
885 for the \emph{shaddah}. The next line will send \texttt{||} to the
886 stand-alone hamza.
887
888 WARNING: the order of these lines is very important: transformations
889 are matched in the order lines are read. By putting the double hamza
890 before the single one, \OMEGA{} will first look for a double hamza and
891 \emph{only if it does not find any} will then proceed to transforming
892 a single one.
893
894 For the same reason digraphs such as \texttt{zh} must appear before
895 their first letter in the \OTP{} file (and trigraphs before the
896 starting digraph, etc.). That's why the order of lines starting with a
897 `z' is `zhzh', `zh', `zz', `z'.%
898 \footnote{There is a simple way of avoiding ordering problems: after
899 having written this part of the \OTP{} file, run a line sorting
900 program on it so that lines are sorted in \emph{inverse}
901 lexicographical order. This will automatically place trigraphs before
902 digraphs before singletons, etc.}
903
904 Our sample file ends like this:
905
906 \begin{verbatim}
907 `h'`h' => #(@"0647) #(@"0651) ;
908 `h' => #(@"0647) ;
909 `-'`-'`-' => @"2014;
910 `-' => ;
911 . => #(\1) ;
912 \end{verbatim}
913
914 This means that after having entered all digraphs using `h' as second
915 character, we enter the stand-alone `h', first as a double letter, and
916 secondly as a single letter. Finally we send the triple hyphen to an
917 m-dash `---' and the single hyphen to nothing: its purpose is to
918 prevent combinations of letters to be interpreted as digraphs: when
919 reading \texttt{k-h}, \OMEGA{} will not match it with \texttt{kh}: it
920 will first match \texttt{k} with letter kaf, then send the hyphen to
921 the vacuum of non-existence and when arriving to the \texttt{h} the
922 \texttt{k} will already be matched so that it is too late to construct
923 a \texttt{kh} digraph.
924
925 The period at the beginning of the last line is part of the \OTP{}
926 syntax we have not seen yet: it means `any character'. Since this is
927 the last line of the file, we can interpret it rather like `any still
928 not matched character'. This line simply sends any character not yet
929 matched to itself.
930
931 \subsection{Wrapping it up}
932
933 Once the \OTP{} file has been written or modified, one only needs to
934 compile it (by using the \texttt{otp2ocp} utility) and place it where
935 \OMEGA{} expects to find it. On the \LaTeX{} command level, \OTP{}s
936 are loaded via the \verb=\ocp= command, in a way similar to fonts: to
937 load the file \texttt{foo2uni} one will write
938
939 \begin{verbatim}
940 \ocp\FooUni=foo2uni
941 \end{verbatim}
942
943 Of course this is preferably done inside a \LaTeX{} package or style
944 file: the final user should not need to deal with or understand this
945 kind of code. Once the \OTP{}s are loaded they are combined into
946 \emph{lists}. In this way we can push or pop simultaneously \OTP{}s
947 on/from a stack. This is useful because a language switch usually
948 requires several \OTP{}s to be changed at once. To define \OTP{} lists
949 we use the following syntax:
950
951 \begin{verbatim}
952 \ocplist\ArabicOCP=
953 \addbeforeocplist 100 \ArabUni
954 \addbeforeocplist 200 \UniCUni
955 \addbeforeocplist 300 \CUniArab
956 \nullocplist
957 \end{verbatim}
958
959 The numbers (100, 200, 300) allow us to introduce additional \OTP{}s,
960 if necessary, between the already defined ones. Finally, to
961 activate/desactivate an \OTP{} list, we use the commands
962 \verb=\pushocplist= (followed by the name of the \OTP{} list) and
963 \verb=\popocplist=. To take a real life example,
964
965 \begin{verbatim}
966 \ocp\ArabUni=7arb2uni
967 \ocp\UniCUni=uni2cuni
968 \ocp\CUniArab=cuni2oar
969 \ocplist\ArabicOCP=
970 \addbeforeocplist 100 \ArabUni
971 \addbeforeocplist 200 \UniCUni
972 \addbeforeocplist 300 \CUniArab
973 \nullocplist
974 \pushocplist\ArabicOCP
975 \end{verbatim}
976
977 \noindent is sufficient to load all \OTP{}s necessary for typesetting
978 in the Arabic language.
979
980 \section{Availability and Further Information}
981
982 The \OMEGA{} system is entirely in the public domain. It can be
983 obtained from any CTAN server. The latest information on \OMEGA{} and
984 its Arabic system can be found on the \OMEGA{} server:
985
986 $$\text{\texttt{http://www.ens.fr/omega}}$$
987
988 \noindent courtesy of the ^^^^00c9cole Normale Sup^^^^00e9rieure de
989 Paris.
990
991 \section{Samples}
992
993 Starting from next page, a few samples (Arabic, Berber, Sindhi). For
994 these examples we have switched the background language to Arabic, so
995 that even page numbers are in Arabic.
996
997 \newpage
998 \makeatletter
999 \def\@evenfoot{\reset@font\hfil{\textdir TLT\thepage}\hfil}
1000 \let\@oddfoot=\@evenfoot
1001 \makeatother
1002 \pagedir TRT
1003 \bodydir TRT
1004 \pardir TRT
1005 \textdir TRT
1006 \def\latinit#1{{\fontfamily{omlgc}\selectfont\pushocplist\BasicLatinOCP%
1007 \textdir TLT #1\popocplist}}
1008 \def\rmdefault{omarb}
1009 \fontfamily{omarb}\selectfont
1010 \pushocplist\ArabicOCP
1011
1012
1013 \subsection{'aTfAl AlghAb"t}
1014
1015 kAn l'aHd AlmlUk AlqdmA|| 'akht t`ysh m`h fI qSrh, b`d 'an mAt-t
1016 zUjt-h, wtrkt lh mn Al'awlAd thlAth"t: 'amyryn w'amyr"t. wqd AzdAd Hbb
1017 Almlk l'awlAd-h, b`d wfA"t wAldt-hm Almlk"t, w'aHbbhm HbbA kthyrA;
1018 ly`wwDhm mA fqdUh mn `Tf 'ammhm wHbbhA lhm, wtfkyr hA fyhm; fkAn ys'al
1019 `nhm kllmA HDr, wyfkkr fyhm kllmA dkhl, wywSI bhm kllmA khrj, wyTlbhm
1020 kllmA jls ltnAwl T`Am Al'ifTAr 'aU AlghdA|| 'aU AlshshAI 'aU Al`shA||.
1021
1022 mHHm"t 'akhyhA l'awlAd-h, wSmm-mt fymA bynhA wbyn nfs-hA 'an t`ml srrA
1023 kll wsyl"t m-mkn"t l'ib`Ad-hm `n 'abyhm wAlttkhllS mnhm.
1024
1025 wfI yUm mn Al'ayyAm kAn Al'amyrAn yl`bAn m` 'akht-hmA Al'amyr"t fI
1026 HdA'yq AlqSr b`d khrUj Almlk, fshUUqt-hm `mmt-hm wHbb-bt 'ilyhm
1027 Aldhdh-hAb m`hA 'ilI AlghAb"t l-ll`Ab fyhA, w-w`dt-hm 'an tryhm
1028 'ashyA|| jmyl"t w'al`AbA ldhydh"t sArr"t tHt Al'ashjAr hnAk.
1029
1030 fSddq Al'amyrAn wAl'amyr"t mA qAlt-h `mmt-hm, wlm y`rfUA mA tkhfyh
1031 `nhm mn Alshshrr, wdhhbUA m`hA l-ll`b wAlrryAD"t fI 'alghAb"t,
1032 wmshAhd"t Al'ashA|| Aljmyl"t fyhA, wr'uy"t Al'al`Ab Alghryb"t tHt
1033 'ashjArhA.
1034
1035 wqd sh`r Al'aTfAl bsrUr kthyr `nd mAkhrjUA m` `mmt-hm lhdhh
1036 AlrrHl"t. w'akhdhUA ymshUn m`hA fI AlghAb"t HttI wSlUA 'ilI wsThA,
1037 f'aHssUA bAltt`b Alshshdyd, wThrt `lAmAt-h fI mshyt-hm, w`lI wjUh-hm
1038 b`d hdhh AlrrHl"t AlTTUyl"t Almt`b"t AlltI lm yjrrbUhA mn qbl. UlmAA
1039 sh`rt Al`mm"t bshdd"t t`bhm, qAlt lhm: nAmUA hnA tHt hdhh Alshshjr"t
1040 HttI tHDr AlHUryyAt ltl`b 'amAmkm 'al`AbA lm trUhA, wstjdUn fI
1041 mshAhdt-hA kll ldhdh"t wsrUr. \popocplist
1042
1043 \pushocplist\ArabicBerberOCP
1044
1045 \subsection{Allal i useqdc n y.drisn \OMEGA\ d-tamazight}
1046
1047 %\noindent{\leaders\hrule height0.5pt\hfill}
1048 %\par
1049
1050 A dd nessken s wayes yif useqdec n \OMEGA\ i tira s tutlayt tamazight,
1051 ama s tifinagh, ama s isekkilen ila.taniyen. Newwi-dd tamazight am,
1052 tutlayt yeddren (yettwarun s tifinagh tiynayin)~: izmer umdan ad
1053 iseddu yall tighura n usuddes n tira, i waraten ussnanen, itekniken
1054 negh i wid n tsikkla, am wid ssexdamen i usemsaru n tfransist.
1055
1056 \OMEGA, d ameslay n usmihel i usuddes n tira. Am-wakken ne.zra, d ayen
1057 i dd yttakken i.zubba.z war taggara i useqdec d usihrew, maca issefk
1058 ad ilmed uqeddac kra tussniwin. Nunz-as, ta.z.zayt n ulmad-a, nezmer a
1059 tt nsifess s useqdec n inagrawen n urmas n tira, isegh.zanen n usmihcl
1060 n waraten, ittwassnen a.tas (wid ittnuzun, srayn ghef umdan, wid
1061 izemren ad ssxedmen tazmert tasemsirawt n kra inagrawen imehlanen am
1062 wid n \latinit{Macintosh, Windows, Unix}.
1063
1064 Tan.da tamzwarut n \OMEGA{} --- ghas tin ay ittalasen ism n \OMEGA{}
1065 ---, us tli ageruedm i uqeddac. Am gg imeslayen n usmihel akk, ad yaru
1066 wmdan ahil, deffir, a t issefsu akken a t yessughal s anqal n
1067 tmacint. Di \OMEGA{}, ahil d ara n u.dris (n.t.te.dn ghur-s kra n
1068 tsun.diwin i usbuni d tghessa tame.z.zult). Asefsu, d aselkem n wahil
1069 \OMEGA~; angal n tmacint ara dd iffghen, d win, i d aglam n usebter ay
1070 ittusuddsen, Iqqim-dd imir-n usemsaru.
1071
1072 Akala-ya, yezmer a t yaf yefregh win inumen iseqdac n i.drisen ghef
1073 \latinit{Macintosh, Windows}, d wiyi.d, i degg a.dris a dd iffegh di
1074 tsemsarut akken yella gg uqdil [Anagraw-a yettwassnen s yism-is
1075 imiwzil, s tglizit \latinit{<<~wysiwyg~>>}, ycsseghla.d kra~: a.dris
1076 ara dd yesuffegh uqeddac, ad yili ghas s tseddi umi yessawe.d ugdil~;
1077 asgmu.d ara dd tsuffegh tsemsarut, yesmer ad yili yuser kra.]
1078
1079 Iwakken ad yeqqim useqdec sray f umdan, yezmer ad yessexdem asegh.zan
1080 ittwassnen d allaeln i urmas. Taghessa tame.z.zult n wara (ighfawen,
1081 tifula, tiseddarin, tizmilin tinaddayin, timitar tinmudag, asmel n
1082 tektabin), a tt yessyghal si tbunit n usegh.zan-nni gher tsun.diwin n
1083 \OMEGA. Imir, \OMEGA, ad issefsu angal-nni a dd yessuffegh a.dris
1084 yuq.zen taghessa tame.z.zult tamezwarut, maca tira-ines ad ilint
1085 ulaghent ugar. \popocplist
1086
1087 \pushocplist\SindhiOCP
1088 \subsection{ktyn kr mU.ryA j.=d-hn}
1089
1090 %\noindent{\leaders\hrule height0.5pt\hfill}
1091 %\par
1092
1093 tn-hn kry AsAn khy pn-hnjy =z-hnn khy sjA=g rkh'nU pUndU ||eN pn-hnjy
1094 jdUj-hd meN .=dA-hp pydA kr'ny. AhU b/ m`lUm kr'nU pUndU t/ sndh meN
1095 hr 'A'yy wqt chA chA thy r-hyU 'Ahy ||eN dshmn AsAn jy ||eN AsAn jy
1096 jdUj-hd jy khlAf k-h.rA k-h.rA g-hA.t g-h.ry r-hyU 'Ahy.
1097
1098
1099 AsAn khy AhA b/ =khbr hj'n g-hrjy t/ AsAn jy 'As pAs ||eN ysgrdA'yy
1100 meN chA chA thy r-hyU 'Ahy. hndstAn meN chA thy r-hyU 'Ahy, AfghAnstAn
1101 meN chA thy r-hyU 'Ahy. `rAq ||eN AyrAn meN chA thy r-hyU 'A-hy ||eN
1102 'AmrykA ||eN sUUyt yUnyn chA chA sUcy r-hyA 'Ahn. j.=d-hn AsAn s=jy
1103 dnyA jy syAst ty ||eN s=jy dnyA jy jdUj-hd ty ||eN s=jy dnyA jy
1104 tndylyn ty n..zr rkhndAsUn ||eN An-hn tbdylyn jy A=srn khy pn-hnjy
1105 mlk, qUm ||eN `rAm ty pUndy .=dsndAsUn t/ An-hn tbdylyn mAn k-h.rA
1106 mnfy ||eN k-h.rA m=sbt A=sr 'Ahn. t.=d-hn 'yy AsAn pn-hnjy jdUj-hd khy
1107 b-htr b/ kry sg-hndAsUn t/ chU.tkAry UArU .hl b/ =gUly UyndAsUn.
1108
1109
1110 r=gU =gAl-hyUn kndy ||eN n`rn h'nndy AsAn jy qUm chAlyh sAl py.rA'yUn
1111 ||eN `=zAb bhU=gyA 'Ahn ||eN An-hn n`rn AsAn jy qUm lA||i Udhyk
1112 py.rA'yUn ||eN `=zAb nAzl kyA 'Ahn . jyk.=d-hn AsAn meN A=j qUm jy
1113 Amyd pydA thy 'Ahy t/ AhA AsAn jy `ml ||eN AsAn jy by lU=s jdUj-hd jy
1114 kry pydA thy 'Ahy ||eN mA'y-hU AsAn .=dAn-hn wAj-hA'yy rhyA 'Ahn. t/
1115 AsAn 'yy 'AhyUn jyky kj-h n/ kj-h kndAsUn. pr AsAn khy .=ds'nU 'Ahy t/
1116 dnyA jy Andr chA thy rhyU {}'Ahy ||eN AsAn jU dshmn ky'yn .hAltn khy
1117 pn-hnjn mfAdn meN ktb 'A'n'n jy kUshsh kry rhyU 'Ahy, An-hy||a jy
1118 lA||i .zrUry 'Ahy t/ AsAn pA'n meN .=dAhp pydA kryUn ||eN pA'n meN
1119 =jA'n jU hk Usy` =khzAnU pydA kryUn. ||eN AsAn mUjUd-h .sUrt .hAl khy
1120 smj-h'n lA||i rUzmrh jy my.dyA ||eN dnyA jy Andr thynd.r kArUA'yyn ty
1121 g-hry n..zr rkhUn t/ dshmn ||eN jAr.hyt psnd qUtUn ||eN AsAn ty qAb.z
1122 qUtUn dnyA jy Andr thynd.r tbdylyn khy sndn .hq meN ||eN sndn mfAdn jy
1123 .hq meN, sndh ty jAr.hyt qA'nm rkh'n jy .hq meN, sndh khy mstql qb.zy
1124 meN kr'n jy .hq meN ky'yn ktb 'A'ny r-hyUn 'Ahn.
1125
1126 \popocplist
1127 \end{document}