ArabTeX: A System for Typesetting Arabic - User Manual Version 3.00
ArabTeX Version 3.00 extends TeX and LaTeX to generate Arabic script from ASCII transliteration. The manual covers activation, input notation, language and font selection, transliteration, and limited support for other languages written in Arabic script.
Frequently Asked Questions
How do I activate ArabTeX?
With Plain TeX, load the macros using \input arabtex.tex. With LaTeX, include the option "arabtex" in the document header. Additional files are loaded automatically. Then select an Arabic writing style, for example with \setarab.
Which TeX systems and packages are compatible?
ArabTeX runs with Plain TeX and LaTeX. It is compatible with NFSS, NFSS2, and the EDMAC package; other additions to TeX had not been tried.
How do I enter short quotations and longer Arabic texts?
Enclose short Arabic quotations in < and >. They must normally fit on one output line unless explicitly broken. For longer texts, use \begin{arabtext} and \end{arabtext}, even with Plain TeX. Separate paragraphs with blank lines or \par.
What Arabic fonts and sizes are available?
The font is available only in Naskhi style. With Plain TeX, the default is 14 point, with a bold variant also provided; other sizes require changing \magnification or defining additional font identifiers. With LaTeX, the usual size-changing commands also affect the Arabic font.
Can I include mathematics in Arabic text?
Short mathematical insertions enclosed in single $ signs are supported and must fit on one output line. TeX display mode is not provided inside an Arabic environment; leave the environment temporarily to use it.
Is ArabTeX free to use?
The manual grants free use for scientific, experimental, and other strictly private, noncommercial purposes. Other uses require a license agreement. ArabTeX is copyrighted and supplied without warranty of any kind.
Manual text content
ArabT E X a System for T yp esetting Arabic User Man ual V ersion 3.00 1 2 Klaus Lagally No v em b er 22, 1993 1 Rep ort Nr. 1993/11, Univ ers it at Stuttgart, F akul t at Informatik, Breit wie senstra e 20{22, 70565 Stuttgart, German y 2 This Rep ort sup ersed es Rep ort Nr. 1992/06 Ov ervi ew ArabT E X is a pac k age extending the capabiliti es of T E X/L a T E X to generate the Arabic writing from an ASCI I transliteration for texts in sev eral languages using the Arabic script. It consists of a T E X m acro pac k age and an Arabic fon t in sev eral sizes, prese n tly only a v ail abl e in the Naskhi st yle. ArabT E X will run with Plain T E X and also with L a T E X. It is compati ble with NFSS, NFSS2 and the EDMA C pac k age; other additions to T E X ha v e not b een tried. ArabT E X is prima rily in tended for generating the Arabic writing, but the stan- dard scien ti c transliteration can also b e easily pro duced. F or langua ges other than Arabic that are customaril y written in the Arabic script som e lim ited supp ort is a v ai labl e. ArabT E X de nes its o wn input notation whic h is b oth m ac hine, and h um an, readable, and suited for electronic transmi ssion and Ema il comm unication. Ho w- ev er, texts in some of the Arabic standard enco dings can also b e pro cesse d. ArabT E X is cop yrigh ted, but free use for scien ti c, exp erimen tal and other strictly priv ate, noncomm ercial purp oses is gran ted. O prin ts of publications using ArabT E X are w elcome. Using ArabT E X otherwise requires a license agree- m en t. There is no w arran t y of an y kind, either expres sed or im plied. The en tire risk as to the quali t y and p erformance rests with the user. Pl ease send error rep orts, suggest io ns and inqu ir i es to the author: Prof. Klaus Lagally Institut f ur Informati k Univ ersit at Stuttgart Breit wiese nstr ae 20-22 70565 Stuttgart GERMANY lagally@i nform atik. uni-s tuttg art. de Cop yrigh t c 1992, 1993, Klaus Lagally Con ten ts 1 Activ ati ng ArabT E X 5 2 Inpu t to ArabT E X 6 2.1 Arabic text elemen ts : : : : : : : : : : : : : : : : : : : : : : : : : 6 2.2 Comm ands in an A r abic c ontext : : : : : : : : : : : : : : : : : : 7 3 Language selecti on 10 4 F on t selecti on 11 5 Inpu t co ding con v en t i ons 12 5.1 Standard Arabic and P ersian c haracte rs : : : : : : : : : : : : : : 12 5.2 Quoting : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 15 5.3 Ligatures : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 16 5.4 V o w elization : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 16 5.5 V erbatim input : : : : : : : : : : : : : : : : : : : : : : : : : : : : 17 5.6 Alternate input co dings : : : : : : : : : : : : : : : : : : : : : : : 17 6 T ransl it erati on 19 6.1 ZDMG transliteration st yle : : : : : : : : : : : : : : : : : : : : : 19 6.2 Encyclop edia of Islam st yle : : : : : : : : : : : : : : : : : : : : : 20 7 Sup p ort for other lang uages b esid es Arabi c 21 7.1 P ersian (F arsi, Dari), also Ottoma n, Kurdish : : : : : : : : : : : 21 1 CONTENTS 2 7.2 Urdu : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 22 7.3 P ash to (Afghanic) : : : : : : : : : : : : : : : : : : : : : : : : : : 22 7.4 Maghribi : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 23 7.5 Other languages : : : : : : : : : : : : : : : : : : : : : : : : : : : 24 8 Miscell ane ous featu res 25 8.1 Automati c stretc hing : : : : : : : : : : : : : : : : : : : : : : : : : 25 8.2 Dots on y a' : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 25 8.3 Additional co dings : : : : : : : : : : : : : : : : : : : : : : : : : : 25 8.4 Progress rep ort : : : : : : : : : : : : : : : : : : : : : : : : : : : : 26 8.5 V erbatim cop y of the input : : : : : : : : : : : : : : : : : : : : : 27 8.6 Using ArabT E X with EDMA C : : : : : : : : : : : : : : : : : : : : 27 9 Ac kno wled gmen t s 28 10 Refere nces 29 A Obtai ni n g ArabT E X 32 B Instal li n g ArabT E X 33 C Release histo ry 34 D Sampl e ArabT E X inp ut 36 E Sampl e ArabT E X outp ut 37 F Co ding exampl es for Arabic 38 G Co ding exampl es for P ersi an 45 H Alter nate inpu t enco di ngs 48 H.1 ASMO 449 = ISO 9036 : : : : : : : : : : : : : : : : : : : : : : : 48 H.2 ASMO 449E = ISO 8859 - 6 : : : : : : : : : : : : : : : : : : : : : 50 CONTENTS 3 I Miscell ane ous uti l i ti es 52 I.1 t w oblks.st y : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 52 I.2 ab jad.st y : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 53 I.3 MLS2ARAB : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 53 Index 54 List of T ables 5.1 Standard co dings for Arabic and P ersian. : : : : : : : : : : : : : 13 5.2 Additional co dings generally a v ail able. : : : : : : : : : : : : : : : 14 5.3 V erbatim co dings for the carrier of hamza : : : : : : : : : : : : : 17 7.1 Additional co dings for Urdu. : : : : : : : : : : : : : : : : : : : : 23 7.2 Additional co dings for P ash to. : : : : : : : : : : : : : : : : : : : 24 8.1 Additional co dings for sp ec ial purp oses . : : : : : : : : : : : : : : 26 H.1 ASMO 449 co de table : : : : : : : : : : : : : : : : : : : : : : : : 49 H.2 ISO 8859-6 co de table : : : : : : : : : : : : : : : : : : : : : : : : 51 4 Chapter 1 Activ ating ArabT E X With Plain T E X, load the ArabT E X ma cros b y \input arabt ex.te x. With L a T E X, include the option "arabt ex" in the do cumen t header. In b oth cases som e additio nal les will b e loaded autom aticall y . ArabT E X de nes sev eral user com m ands as indicated b elo w. There is also a large n um b er of (hidden) in ternal comm ands whic h could lead to storage (hash table 1 ) o v er o w in a small T E X impl em en tation. All in ternal comm ands con tain an \at" sign (@) in their nam es and th us should not in terfere with an y user de ned comm ands (but could p ossibly with other T E X extensions w e do not kno w ab out). With Plain T E X, the Arabic fon t b y default is only a v ail able at the norm al 14 p oin t size whic h ough t to co op erate w ell with the "cm" fon ts at 10 p oin ts. A b old v arian t is also pro vided. F or other sizes, the user has to c hange the \magn ifica tion or to de ne additional fon t iden ti ers himself. T o c hange the default, insp ect the le "arabtex.t ex" and rede ne the \pnash and/or \pnas hbf comm and accordingly . With L a T E X, the usual size c hanging comm ands will also op erate on the Arabic fon t. 1 A T E X hash table size of 3000 to 3500 is reco mm en ded 5 Chapter 2 Inpu t to ArabT E X After activ ating ArabT E X, select one of the Arabic writing st yles, e.g., \setarab (see Section 3). Y our m o di ed T E X/L a T E X system will rec ognize the follo wing item s: normal T E X/L a T E X text and com m ands, short A r abic quotations brac k ete d b y < and > . These m ust norma ll y t on to one line of output, except if explicitly brok en up b y \\ or \| com- mands (see b elo w). A quotation ma y also b e started with \< except inside a L a T E X {tabbing} en vironmen t. longer Arabic texts whic h are brac k eted b y \begin{ara btext } and \end{arab text} , (ev en when using Plain T E X!), called A r abic Envir on- ments in the sequel. An A r abic Envir onment consists of one or more para- graphs separate d b y blank lines or \par comm ands. A r abic quotations and A r abic envir onments are called A r abic c ontexts in the sequel. 2.1 Arabic text elemen ts Ev ery A r abic p ar agr aph and ev ery A r abic quotation is a sequence of the follo wing kinds of A r abic items, separated b y blank spaces or newlines: isolated punctuation m arks, in terprete d as the corres p onding Arabic punc- tuation m ark; 6 CHAPTER 2. INPUT TO ARABT E X 7 \n um b ers", i.e. c haracter sequenc es starting with a digit. A \n um b er" will b e pro ces se d using the normal writing sequenc e from left to righ t ev en if it con tains letters and/or sp ecial c haracters ; ho w ev er, if the nal c haracter is a punctuation m ark, it will b e split o and pro cess ed separately . \Arabic quotes" co ded as t w o left quotes or t w o righ t quotes eac h; they ma y also b e written directly adjacen t to a w ord. \w ords", i.e. c haracter sequence s starting with a letter or a sp ecial (non- digit) c haracter follo w ed b y a letter. A nal punctuation m ark will b e split o and pro cess ed separately . The (co ded) c haracters of a w ord will in the output b e arranged from righ t to left. a sequence of w ords, n um b ers, and sp ec ial c haracter s enclosed in curly braces { and } . This in tro duces a new lev el of T E X grouping; otherwise the constituen ts are pro ces se d norm al ly . This feature ma y b e nested. Output from all items will b e arranged from righ t to left, lines will b e brok en as nece ss ary . Inside an A r abic Envir onment, or in an A r abic quotation, y ou ma y also ha v e: ArabT E X comm ands with or without param eters. These will b e execute d im m ediately . Some, but not all, T E X/L a T E X com m ands (see b elo w). These will b e exe- cuted im m ediately . Short m athem atical insertions, brac k eted b y single $ signs. They m ust t on one output line and are pro ces sed as usual. T E X Displa y mode within an A r abic envir onment is not pro vided; if it is required, the user has to lea v e the A r abic envir onment temp oraril y . short non-A r abic (\Rom an") quotations, con taining text and p ossibly also T E X/L a T E X comm ands, brac k eted b y < and > . These m ust t on one output line and in tro duce a new lev el of grouping, so if they con tain an y T E X/L a T E X assignmen ts the e ects of these will b e lo cal b y default. This feature is not a v ail abl e within an A r abic quotation. The alternate notation \< is also not pro vided. 2.2 Commands in an A r abic c ontext A con trol sequenc e inside an A r abic c ontext m ust b e separated from the prece d- ing text item b y at least one blank space, newline, or another con trol sequenc e, and ma y b e of the follo wi ng kinds: CHAPTER 2. INPUT TO ARABT E X 8 ArabT E X option c hanging comm ands. These ma y also b e used outside an A r abic Context, and usually foll o w the T E X grouping rules. \\ for a line break; the last line will b e padded on the left with spaces . \| for a line break; the last line will b e alig ned. If it com es out v ery badly spaced, autom atic stretching m igh t help (see Section 8). \indent or \par (or a blank line) for a new paragraph, \noind ent for a new paragraph without inden tation; (not inside A r abic quotations ). \emphasiz e A r abic item will put a bar o v er the A r abic item. \emphasiz e {gr oup of A r abic items } will put a bar o v er the indicated group of A r abic items. \setnash, \setnashb f, \setnas tali q fon t select ion comm ands, see Section 4. size c hanging L a T E X comm ands lik e \large etc., only if L a T E X is used! the foll o wing comm ands: \footn ote (observ e that the syn tax for Plain T E X and L a T E X is di eren t!), \margin par (also with Plain T E X, analog ous to the L a T E X usage). the T E X/L a T E X comm ands \smallsk ip, \medskip, \bigski p, \input, \hfill, \ (for a space), \space with their usual m eaning. \nospace will place the adjacen t items in the output in con tact, without an y in terv ening space . \hspace {width } will in tro duce the indicated am oun t of spacing in the output. \mbox {text } puts the text in to a b o x that will not b e split across a line break. \spreadbo x {width }{text } spreads out the text to the indicated width. This ma y b e useful e.g., when t yp esetting p o etry . \spreadbo x {width }{text \hf ill } will inhibi t the spreading, \spreadbo x {width }{\hf ill text \hfill } will cen ter the text inside the b o x. \spreadbo x {width }{\hf ill } or \spreadb ox {width }{ } just in tro- duces the indicated amo un t of horizon tal space, as will \hspace {width }. If t w o b o xing comm a nds fol lo w eac h other without an y in terv ening blank space in the input, there will also b e no resulting space b et w een the b o xes in the output. CHAPTER 2. INPUT TO ARABT E X 9 \centerli ne {text } will start a new line whose con ten ts are cen te red (not inside A r abic quotations ) . \spreadli ne {text } will start a new line whose con ten ts are spread out o v er the whole width of the page (not inside A r abic quotations ). It is appro xim ately equiv alen t to \sprea dbox {\hsize }{text }. User de ned comm ands whose expansion pro duce s legal ArabT E X input ma y b e called b y \docomman d {c ommand and p ar ameters }. The comm and is expanded exactly once, 1 and the result is pro ces sed b y ArabT E X again. An y side e ec ts of the expansion will b e lo cal. P arameter assignm en ts inside an A r abic c ontext m a y b e p erformed b y \doassign {p ar ameter }{value }. The e ec t is norma ll y lo cal except if the form \doassign {\global p ar ameter }{value } is used. An y non-recognized comm a nd will generate an error m essage and will b e ec ho ed v erbatim in the output. Ev en though ArabT E X tries hard to get in to sync hronization again, additio nal spurious errors ma y o ccur. inside an A r abic Context no further L a T E X or ArabT E X en vironmen t m a y b e nested (with the p ossible future exce ption of list en vironm en ts; these are not y et im pl em en ted.) F or a list of all a v ail able comm ands, consult the Index to this rep ort. As a remi nder, a list of all comm ands that are v al id inside Arabic text will app ear in the log le. 1 This is no strong restric tion as the expan sion ma y con tai n \doc omm and calls agai n. Chapter 3 Language selection The pro ces sing of input text to b e written in the Arabic script is som ewhat langua ge dep enden t. Th us b efore the rst A r abic quotation or A r abic envir on- ment y ou ha v e to indicate the desired pro cessing m o de b y one of the comm ands \seta rab, \setfa rsi, \setur du, \setpas hto, \setmaghri bi, or \setverb (no sp ecial pro cessing; see ho w ev er Section 5.5). The pro ces sing mo de ma y b e c hanged at an y time, ev en inside an A r abic envir onment or an A r abic quotation. After selecting a language, the sym b ols < and > serv e to brac k et short insertions in the c hosen languag e. Whereas this is usually con v enien t, observ e that they can th us no mo re b e used for other purp oses , exce pt in m athem atical mo de where they retain their norm al meaning as relational op erators. T o temp orarily retur n them to their normal m o de of op eration, deselec t the languag e b y \setnon e. A r abic insertions m a y also b e started b y \<. 1 F or further details on supp orted languages, see Section 7. 1 Note for adv a nce d T E X user s: All langua ge selecti ng comm and s exce pt \setn one set the c ha ract er < activ e. If A r abic insertions are not needed , or are alw a ys starte d with \<, the user ma y reuse the comma nd < for othe r purp o ses, or deac tiv ate it b y \cat cod e `\<= 12 to retu rn it to its norma l mea nin g. 10 Chapter 4 F on t selection F or space econom y , only the Naskh fon t is a v ai labl e b y default. With L a T E X, additio nal fon ts can b e loaded b y the do cumen t st yle options "nashbf " (for b old-fa ce) and/or "nasta liq" (when a v ai la ble). Users of Plain T E X are consid- ered sp ec ialists and ha v e to de ne and load suitable fon ts at the required sizes themselv es. The foll o wi ng fon t selec tion comm ands are a v ai labl e: \setnash (default) selec ts the Naskh fon t. \setnashb f selects a b old-face v ersion of Naskh. \setnasta liq selects the Nasta`liq fon t. If a fon t is not a v a ila ble or has not b ee n loaded, the corres p onding comm and will select the default fon t. With L a T E X, the size c hanging comm a nds will also op erate on the additional fon ts. 11 Chapter 5 Inpu t co ding con v en tions The ASCI I input notation for Arabic text has b een modelled closely after the transliteration standards ISO/R 233 and DIN 31 635. As these standards do not guaran tee unique re-transliteration and are also not 7-bit ASCI I compa tible, som e m o di catio ns w ere nece ss ary . These foll o w the general rules: whenev e r the transliteration uses a single letter, co de that letter; whenev e r the transliteration uses a letter with a diacritical ma rk, put the punctuation c haracte r mo st closely rese m bli ng the diacritical ma rk b efor e the letter (and not b ehind it as in some other co ding prop osals, as otherwise the readabilit y of the input w ould su er). use capital letters for writing v arian ts 5.1 Standard Arabic and P ersian c haracters The standard co dings for Arabic and P ersian are giv en in T abl e 5.1 and T a- ble 5.2. F or long v o w els, use the capital letters <A> , <I>, <U> or <aa> , <iy> , <uw> . T o get the defectiv e writing of long v o w els, use <_a> , <_i>, <_u> . 'A lif maqs . ur a is <_A> or <Y>. The short v o w els fath . a , kasr a , d . amma are co ded <a> , <i> , <u> and need not normal ly b e written excep t in the follo wi ng cases: 12 CHAPTER 5. INPUT CODING CONVENTIO NS 13 a @ a 'alif b H . b b a' p H p p a' t H t t a' _t H t t a' ^g ` g g m .h h h . h . a' _h p h h a' d X d d al _d X d d al r P r r a' z R z z ay s s s n ^s s s n .s s . s . ad .d d . d . ad .t t . t . a' .z ¤ z . z . a' ` ¨ , `ayn .g ¨ _ g _ gayn f ò f f a' q ô q q af v ö v v a' k ¼ k k af g À g g af l È l l am m Ð m m m n à n n un h è h h a' w ð w w aw y ø y y a' _A ø a 'alif T è t t a' maqs . ur a marbut . a T able 5.1: Standard co dings for Arabic and P ers ian. { at the b eginning of a w ord where they generate 'alif , { adjacen t to hamza where they will in uence its carrier, { when the transliteration is required, { in the \fullv ocal ize m o de. T anw n is co ded <aN> , <iN> , or <uN>. A silen t 'alif , if required, is supplied automa ticall y; it m a y also b e explicitly written: <aNA> . Lik ewise, a silen t w aw ma y b e written <NU> as in <`amruNU> . hamza is denoted b y a single right quote <'> . After selecting a langua ge b y \setarab etc., the hamza carrier will b e determined from the con text according to the rules for writing Arabic w ords; if that is not w an ted, \quote" the hamza (see Sect ion 5.2 b elo w). In the \setver b mo de, the hamza carrier is dete rmined b y the follo wi ng letter; see Section 5.5. madda on 'alif is generated b y a righ t quote (hamza ) b efore <A> : <'A> . CHAPTER 5. INPUT CODING CONVENTIO NS 14 c h c h . a' with hamza ^c x c g m with three dots (b elo w) ,c h c h a' with three dots (ab o v e) ^z T z z ay with three dots (ab o v e) ~n ¸ ~ n k af with three dots (Ottoman) ~l È ~ l l am with a b o w accent (Kurdish) .r v _ r r a' with t w o b o ws (Kurdish) T able 5.2: Additional co dings generally a v ai la ble. It m a y also b e written <~A> ; lik ewise, <~I> and <~U> will pro duce madda on y a' and on w aw , as required in some older writing con v en tions. The co ding <`> for `ayn is a single left quote, b ew are of confusing it with hamza ! The \in vi sible consonan t" <|> m a y b e inserted in order to break un w an ted ligatures and to in uence the hamza writing. It will not sho w in the Arabic output or in the transliteration. A t the b eginning of a w ord it will suppress a foll o wing short v o w el; otherwise it acts lik e a consonan t. The seque nce <||> will insert a sm all space, as do es <"|> (see Section 5.2 b elo w). The adjacen t c haracters will not b e connec ted. Sadda is indicated b y doubling the appropriate letter co ding. The de nite article is separated from the foll o wi ng w ord b y a h yphen. It ma y b e written in the assimi la ted form (if it exists): <as-sala amu> , or alw a ys as <al-> ; in that case a subseque n t \sun letter" m ust b e doubled: <al-ssala amu> , to rec eiv e a sadda , and to prev en t a suk un on the l am . The transliteration in b oth cases is iden tical. Hyphens <-> are used for t ying w ords together, or for indicating a con- necting v o w el in Arabic, or an iz . afet connection in P ersian. They ma y b e used freely , and generally do not c hange the writing, but will sho w up in the transliteration. Additional ly , at the b eginning and the end of an CHAPTER 5. INPUT CODING CONVENTIO NS 15 otherwise isola ted w ord they enforce the use of the connecting form of the adjacen t letter (if it exists), lik e e.g. in the date <1400 h->. A double h yphen <--> b et w een t w o otherwise joining letters will break an y ligature and will insert a horizon tal strok e (tatw l , ka s da) without app ear- ing in the transliteration. It ma y b e used rep e atedly . See also Section 8: automa tic stre tc hing. F or sp ecial applications, it can also b e co ded <B> ; and <|B> will b eha v e lik e an ordinary consonan t and m a y carry v o w el indicators, tanw n , suk un , and, in the com binati on <|BB> : sadda . 5.2 Quoting In \novoca lize mode (see Section 5.4), a double quote <"> will modify the m eaning of the follo wing c haracter as foll o ws: if a short v o w el follo ws, the appropriate diacritical ma rk fath . a , kasr a , d . amma will b e put on the prece ding c haracter. { If <N> follo ws the short v o w el, the appropriate form of tanw n will b e generated instead. { A t the b eginning of a w ord, 'alif is assumed as the rst c haracter. if the follo wing c haracte r is a single righ t quote, a hamza m ark will b e put on the prec eding c haracte r ev en if in con ict with the hamza rules. A t the b eginning of a w ord, an isolated hamza will b e generated. if the foll o wi ng c haracter is the \in visible consonan t" <|> , the connection b et w ee n the adjacen t letters will b e brok en and a sm all space inserted. This can also b e denoted <||> instead of <"|> . A t the b eginning of a w ord, 'alif with was . la will b e generated. otherwise: a suk un will b e put on the preceding c haracter . The follo wing c haracter will b e pro ce sse d agai n. The double quote will not sho w up in the transliteration. In \voca lize m o de, (see Sect ion 5.4), quoting will turn a short v o w el o ; lik e- wise, in \fullvoc alize mo de, quoting will also turn a suk un o . Put di eren tly: quoting will toggl e the generation of short v o w el indicators and suk un on and o . CHAPTER 5. INPUT CODING CONVENTIO NS 16 5.3 Ligatures There is no w a y to explicitly enforce liga tures as a large n um b er of them are generated autom atical ly . The results will not alw a ys lo ok satisfactory , so w e recomm end insp ecting the output after the rst run. An y un w an ted ligature can b e suppre sse d b y in terp osing the in visibl e c haracte r <|> b et w een the t w o letters otherwise com bined in to a liga ture. After \ligsfal se, in the mi ddle of a w ord few er ligatures will b e pro duced; for some texts this lo oks b ette r. Y ou can return to the norma l strategy b y \ligstru e. 5.4 V o w elization There are three modes of rendering short v o w els: \fullvoca lize: { Ev ery short v o w el written will generate the corres p onding diacritical m ark fath . a , kasr a , d . amma , excep t if quoted. { If <N> foll o ws a short v o w el, the corres p onding form of tanw n is generated instead. { Defectiv e writing: The co ding <_a> will pro duce a Qur'an 'alif acce n t (also called dagger 'alif ) instead of an explicit 'alif c haracter whic h w ould b e co ded <A> or <aa> . Lik ewise, <_i> will pro duce a sma ll 'alif b elo w the preceding consonan t in place of <I> (<iy>), and <_u> will pro duce an in v erted d . amma in place of <U> (<uw>). { If a long v o w el foll o ws a consonan t, the corresp onding short v o w el is im pl ied. The long v o w el itself carries no diacritical ma rk. { If no v o w el is giv en after a consonan t, suk un will b e generated excep t if a double quote prece des the next consonan t. The l am of the de nite article receiv es no suk un if a double \sun letter" foll o ws. { 'alif at the b eginning of a w ord carries was . la instead of the v o w el indicator if the preceding w ord ended with a v o w el. \vocalize : As ab o v e, but suk un and was . la will not b e generated excep t if explicitly indicated b y \quoting" . \novocali ze: No diacritics will b e generated except if explicitly ask ed for b y \quoting". In all m o des, a double consonan t will generate sadda , and <'A> alw a ys generates madda on 'alif . CHAPTER 5. INPUT CODING CONVENTIO NS 17 After <aN> the silen t 'alif c haracter is generated if nece ss ary . The silen t 'alif m a y also b e explicitly indicated b y <aNA> , or co ded literally as <A> in \novoca lize m o de. If a silen t 'alif maqs . ur a is w an ted instead, write <aN_A> , <aNY> , <_A> or <Y>. The tanw n fath . a is normal ly put on the last consonan t of the w ord, ev en if a silen t 'alif follo ws. If it is instead supp osed to go on to the 'alif as in some m o dern Arabic con v en tions, or in P ersian, this b eha viour can b e ac hiev ed b y the option \newtanw in. The option \oldtanwi n will rest ore the classical b eha viour. A silen t 'alif after w aw is indicated b y <UA> or <WA> (with a capital <W>!). 5.5 V erbatim inp ut 'a @ hamza on 'alif 'i @ hamza b elo w 'alif 'w ð hamza on w aw 'y K hamza on a to oth 'h è hamza on h a' 'B hamza on the line '| Z isolated hamza 'A @ madda on 'alif T able 5.3: V erbatim co dings for the carrier of hamza After disabling language sp ec i c pro cess ing b y \setver b or \setnone, ArabT E X will not use an y con text inform a tion to determine the carrier of hamza . Instead the user has to supply this inform atio n himself b y the next c haracte r t yp ed after <'> . Generally this c haracte r will b e used as the carrier; for exam ples and some exceptions see T able 5.3. A short v o w el indicator ma y foll o w. T o ease automati c con v ersion, an initia l 'alif ma y also b e co ded <A> . 5.6 Alternate inpu t co dings The ArabT E X input notation has b een v ery carefully designed for exibilit y , readabili t y , and ease of use for lingui sts con ned to standard 7-bit ASCI I equip- m en t for pro cess ing and transmi tting data. Ho w ev er, it do es not mak e m uc h sense reco ding existing mac hine-readable text les co ded according to other standards. Th us, som e alternate reading mo dules ha v e b een written (as there CHAPTER 5. INPUT CODING CONVENTIO NS 18 are more than 10 di eren t co dings in curren t use, this is an op en-ende d activit y), and a general co de switc hing pro cedur e has b een pro vided. An alternate reading m o dule, e.g. asmo449. sty for the ASMO 449 co de, is installed b y adding its nam e (asmo449) as a L a T E X st yle option, or b y \inpu t asmo449. sty. Afterw ards, a c o de name (in this case asmo449) is de- ned. Input co ding is switc hed b y the comm and \setcod e {c o de name } that c hanges the co ding for A r abic text global ly , or b y the en vironm en t \begi n {setcode }{c o de name } \end {setcod e} whic h follo ws the norm al T E X grouping rules. Co ding ma y b e switc hed sev eral tim es in the same do cumen t, pro vided the appropriate reading modules are installed; \setcod e {arabte x} rev erts to the standard ArabT E X notation. Please observ e that only A r abic text is a ecte d b y \setcod e {c o de name }; text outside of A r abic c ontexts, and con trol sequen ce nam es, are still assumed to b e in 7-bit ASCI I. As existing text les presumably do not con tain an y con trol se- quences or non-Arabic text an yw a y , w e suggest using a smal l ASCI I T E X/L a T E X driv er le setting all relev an t options and con taining an y non-Arabic text, and calli ng the Arabic text les b y \input { le name } from within an A r abic en- vir onment . F or details on a v ail able additional reading m o dules, see App endix H. Chapter 6 T ranslitera tion 6.1 ZDMG transli terati on st yle In additio n to the arabic writing, the standard scien ti c transliteration m a y also b e obtained from a fully v o w elized input text. This m o de is activ ated b y \tran strue and ma y b e switc hed o again b y \tran sfals e. If only the translit- eration is w an ted, y ou can deactiv ate the arabic writing b y \arabf alse; it can b e reactiv ated b y \arab true. If b oth modes are activ e their output will b e in terlea v ed line b y line. The transliteration m o de assumes that the input text is in the Arabic or P ersian langua ge and has b een co ded according to the rules giv en ab o v e. F or w ords from other languages the transliteration mi gh t b e in error. F or Arabic text, the fol lo wi ng sp ecial cases are handled: after the de nite article, a double consonan t will b e assimil ated; an initial v o w el will b e replaced b y an ap ostrophe whenev er the preceding w ord ended with a v o w el (in this case a was . la app ears in the Arabic writing). If that is not w an ted, start with hamza . a silen t 'alif or 'alif maqs . ur a after <N> (tanw n ) and <U> is omi tted in the transliteration. The same happ ens after w aw if it is written as a cap- ital <W> . T o correc tly repro duce some historical writings, a silen t long v o w el after <_a> is om itted in the transliteration. F or exampl es, see the App endix. F or econom y of space, the transliteration module is not loaded b y default. If 19 CHAPTER 6. TRANSLITERA TION 20 y ou w an t to use it, add the st yle option "atrans" with L a T E X; and with Plain T E X, sa y \input atrans.sty after loading ArabT E X. 6.2 Encyclop edi a of Islam st yle F or sp ecial purp oses , the standard transliteration output ma y b e m o di ed b y including the L a T E X option "etrans ", or b y loadi ng the le "etran s.sty " when w orking with Plain T E X. After this m o di catio n, the transliteration will foll o w the st yle of the Encyclop edia of Islam. Chapter 7 Sup p ort for other languages b esides Arabic ArabT E X is primari ly in tended for t yp ese tting texts in classical and mo dern Arabic, but it also pro vides some supp ort for sev er al other languag es that are customari ly written in the Arabic alphab et. In order to switc h to the con v en tions for one of these langua ges, sa y \setfars i, \setu rdu, \setpa shto, \setmaghr ibi; \setve rb will switc h o an y langua ge sp eci c pro ces sing. \setara b can b e used to switc h bac k to the Arabic con v en- tions. After selecting the language, < and > serv e as delim i ters for quotations; \setn one will, lik e \setver b, deselec t an y language, and will also return < and > to their norm al T E X meaning. This part of ArabT E X relies hea vily on con tributions from the user comm uni t y; w e w an t to esp ec ially men tion Iv an Dershans ki who completely reimplem en ted the routines for pro cess ing P ersian. As w e extensiv ely mo di ed these con tribu- tions while in tegrating the system, w e are solely resp onsible for an y remaini ng, or newly in tro duced, errors . 7.1 P ersian (F arsi, Dari), also Ottoman, Kur- dish All c haracter s needed for writing F arsi are a v ail able b y default. The short v o w els <e> and <o> are ma pp ed to <i> and <u> , the long v o w els <E> and <O> to <I> and <U> without a v o w el indicator. <H> denotes nal silen t h a' . This h a' rece iv es no suk un ev en in fully v o w eli zed mode. 21 CHAPTER 7. SUPPOR T F OR OTHER LANGUA GES BESIDES ARABIC22 F or fath . a or kasr a foll o w ed b y a nal silen t h a' y ou can also write <,a> or <,e> in place of <aH> and <eH> . The iz . afet connect ion ma y alw a ys b e written <-i> or <-e> (with h yphen); then the corre ct sp elling will b e deter mined from the con text. Lik ewise the y a'-i-wah . dat can alw a ys b e written <-I> or <-E> . The prese n t tense form s of the copula are co ded <-am> , <-I> , <-ast> , <-Im> , <-Id> , <-and> . In the output they are written as separate w ords after a little space. The nal y a' carries no dots. F arsi uses the Nasta`liq fon t if a v ail able, otherwise Naskh. F or further details see App endix G. 7.2 Urdu F or Urdu, additional co dings are a v ail able, see T able 7.1. Som e of the giv en co dings also o ccur in P ash to but with a di eren t meaning, see Section 7.3. The short v o w els <e> and <o> are ma pp ed to <i> and <u> . <H> , <,a> and <,e> are used as in P ersian. Ev en in full y v o w elized mo de, an aspirated consonan t b efore <h> rece iv es no suk un since the t w o are tec hnically a single letter. Urdu uses the Nasta`liq fon t if a v ail abl e, otherwise Naskh. 7.3 P ash to (Afghanic) F or P ash to, additional co dings are a v ai labl e, see T able 7.2. Som e of the giv en co dings also o ccur in Urdu but with a di eren t m eaning, see Sec- tion 7.2. The short v o w el <e> is indicated b y a zwar akay , <o> b y an in v erted d . amma . Obser v e also the fol lo wi ng co dings: <w"'> hamza on w aw <h"'> hamza on h a' , if not generated b y iz . afet CHAPTER 7. SUPPOR T F OR OTHER LANGUA GES BESIDES ARABIC23 h ë h alw a ys denotes the \t w o-ey ed" h a' ,h è h the \w a vy" h a' letter ,t H t t a' with a smal l t . a' accen t ,d X d d al with a small t . a' accen t ,r P r r a' with a sma ll t . a' accen t .n à n . n un without a dot E ÿ e e, y a' b ar ' in the nal p osition ae ÿ ae the diph tong ae ao ñ ao the diph tong ao O ñ o the long v o w el o U ñ u the long v o w el u T able 7.1: Additional co dings for Urdu. The co dings <H>, <,a> and <,e> are used as in P ersian. The rules for iz . afet and y a'-i-wah . dat apply . F or writing some P ash to w ords in the Urdu st yle, write the comm and \seturdu and afterw ards switc h bac k to the P ash to con v en tions b y \setpasht o. 7.4 Maghribi Nearly lik e Arabic but using a di eren t writing con v en tion. f a' is written with one dot b elo w the letter, q af with one dot ab o v e the norma l letter form of f a' . The three dots of v a' are put b elo w the letter. CHAPTER 7. SUPPOR T F OR OTHER LANGUA GES BESIDES ARABIC24 ,t L t t a' with a small lo op ,d ^ d d al with a sma ll lo op ,r V r r a' with a smal l lo op .n â n . n un with a small lo op g ° g g af with a smal l lo op instead of a bar ,z n z r a' with one dot ab o v e and one b elo w ,s s s n with one dot ab o v e and one b elo w ae ù ae the diph tong ae Ee ü ey the diph tong ey ee ù ey the diph tong ey E ù . . e the long v o w el e O ñ f o the long v o w el o U ñ u the long v o w el u T abl e 7.2: Additional co dings for P ash to. 7.5 Other languages This is up to exp erimen tation b y the user. If \setarab or \setfarsi will not pro duce the desired result, try \setverb for v erbatim m o de. The v o w elizatio n and the transliteration cannot generally b e exp ect ed to b e correct, but m igh t w ork b y acciden t. In case som e c haracter v arian ts not y et pro vided are needed, feel free to ask the author for help. There is no sim ple w a y for the user to modify the script. Chapter 8 Miscellaneous features 8.1 Automatic stretc hi ng F or sp ecial purp ose s, e.g. for headlines and for Arabic paragraphs con taining long m athem atical or non-Arabic insertions, the connec tion b et w een adjacen t Arabic letters ma y b e m ade \elastic", if they form no ligature. Th us a ka s da is inserted whose length will b e adjusted autom atical ly to uniform ly ll the output line. This feature v ery easily leads to storage o v er o w during the pro cessing, and should only b e used whenev e r neces sary . It is switc hed on with \spread true and switc hed o again with \spreadf alse. Inside an A r abic Envir onment, it will also b e switc hed o automa ticall y at the end of ev ery paragraph. 8.2 Dots on y a' Whether y a' in the nal p osition carries dots or not is con trolled b y the c hosen langua ge con v en tion. Y ou can o v erride this, after selecting the language, b y \yahd ots and \yahnodots . 8.3 Additi onal co dings T o repro duc e exotic, erroneous or arc haic texts exactly as they are written, some additio nal co dings are a v ai labl e, see T able 8.1. 25 CHAPTER 8. MISCELLANEOUS FEA TURES 26 .k ¸ k k af in the nal p osition without a ma rk ^d X . d d al with a dot b elo w .f ¬ f . f a' without a dot .b H b . b a' without a dot .n à n . n un without a dot (not a v ai la ble in P ash to m o de) Y ø a 'alif maqs . ur a ; y a' without dots in all p ositions T able 8.1: Additional co dings for sp ecial purp oses. If further v arian ts are neede d, write to the author and indicate: the required shap e, the assumed transliteration, a suggestion for the input co ding, some inform atio n on the in tended use. W e are will ing to consider an y suggestion. Adding a new c haracte r mig h t b e easy , or else it mig h t b e im p ossible. ArabT E X is exible, but there are some tec hnical lim itati ons. 8.4 Progress rep ort As ArabT E X is slo w, it will pro duce some terminal output while running to in- dicate it is still ali v e. If that is not w an ted, e.g., on a v ery fast system, or while running a batc h job, sa y \quiet or \traci ngara b = 0 (outside an A r abic Envi- r onment; otherwise sa y \doassign {\tracing arab }{0}). \tracing arab = 1 will only rep ort Arabic paragraphs, a v al ue of 2: Arabic lines and insertions, a v al ue of 3 or more: individua l A r abic items. CHAPTER 8. MISCELLANEOUS FEA TURES 27 8.5 V erbatim cop y of the in put F or test purp oses, the Arabic input ma y b e repro duc ed v erbatim after \show true in additio n to the norma l output; \showfa lse switc hes this fea- ture o again. Comm ands will not usually b e sho wn. The output will generally not lo ok pleasan t, and this feature is only pro vided in order to trace do wn errors, or to demonstrate the op eration of ArabT E X as in the app endix. 8.6 Using ArabT E X with EDMA C ArabT E X will co op erate with EDMA C, a Plain T E X m acro pac k age for criti- cal editions, written b y John La v agni no and Dom i nik W ujast yk. If EDMA C is already prese n t when ArabT E X is loaded, the EDMA C comm ands will, after suitable mo di cations, b e a v ail able inside an A r abic envir onment. Their argu- m en ts are considere d Rom an text but m a y con tain A r abic quotations. F or further details, see the EDMA C do cumen tation. Chapter 9 Ac kno wledgm en ts The dev elopm en t of ArabT E X w ould not ha v e b een p ossible without the as- sistance of ma n y p eople, and it is im p ossible to ac kno wledge ev ery indivi dual con tribution. Bes ides our lo cal team, i.e. Udo Merk el and Herib ert Sc hlebb e, helpful advice cam e, amo ng others, from Chahriar Assad, Benno v an Dalen, Iv an Derzhans ki, W olf dietric h Fisc her, Ahmed El-Hadi, Y annis Haralam b ous, Ab delsalam Hedda y a, Nic holas Heer, Iqbal Khan, T om Ko orn winder, Eb er hard Kr uger, Asif Lak ehsar, Jan Lo dder, Ric hard Lorc h, Pierre MacKa y , Eb er hard Mattes, F ath y Neamat-All ah, Bernd Raic hle, Ulric h Rebsto c k, Moham ed Saba, W a heed Sam y , Annemarie Sc himm el, Narima n Shehab, Dom i nik W uja st yk, and Mic hio Y ano. W e also ha v e to thank all users who sen t error rep orts , comm en ts, and suggestions. 28 Chapter 10 Referenc es B. Ala vi, M. Lorenz: Lehrbuc h der p ersisc he n Sprac he. 5. Au age 1988. VEB V erlag Enzyklop adie, Leipzig. A. A. Am bros: Einf uhrung in die m o derne arabisc he Sc hriftsprac he. 1. Au age 1969. Max Hueb er V erlag, M unc hen. ASMO 449: 7-bit co ded Arabic c haracte r set for inform ati on in terc hange. Arabic Standards and Measuremen ts Organization, 1982. J. D. Beck er: Arabic W ord Pro ce ssing. Com m . A CM 30/7, 600-610 (1987). T. Borg: Arabisc h f ur Ausl ander. Ein Lehrbuch f ur mo dernes Ho c harabisc h. 2. Au age 1979. V erlag Borg Gm bH, Ham burg. J. A. Bo yle: Gram m ar of Mo dern P ersian. Wiesbaden: Otto Harrasso witz, 1966. B. Comri e (ed.): The W orl d's Ma jor Languages. Cro om Helm, London 1987. DIN 31 635: Umsc hrift des Arabisc hen Alphab ets. Deutsc hes Institut f ur Norm ung e.V., 1982. J. La v agnino and D. W uja st yk: An Ov erview of EDMA C: A plain T E X format for critical editions. TUGb oat 11/4, 623-643 (1990). L. P . Elw ell-Sutton: Elem en tary P ersian Gram m ar. Cam bridg e Univ ersit y Pres s, 1963. 29 CHAPTER 10. REFERENCES 30 C. F aulm ann: Das Buc h der Sc hrift, en thaltend die Sc hriften und Alphab ete all er Zeiten und aller V olk er des gesam m ten (sic!) Erdkre ises. K. K. Hof- und Staatsdruc k ere i, Wien 1878. W.D . Fisc her: Gram m ati k des Klassisc hen Arabisc h. 2. Au age 1987. V erlag Otto Harrasso witz, Wiesbaden. A. Grohm ann: Arabisc he P al aographie (T eil I und I I). Osterre ic hisc he Ak adem ie der Wissensc haften, Philosophi sc h-historisc he Klasse, Denksc hriften 94, 1. Wien 1967. E. Harder, A. Sc him m el: Arabisc he Sprac hlehre. 15. Au age 1983. Julius Gro os V erlag, Heidelb erg. ú G . QªË @ ¡uÌ' @ Y« @ ñ ¯ , A ¢ uÌ' @ Y Ô m× Õæ Aë . H a sim Muh . am m ad al-H at . t . at . : Qa w a`id al-H at . t . i al-`Arab . Maktaba an-Nahd . a, Baghdad; D ar al-Qalam , Beirut, 1400/19 80. ISO/R 233 - 1961: In ternational System for the T ransliteration of Arabic Char- acters. In ternational Standards Institution, 1961. ISO 8859 - 6: Inform ation pro ces sing | 8-bit single-b yte co ded graphic c haracter sets | P art 6: Latin/Arabic alphab et. In ternational Organization for Standardization, 1987. ISO 9036: Informa tion pro ces sing | Arabic 7-bit co ded c haracter set for infor- m atio n in terc hange. In ternational Organization for Standardization, 1987. D. E. Kn uth: The MET AF ONTb o ok. Addison W esley Publishing Com p., Reading, Mass., 1986. D. E. Kn uth: The T E Xb o ok. Sixth prin ting. Addison W esley Publishing Comp. , Reading, Mass., 1986. D. E. Kn uth and P . MacKa y: Mixing righ t-to-left texts with left-to-rig h t texts. TUGb oat 8/1, 14-25 (1987). Ann K. S. Lam bton: P ersian Gram m ar. Cam bridg e Univ ersit y Pres s, 1953. L. Lam p ort: L a T E X, A Do cum en t Preparation System. Addison W esley Publishing Com p., Reading, Mass., 1986. M. Lorenz: Lehrbuch des P ash to (Afghanisc h). 2. Au age 1982. VEB V erlag Enzyklop adie, Leipzig. P . A. MacKa y: T yp esetting Problem Scripts. BYTE 11/2, 201-21 6 (1986). CHAPTER 10. REFERENCES 31 H. Ritter: Ub er einige Regeln, die b eim Druc k en mi t arabisc hen T yp en zu b eac h ten sind. ZDMG 100/2, 577-5 80 (1951). F riedric h R uc k ert: Gramm atik , P o etik und Rhetorik der P erser . Wiesbaden: Otto Harrasso witz, 1966. C. Salem ann, V. Sh uk o vski: P ers isc he Gram m ati k. 4. Au age 1947. V erlag Otto Harrasso witz, Leipzig. A. Sc himm el: Islam i c Call igraph y . E.J.Brill , Leiden, Netherlands 1970. H.J. V ermeer, W. Akh tar, A. Akh tar: Urdu-Lautlehre und Urdu-Sc hrift. 3. Au age 1985. Julius Gro os V erlag, Heidelb erg. App endix A Obtaining ArabT E X The ArabT E X system is a v ai la ble from the author's institution (b y anon ym ous FTP from ftp.info rmati k.un i-stu ttgar t.de (129.69.21 1.2) , in the direc- tory pub/arab tex ) and from m an y other comm on serv er s, e.g. the CT AN net- w ork (Aston, Niord, Stuttgart). The les ma y b e transferred individual ly or as a pac k age: arabtex.zi p for PC systems, arabte x.tar .Z for U*IX systems; w e recomm end to get and insp ect the README le rst. Succes sfull op eration on the Apple Macin tosh in conjunction with OzT E X has also b ee n rep orte d. A t the tim e of this writing, v ersion 3.00 is curren t. The Nasta`liq fon t is still under dev elopmen t; Naskh will b e substitute d automa ticall y . V ersion 2 is do wn- w ard compati ble; the old v ersion 1 is obsolete and should no m ore b e used. ArabT E X is cop yrigh ted, but free use for scien ti c, exp erimen tal and other strictly priv ate, noncomm ercial purp oses is gran ted. O prin ts of an y publica- tions using ArabT E X are w elcome. Using ArabT E X otherwise requires a license agreemen t. 32 App endix B Installing ArabT E X The installa tion pro cedure is strongly system dep end en t, and w e recomm end securing the assistance of a lo cal T E Xp ert . Y ou ha v e to install the "nash14" fon t with its "*.pk" and "*.tfm" les on the fon t searc h path of y our T E X system, and the "*.sty" les and "arabte x.tex " on the source searc h path (usually TEXINPUT) of y our system. P ossibly y ou will also ha v e to rename the "*.pk" les according to lo cal con v en tions, and as a last resort y ou can try to recre ate the fon ts from the "*.mf" MET AF ONT source s. Additional fon ts, whenev er a v ai labl e, are installed analo gously . ArabT E X has b een found to co op erate w ell with T E X v ersions 3.xxx, L a T E X v ersions 2.09 of 1991 or later, NFSS and NFSS2 (not required), and preview ers that can handle fon ts of m ore than 128 c haracters . T E X-X E T or T E X--X E T are not required, and their additiona l features are prese n tly not exploited. The T E X \hash size" should b e at least 3000 to 3500, esp e cially when using ArabT E X in conjunction with L a T E X, and if the transliteration module is used. Use of a BIG T E X ma y b e necess ary when using the NFSS2 due to the latter's high demand on string storage. Space and tim e requiremen ts are not negligibl e, and ha v e increased during dev elopm en t; ho w ev er, ArabT E X curren tly still runs, alb eit slo wly , ev en on a PC XT standard con guration. 33 App endix C Release history There w as a V ersion 1 whic h is no m ore supp orted. V ersion 2 w as not fully compati ble with V ersion 1; ho w ev er, mo ving to the new v ersion usually cause d little problems. Apart from som e extens ions, m ost c hanges w ere in tro duced in order to b etter conform to the transliteration stan- dards, and to ha v e less compatibi li t y problems with T E X and L a T E X. F urther v ersions are exp ect ed to b e up w ard compati ble if no serious problems will turn up. The m ain di erence s b et w een v ersions 1 and 2 are: The fon t size has increased, so the do cumen t la y out m a y c hange. The old fon t "nash10" can no more b e used as the c haracter lo cations ha v e b ee n assigned di erently . Some Arabic c haracters are no w co ded di eren tly: `ayn is denoted b y a left quote, and <c> , <^z> , <^t> , and <.n> ha v e b een assigned new meani ngs in order to b etter conform to the standard transliteration. There are man y m ore ligatures than b efore. This normal ly need not con- cern the user. \vocalize will no m ore generate suk un and was . la except if explicitly indicated b y quoting. See \fullvoca lize. Arabic En vironm en ts are no w alw a ys brac k ete d b y the new con trol se- quence s \begin{ar abtex t} and \end{a rabt ext} ev en if only the translit- eration is w an ted. W e strongly recomm end con v erting an y still existing v ersion 1 input les to the new notation. T o assist in this m igrati ng pro cedure, the L a T E X option 34 APPENDIX C. RELEASE HISTOR Y 35 "olda rabte x" and/or the comm and \oldar abtex will switc h to a mo de where virtuall y all places where the old con v en tions are used, will either pro duce a T E X error message or will b e agged in the output. The c hanges in tro duced since the release of V ersion 2.00 up to no w (V ersion 3.00 ) fal l in to one of t w o categories: error corrections, and up w ard com pati- ble extens ions. Details are not giv en here, but are do cumen ted in the text le CHANGES that is part of the distribution pac k age of ArabT E X. V ersion 3 is up w ards compatibl e with v ersion 2. All supp orte d features are do cumen ted in this m an ual . App endix D Sam ple ArabT E X input \do cum en tst yl e[1 2pt ,a rab te x]{ art ic le} \be gin {d ocu me nt} \se tar ab % choos e the lang uag e conve nti ons \vo cal iz e % diacr it ics for short vowe ls on \tr ans tr ue % addit io nal ly switc h on the tran sl ite ra tio n \ar abt ru e % print arab ic text ... is on anywa y \sp rea dt rue % sprea d out capt ion \ce nte rl ine {<^g u.h A wa-.h imA ruh u> } \be gin {a rab te xt} 'at _A .sadI qu N 'il_ A ^gu.h A ya.t lu bu minhu .him Ara hu li-ya rk aba hu fI safra TiN qa.s Ira Ti N wa- qAl a lah u: saw fa 'u`Id uh u 'ila yk a fI al-mas A' i, wa-'a dfa `u laka 'u^gr aT aN. \\ fa- qAl a ^gu.h A: 'an A 'As ifu N ^gidda N 'annI lA 'ast a.t I` u 'an 'u.ha qq iqa lak a ra. gba ta ka, fa-a l.h im Aru lays a hun A al-y aw ma. \\ wa- qab la 'an yutimm u ^gu.h A kalA ma hu bad a'a al-. hi mAr u yan haq u fI i.s.t abl ih i. \\ fa- qAl a lahu .sadIq uh u: 'in nI 'asma `u .himA ra ka yA ^gu.h A yanha qu. \\ fa- qAl a lahu ^gu.hA : .ga rIb uN 'amr uka yA .sad Iq I! 'a- tu. sa ddi qu al-.h im Ara wa-t uka _d _di bu nI? \en d{a ra bte xt } \en d{d oc ume nt } 36 App endix E Sam ple ArabT E X output è P AÒ k ð A mc guh . a wa-h . im aruhu - at a s . ad qun - il a guh . a yat . lubu minhu h . im arahu li-yarkabahu f safratin qas . ratin wa-q ala lahu: : é Ë È A ¯ ð è Q ¯ è Q ® ú ¯ é J . » Q Ë è P A Ô g é J Ó I . Ê ¢ Am c ú Í @ õ K Y ú G @ sawfa - u , duhu - ilayka f 'l-mas a - i , wa- - adfa , u laka - u gratan. . è Q c @ ½ Ë ©¯ X @ ð , Z A ÜÏ @ ú¯ ½JË @ è Y J « @ ò ñ fa-q ala guh . a: : Am c È A ®¯ - an a - asifun giddan - ann l a - astat . , u - an - uh . aqqiqa laka ra _ gbataka, fa-'lh . im aru laysa hun a 'l-yawma. . Ð ñJ Ë @ AJë Ë P AÔmÌ' A¯ , ½ J J . « P ½ Ë õ ® k @ à @ © J ¢ J @ B B ú G @ @ Yg . ó @ AK @ wa-qabla - an yutimmu guh . a kal amahu bada - a 'l-h . im aru yanhaqu f 's . t . ablihi. . é Ê J . ¢ @ ú ¯ õ î D K P AÔm Ì ' @ @ Y K . é Ó C C ¿ Am c Õ æK à @ É J . ¯ ð fa-q ala lahu s . ad quhu: : é ® K Y é Ë È A ®¯ - inn - asma , u h . im araka y a guh . a yanhaqu . . õ î D K Am c AK ¼ P AÔg © Ü Þ @ ú G @ fa-q ala lahu guh . a: : Am c é Ë È A ®¯ _ gar bun - amruka y a s . ad q ! - a-tus . addiqu 'l-h . im ara wa-tukad d ibun ? ? ú æ K . Yº K ð P AÔm Ì ' @ ô Y @ ! ù ® K Y A K ¼ Q Ó @ I . K Q« 37 App endix F Co ding examples for Arabic 1 The short v o w els fath . a , kasr a , d . amma are denoted, as in the translitera- tion, b y the small letters a, i, u: mana`a © J Ó mana , a, _dahab a I . ë X d ahaba, ^sariba H . Q å sariba, qabila É J . ¯ qabila, `a.zuma Ñ ¦ « , az . uma, `alu É « , alu, bal É K . bal, ni`ma Õ ª K ni , ma, yaktub I . J º K yaktub. The long v o w els a, , u are denoted b y capitals A, I, U or b y aa, iy, uw: qAtala É K A ¯ q atala, nUzi`a ¨ R ñK n uzi , a, lUmI ú × ñ Ë l um , sIrI ø Q s r ; lawmI ú × ñ Ë lawm , sayrI ø Q sayr . A lif maqs . ur a is co ded as _A or Y. ramY ú × P ram a, _dikrY ø Q ¿ X d ikr a, `al_A úÎ « , al a, bal_A úÎ K . bal a. Si le n t 'alif : The plural suxes - u, -aw of the v erb are denoted UA, aW or aWA: katabUA @ ñJ . J » katab u, yaktubUA @ ñ J . J º K yaktub u, ramaWA @ ñ Ó P ramaw, yalqaW @ ñ ® Ê K yalqaw. 1 Most of the examp les are tak en from: W olfdietric h Fisc her, Gram m atik des Klassisc hen Arabisc h, 2. Au age , V erlag Otto Harrasso witz, Wiesbade n 1987 . 38 APPENDIX F. CODING EXAMPLES F OR ARABIC 39 The defecti v e notat io n of a, , u can b e indicated b y _a, _i, _u and leads to the appropriate sp elling: dAru-h_u f è P @ X d aru-h u, ri^gl i-h_i é Ê g . P ri gli-h , ho w ev er: ramA-hu è A Ó P ram a-hu, yarmI -hi é J Ó Q K yarm -hi; _dih_i è X d ih , h_a_dih _i è Y ë h ad ih , tih_i é K tih , hAtih_i é K A ë h atih , rabb_i H . P rabb , .sAl_i È A s . al ; hum_u f Õ ë hum u; qiy_amaTu N é Ü Þ ¯ qiy amatun, 'il_ahu N é Ë @ - il ahun, sam_awATu N è @ ñ ÜÞ sam aw atun, _tal_a_t uN I Ê K t al at un, l_akin á º Ë l akin, h_a_dA @ Y ë h ad a, 'al-ll_ahu é < Ë @ - al-l ahu, 'al-rra.h m_anu á Ô g Q Ë @ - ar- rah . m anu, _d_alika ½ Ë X d alika. T o repro duc e the historical writing correc tly , a silen t long v o w el or 'alif maqs . ur a after _a rece iv es no suk un and is ignored in the transliteration: .sal_aUTu N è ñ Ê s . al atun, .hay_aU TuN è ñ J k h . ay atun, zak_aUTuN è ñ » R zak atun, mi^sk_a UTuN è ñ º Ó mi sk atun, ar-rib_aU ñ K . QË @ ar-rib a, tawr_aITuN é K P ñ K tawr atun, ram_aYhu é J Ó P ram ahu, sIm_aYhum Ñ î D Ü Þ s m ahum. The short v o w el u can b e written as a long v o w el b y _U: '_UlY ú Í ð @ - ul a, '_UlA 'i Z B B ð @ - ul a - i , '_UlU ñ Ë ð @ - ul u, '_UlAka ¼ B B ð @ - ul aka, '_UlA' ika ½ K B B ð @ - ul a - i ka. T anw n : The plural suxes -un, -in, -an are written -uN, -iN, -aN or aNA. Silen t 'alif in -an ma y b e indicated b y A or omi tted; if neces sary it is supplied from the con text. ra^guluN É g . P ra gulun, ra^guliN É g . P ra gulin, ra^gulaN C C g . P ra gulan, madInaTaN é J K Y Ó mad natan, ^gamIlaTa N é Ê J Ô g . gam latan, 'i_daN @ X @ - id an, samA'aN Z AÜ Þ sam a - an. There is a sp ecial case: ribaNU ñ K . P riban; `amruNU ð Q Ô « , amrun, `amriNU ð Q Ô « , amri n, ho w ev er: `amraN @ Q Ô« , amran. APPENDIX F. CODING EXAMPLES F OR ARABIC 40 T anw n fath . a is traditional ly put on the last consonan t ev en if a silen t 'alif follo ws. Some m o dern con v en tions, and also P ersian practice, require to put it on the 'alif in this case. This b eha viour ma y b e switc hed on b y \newtanwi n, and o b y \oldtanwi n. \newtanwi n mode is the default for P ersian. ra^gulaN C C g . P ra gulan, 'i_daN @ X @ - id an. A sil en t 'alif maqs . ur a after tanw n is written aNY or aN_A: hudaNY ø Y ë hudan, fataN_A ú æ¯ fatan; compare: al-hudY ø Y ì Û @ al-hud a, 'al-fa t_A ú æ® Ë @ - al-fat a. T a' marbut . a is denoted b y T: kalimaTuN é Ò Ê ¿ kalimatun, kalimaTi N é Ò Ê ¿ kalimatin, kalimaTaN é Ò Ê ¿ kalimatan; fatATuN è A J¯ fat atun, fatATiN è A J¯ fat atin, fatATaN è A J¯ fat atan. Hamza is indicated b y '; the appropriate carrier is deter mined b y the con text: 'amruN Q Ó @ - amrun, 'ibiluN É K . @ - ibil un, 'u_htuN I s @ - uh tun; ra'suN @ P ra - sun, 'ar'a su @ P @ - ar - asu, sa'ala È A sa - ala, qara'a @ Q ¯ qara - a; bu'suN ñ K . bu - sun, 'ab'usuN ñ K . @ - ab - usun, ra'ufa ò ð P ra - ufa, ru'asA 'u Z A ð P ru - as a - u; bi'ru N Q K . bi - run, 'as'ilaTu N é Ê J @ - as - i latun, ka'iba I . J» ka - iba, qA'imu N Õ ç ' A ¯ q a - imun, ri'AsaTuN é AK P ri - asatun, su'ila É J su - ila; samA'uN Z A Ü Þ sam a - un, barI'uN Z ø Q K . bar - un, sU'uN Z ñ s u - un, bad'uN Z Y K . bad - un, ^say'uN Z ú æ say - un, ^say'i N Z ú æ say - in, ^say'aN A J say - an; sA'ala È Z A s a - ala, mas'alaT uN é Ë A Ó mas - alatun, saw'aTuN è @ ñ saw - atun, _ha.tI' aTuN é JJ ¢ s h at . - atun. APPENDIX F. CODING EXAMPLES F OR ARABIC 41 Old Hamza con v en ti on : In an older writing st yle that is used, e.g., in some Qur'an editions, the hamza is sometim es put b elo w its carrier or on the connec ting line. This st yle ma y b e switc hed on b y \oldha mza (and o again b y \newha mza): 'as'ilaTu N é Ê J @ - as - i latun, ka'iba I . J» ka - iba, qA'imu N Õ ç' A ¯ q a - imun, su'ila É J su - ila, ^say'aN A J say - an, _ha.tI'aT uN é J ¢ s h at . - atun. Mad da in the con text ' a is generated automa ticall y: 'AkiluN É ¿ @ - akilun, qur'A nuN à @ Q ¯ qur - anun, ra'Ahu è @ P ra - ahu. T o repro duc e the historic writing correc tly , it can also b e explicitly written in other con texts: 'a.sdiq~A 'uh_u f è ð A ¯ Y @ - as . diq a - uh u; ya^g~I'u Z ú e ' ya g - u, s~U'ila É K ñ s u - ila. Sadd a : A double consonan t m ust b e written t wice, ev en if it is co ded b y m ore than one c haracter : nazzala È S K nazzala, ba^s^sAr uN P A . ba s s arun, nawwara P ñ K nawwara, sayyiduN Y J sayyidun, sa''AluN È @ A sa - - alun, .sabiyyuN ú æ . s . abiyyun, `aduww uN ð Y « , aduwwun. Instead of iyy, uww one can also write Iy, Uw: .sabIyuN ú æ . s . ab yun, `adUwu N ð Y « , ad uwun. Assim il ati on : the de nite article m a y b e alw a ys written al-; a foll o wi ng \sun letter" m ust b e written t wice lik e in the Arabic sp elling. The translitera- tion and the use of suk un are adjusted accordingly: 'al-ddAru P @ YË @ - ad-d aru, 'al-rra^gu lu É g . Q Ë @ - ar-r a gulu, 'al-ssana Tu é J Ë @ - as-sanatu, 'al-nnAru P A J Ë @ - an-n aru; 'al-^gAru P Ae Ì ' @ - al- g aru, 'al-bA bu H . A J . Ë @ - al-b abu; 'al-llayl aTu é Ê J Ê Ë @ - al-l aylatu, 'al-lli sAnu à A Ê Ë @ - al-lis anu, 'al-ll_ah u é < Ë @ - al-l ahu. APPENDIX F. CODING EXAMPLES F OR ARABIC 42 The article ma y also b e written in the assimi la ted form, with iden tical result: 'ad-dAru P @ YË @ - ad-d aru, 'ar-ra ^gulu É g . Q Ë @ - ar-r a gulu, 'as-sanaT u é J Ë @ - as-sanatu, 'an-nA ru P A JË @ - an-n aru. In some sp ec ial cases the literal sp elling m ust b e used: 'alla_dI ø Y Ë @ - allad , 'alla_dIna á K Y Ë @ - allad na, 'allatI ú æ Ë @ - allat ; ho w ev er: 'al-lla_d Ani à @ Y Ê Ë @ - al-lad ani, 'al-lla tAni à A J Ê Ë @ - al-lat ani, 'al-llawA tI ú G @ ñ Ê Ë @ - al-l aw at . Was . la : an auxiliary v o w el at the b eginning of a w ord is alw a ys written, but in the m iddl e of a sen te nce generally without hamza . If a v o w el precede s the w ord, the auxil iary v o w el will b e om i tted in the transliteration, and the was . la sign will b e used in the sp elling: wa-ismuhu é ÜÞ @ ð wa-'smuhu, f--a-in .sara fa ò Q å A ¯ fa-'ns . arafa. 2 This also w orks across w ord b oundaries: yA ibnI ú æ K . @ AK y a 'bn , h_a_dA ibnuh_ u f é J K . @ @ Y ë h ad a 'bnuh u, qAla u_hru^g ` Q s @ È A ¯ q ala 'h ru g. An auxilia ry v o w el at the end of the prec eding w ord ma y b e separated b y a h yphen: qad-i in.saraf a ò Q å @ Y ¯ qad-i 'ns . arafa, ra'aW-u al-bAb a H . AJ . Ë @ @ ð @ P ra - aw-u 'l-b aba, min-i ibnih_i é J K . @ á Ó min-i 'bnih . This also w orks for the article prece ding 'alif al-was . l : 'al-i-ism u Õ æ B B @ - al-i-' smu, 'al-i-i^ stir A'u Z @ Q B B @ - al-i-' stir a - u, and ev en if the auxili ary v o w el is om itted in the sp elling: ra^guluN- i ibnatuh_ u ^gamIlaT uN é Ê J Ô g . f é J K . @ É g . P ra gulun-i 'bnatuh u gam latun, mu.hammad uN-i al-qura^sI yu ú æ Q ® Ë @ Y Ô m× muh . ammadun -i 'l-qura s yu. 2 In v o w elize d writing, it ma y sometim es b e adv isab le to in tro d uce a ka s da to prev en t the v o w el mar ks from bump ing in to eac h other . APPENDIX F. CODING EXAMPLES F OR ARABIC 43 The parti cles li- and la- m ust b e com bi ned with the article exce pt b efore l am : lil-rra^g uli É g . Q ÊË lir-r a guli, lal-ma |^gdu Y b& Ò Ê Ë lal-ma gdu; 3 ho w ev er: li-llayla Ti é Ê J ÊË li-ll aylati, li-ll_ahi é < Ë li-ll ahi. The Name of Go d is written with a sp ecial liga ture if it is recognized from the input seque nce ll_ah : 'al-ll_ah u é < Ë @ - al-l ahu, ta-al-ll_ ahi é < Ë A K ta-'l-l ahi. Increased spacing (T atw l ) b et w een adjoining c haracter s m a y b e pro duce d b y a double h yphen --; note the p osition of the v o w el marks: qabila É J . ¯ qabila, qa--bi--l a ÉJ . ¯ qabila, q--ab--i la É J . ¯ qabila. q--a--b-- i--la É J . ¯ qabila, qa----b i---- la É J . ¯ qabila Ties b et w ee n w ords are indicated b y a single h yphen: bi-baladi N Y ÊJ . K . bi-baladin, ta-al-ll_a hi é < Ë A K ta-'l-l ahi, sa-ya'tI ú G AJ sa-ya - t , li-yafra. ha h Q ® J Ë li-yafrah . a, wa-iswadd a X ñ @ ð wa-'swadda, ba`da-mA AÓ Y ª K . ba , da-m a, .tAla-mA A Ü Ï A £ t . ala-m a, fI-ma Õæ ¯ f -ma, `alA-ma Ð C C « , al a-ma. A sin gl e h yph en at the b eginn in g or end of a w ord will enforce the use of the joining form of the rst resp. the last c haracter, if that form exists (for sp ecial uses only): s s, -s -s, -s- -s-, s- s- h è h, -h é -h, -h- ê -h-, h- ë h- d X d, -d Y -d, lA B B l a, -lA C C -l a 1400 h- ë 1400 1400 h- Di git sequences are written in the natural order: 123456789 0 123 45 67 89 0 12345 67890 3 The liga ture other wise pro du ced autom at ica lly lo oks ugly and has b een brok e n b y |. APPENDIX F. CODING EXAMPLES F OR ARABIC 44 Li gatur es are generated automa ticall y; they can b e suppress ed b y |: 'al-'islA mu Ð C C B B @ - al- - isl amu; 'al-^gAru P Ae Ì ' @ - al- g aru, 'al|^g Aru P Ab & Ë @ - al g aru; _tumma Õ ç ' t umma, _tu|mma Ñ & K t umma; mu.hammad uN Y Ô m × muh . ammadun, mu|.ha |mmad uN Y Ò & j& Ó muh . ammadun. Abbr eviat ion s and emphasi s are indicated b y \emphasize : \emphasiz e .sl`m ÕªÊ s . l , m \emphasiz e ab||^g ` ' H . @ ab g If neces sary , use grouping b y curly braces : \emphasiz e {`alayhi as-salAmu } Ð C C Ë @ éJÊ« , alayhi 's-sal amu App endix G Co ding examples for P ersian 1 The short v o w els ( a), e ( ), o ( u) are denoted b y the lo w ercase letters a, e or i, o or u: bar QK . bar, beh é K . beh, bon á K . bon. The long v o w els a ( a) , i ( , e), u ( u , o) are denoted b y the capital letters A, I or E, U or O. lef mdde is autom ati cally generated for w ord-initi al a: Ab H . @ ab, bAd X AK . b ad, bId Y J K . b d, bUd X ñ K . b ud. Note that I yields a ya-ye m`ruf (with zir ), whilst E yields a ya-ye mjhul (without zir ). Sim il arly , U yields a waw-e m`ruf (with pi s ), whilst O yields a waw-e mjhul (without pi s ): tIr Q K t r, tE.g © J K t e _ g; dUr P ð X d ur, zOr P ð R z or. The dip h t ho ngs e and ou are written ay and aw: pay ú G pay, naw ñK naw. In t erv o cali c h . mze is written ': pA'Iz S K AK p a - z; miyA'I ú G A J Ó miy a - , mIgU'I ú G ñÂJ Ó m g u - ; 1 W e gratefully ac kno wledge the v olun tary help b y Iv an Derzhan ski who wrote this c hapt er, and implem en ted the language-sp e ci c pro cessing. As w e exten- siv ely m o di ed his routines durin g system in tegration, all resp onsibilit y for an y rem ainin g, or new, errors rests with us. 45 APPENDIX G. CODING EXAMPLE S F OR PERSIAN 46 tawAnA'I ú G AK @ ñ K taw an a - , zanA^sU 'I ú G ñ AK R zan a s u - . Si le n t w ord- n al waw is generate d b y _U or O: t_U ñ K tu, d_U ð X du; tO ñ K t o, dO ð X d o. Waw-e m`dul is written w; it is om itted in the transliteration and the pre- ceding xe receiv es no jzm: _hwAb H . @ ñ s h ab, _hwI^s ñ s h s, _hwod X ñs h od. Ha-ye hwwz-e mx is generated b y H, or optional ly b y ,e, ,a or ,A. It do es not receiv e a jzm ev en in fully v o calised mode and is not joined to a foll o wing letter: _hAneH é K Ag h aneh, ^c,e é{ ceh, naH éK nah, yal_aH é Ê K yal ah, yal,A é Ê K yal ah _hAneHhA A ë é K Ag h anehh a, _hAneH-hA A ë ' é K Ag h aneh-h a. Shor t ed . afe is written -e or -i: ketAb-e U ð @ H . A J» ket ab-e u, rAh-e t_U ñ K è @ P r ah-e tu, nAmeH-i man á Ó é Ó AK n ameh-i man, bInI-e An mard X Q Ó à @ ú æ J K . b n -e an mard, pA-i In zan à R á K @ ø A K p a-' n zan, bAzU-i In zan à R á K @ ø ð R A K . b az u-' n zan. L ong ed . afe is written -_i: dAr-_i man á Ó P @ X d ar- man, _hU-_i t_U ñ K ø ñ s h u- tu. H . mze as ya-ye wh . dt/nesbt/xet . ab is lik ewise written -_i: nAmeH-_i é Ó AK n ameh- , sormeH-_ i é Ó Qå sormeh- , gofteH-_i é J ® à gofteh- . Y e-ye wh . dt is written -I or -E: ketAb-I úG . A J» ket ab- , rAh-I ùë @ P r ah- , nAmeH-I ø @ ' éÓ AK n ameh- ; dAnA-I ú G AK @ X d an a- , pArU-I ú G ð P A K p ar u- ; dAnA-I-ke H éº JK AK @ X d an a- -keh, pArU-I- keH éº J K ð P A K p ar u- -keh. APPENDIX G. CODING EXAMPLE S F OR PERSIAN 47 The presen t tense forms of the v erb budn and the pronom inal clitics are written as they are sp ok en: rafteH-am Ð @ ' é J ¯ P rafteh-am, rafteH-Im Õ ç' @ ' é J ¯ P rafteh- m, rafteH-I ø @ ' é J ¯ P rafteh- , rafteH-Id Y K @ ' é J ¯ P rafteh- d, rafteH-as t I @ ' é J ¯ P rafteh-ast, rafteH-an d Y K @ ' é J ¯ P rafteh-and; mard-Id YK X Q Ó mard- d, asb-etA n à A J . @ asb-et an; An^gA-st I Ae ' @ an g a-st, U-st I ð @ u-st, t_U-st I ñ K tu-st; ketAb-I-s t I K . A J» ket ab- -st, nAmeH-I -st I @ ' éÓ AK n ameh- -st. The prep osi t ion b e- can b e written with or without a h yphen: be-man á Ü ß . be-man, be-t_U ñ J K . be-tu; be-An à A K . be- an, be-In á K A K . be- n, beU ð A K . be u. The comp onen ts of comp ound s can b e separated b y || or "|: .sA.heb|| _hAne H é K A s ' I . k A s . ah . ebh aneh, ta_ht-e-" |_hwA b H . @ ñ s ' I u ' tah t-e-h ab; pas||andA z R @ Y K @ ' pasand az, naw||Am Uz R ñÓ @ ' ñK naw am uz, bI||_hwod X ñs ' úG . b h od. App endix H Alternate input enco dings H.1 ASMO 449 = ISO 9036 The le asmo4 49.st y con tains a reading m o dule for the ASMO 449 co de (iden tical to ISO 9036). It is installed b y the L a T E X option asmo449 or b y \inpu t asmo449. sty. The module is activ ated b y \setcod e {asmo44 9} or \setc ode {iso90 36}; all foll o wi ng Arabic text will b e considere d to b e co ded according to the ASMO 449 standard. The ArabT E X notation m a y b e reacti- v ated b y \setcode {arabtex} . ASMO 449 (see T able H.1) is a 7-bit co de, di ering from ASCI I (ISO 646) mai nly b y replacing the letters b y the Arabic letter c haracters and diacritical marks; the Arabic digits share their p ositions with the ASCI I digits. The p ositions of sp ecial and con trol c haracters in b oth co des are iden tical. A m inim al driv er le for pro ce ssing, e.g. a le asmotext .dat, could b e struc ture d as follo ws: \docu ments tyle [arabtex,a smo44 9]{a rticl e} \begi n {documen t} \setc ode {asmo4 49} \begi n {arabtex t} \inpu t asmotext .dat % the preceding blank line is required if "asmote xt.da t" did not % end with a blank line itself ; this is strange and embarra ssin g \end {arabtext} \end {document} 48 APPENDIX H. AL TERNA TE INPUT ENCODINGS 49 0 1 2 3 4 5 6 7 00 NUL DLE SP 0 @ X & 01 SOH DC1 ! 1 Z P ò 02 STX DC2 " 2 @ R ô 03 ETX DC3 # 3 @ ¼ 04 EOT DC4 $ 4 ð È 05 ENQ NAK % 5 @ Ð 06 A CK SYN & 6 K à 07 BEL ETB ' 7 @ è 08 BS CAN ) 8 H . ¤ ð 09 HT EM ( 9 è ¨ ø 10 LF SUB : H ¨ ø 11 VT ESC + ; H ] } 12 FF IS4 , > ` \ | 13 CR IS3 = h [ { 14 SO IS2 . < p ^ ~ 15 SI IS1 / ? X _ DEL T able H.1: ASMO 449 co de table APPENDIX H. AL TERNA TE INPUT ENCODINGS 50 As texts co ded in ASMO 449 are alw a ys rendere d v erbatim the comm ands \novo caliz e, \vocalize , \fullvoca lize and the language selection com- m ands \setarab etc. m ak e no sense and are temp orarily disabled. T exts in ASMO 449 are usually not fully v o w elized. Th us the transliteration cannot b e exp ec ted to b e correct . This is esp ec ially true for Egyptian texts whic h comm o nly do not di eren tiate b et w een y a' and 'alif maqs . ur a . H.2 ASMO 449 E = ISO 8859 - 6 The le iso88596. sty con tains a reading module for the ISO 8859-6 co de (extended ASMO 449 = ASMO 449E). It is installed b y the L a T E X op- tion iso885 96 or b y \input iso88596 .sty. The m o dule is activ ated b y \setc ode {iso88 59-6} ; all foll o wi ng Arabic text will b e considere d to b e co ded according to the ISO 8859-6 standard. The ArabT E X notation m a y b e reacti- v ated b y \setcode {arabtex} . ISO 8859-6 (see T able H.2) is an 8-bit co de closely related b oth to 7-bit ASCI I and to ASMO 449; whereas the lo w er 128 p ositions are iden tical to ASCI I (ISO 646), the upp er 128 p ositions con tain the Arabic c haracter s of ASMO 449 in the analogo us places, plus a few additional graphic and con trol c haracter s. W e exploit the close relationship of these co des b y reusing the ASMO 449 read- ing routines, after suitable m o di catio n of the input. This only w orks corre ctly if the input text do es not con tain gen uine ASCI I letters, as w e pro ject the Ara- bic c haracters on to their lo cations in ASMO 449. Some of the co de switc hing m essages in the log le are spurious; do not w orry . The notes on v o w elizatio n and transliteration of ASMO 449 apply also. The driv er le indicated for ASMO 449 will b e usable after the ob vious mo d- i cations; ho w ev er, y our T E X installati on m ust b e capable of pro ces sing 8-bit data input. This is no w ada ys usually the case; otherwise y ou can try to lo cally nd som e utili t y program that will strip the highest order bit o the c haracters in y our le, and pro cess the result via ASMO 449. APPENDIX H. AL TERNA TE INPUT ENCODINGS 51 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 00 NUL DLE SP 0 0 @ P ` p NBSP X & 01 SOH DC1 ! 1 1 A Q a q Z P ò 02 STX DC2 " 2 2 B R b r @ R ô 03 ETX DC3 # 3 3 C S c s @ ¼ 04 EOT DC4 $ 4 4 D T d t b . . . . . . . . ð È 05 ENQ NAK % 5 5 E U e u @ Ð 06 A CK SYN & 6 6 F V f v K à 07 BEL ETB ' 7 7 G W g w @ è 08 BS CAN ) 8 8 H X h x H . ¤ ð 09 HT EM ( 9 9 I Y i y è ¨ ø 10 LF SUB : J Z j z H ¨ ø 11 VT ESC + ; K ] k } ; H 12 FF IS4 , > L \ l | , ` 13 CR IS3 = M [ m { SHY h 14 SO IS2 . < N ^ n ~ p 15 SI IS1 / ? O _ o ? X DEL T able H.2: ISO 8859- 6 co de table App endix I Miscellaneous utilities The foll o wi ng pac k ages are not part of ArabT E X prop er, and are not supp orte d in an y w a y , but are distributed along with ArabT E X as p ossibly a con v enience to the users. There is no w arran t y whatso ev er. I.1 t w oblks.st y This L a T E X option will de ne a comm and \twoblocks {#1}{#2} whic h will place the t w o param eters #1 and #2, usually t w o paragraphs, in to t w o b o xes side b y side, separated b y space of length \colse p. If necess ary , the res ulting b o xes will b e split across a page b oundary . This feature is useful if t w o v ersions of a text are to b e compared. They m a y b e in di eren t languages, and one of them m igh t b e in Arabic (if enclosed in \begi n {arabtex t} \end {arabtex t}). This sen te nce has b een written t wice: in the English language and in the Arabic language. é ª Ê Ë A K . : á K Q Ó é Ê Ò eÌ ' @ è Y ë I . J » . é J K . Q ª Ë @ é ª Ê Ë A K . ð é K S Ê e ' B B @ Otherwise this comm a nd do es not dep end on ArabT E X in an y w a y , and indeed origi nated in a com pletely di eren t con text. Bew are that the t w o \blo c ks" should eac h not con tain m uc h mo re than one, not to o long, paragraph of text, otherwise T E X's mai n storage m ig h t o v er o w. There m ust b e no \verbatim text inside the parameters of \twoblock s, nor an y \catcode c hanges; and all T E X groups and \if \fi seque nce s m ust b e prop erly nested. 52 APPENDIX I. MISCELLANEOU S UTILITIES 53 I.2 ab jad.st y This le, loaded as a L a T E X option, will de ne a comm a nd \abjad {#1} usable inside and outside of an A r abic c ontext. It pro ted greatly from suggestions b y Dr. Benno v an Dalen (Utrech t Univ ersit y). The comm and \abjad {#1} will con v ert its argum en t, whic h has to b e a legal represe n tation of a n um b er b et w een 1 and 1999, to the Arabic 'ab gad notation used in some mediaev al m an uscripts. The result of the con v ersion will not lo ok p erfect, and the legal 'ab gad n um b er 0 can prese n tly not b e generate d. Im pro vi ng this routine needs a fon t revision, whic h is hard and tedious; whenev er this happ ens, the comm a nd mig h t w ell b ecome part of ArabT E X prop er. I.3 MLS2ARAB This is an UNIX SED script, written b y Prof. Nic holas Heer (Univ ersit y of W ash- ington), and released for free distribution. It will (alm ost) con v ert an ASCI I le of Arabic text, pro duced b y Multi-Li ngual Sc holar, to the ArabT E X input notation. The con v ersion is not p erfec t so some m an ual corrections m ig h t b e necess ary . F or op erating instructions, see the le itself. INDEX 54 Index " (quoting), 15 "|, 14, 15 $ , 7 --, 15 \ , 8 \\, 8 \abja d, 53 \arab false , 19 \arab true, 19 \begi n{ara btext }, 6, 34 \begi n{set code} , 18 \bigs kip, 8 \cent erlin e, 9 \cols ep, 52 \doas sign, 9 \doco mmand , 9 \emph asize , 8 \end{ arabt ext}, 6, 34 \end{ setco de}, 18 \foot note, 8 \full vocal ize, 13, 15, 16, 34 \hfil l, 8 \hspa ce, 8 \inde nt, 8 \inpu t, 8, 18 \inpu t arabtex. tex, 5 \inpu t atrans.s ty, 20 \inpu t etrans.s ty, 20 \ligs false , 16 \ligs true, 16 \magn ifica tion, 5 \marg inpar , 8 \mbox , 8 \meds kip, 8 \newh amza, 41 \newtanwi n, 17, 40 \noindent , 8 \nospace, 8 \novocali ze, 15{17 \oldarabt ex, 35 \oldhamza , 41 \oldtanwi n, 17, 40 \par, 6, 8 \pnash, 5 \pnashbf, 5 \quiet, 26 \setarab, 6, 10, 13, 21 \setcode, 18 \setcode{ arabt ex}, 18, 48, 50 \setcode{ asmo4 49}, 48 \setcode{ iso88 59-6} , 50 \setcode{ iso90 36}, 48 \setfarsi , 10, 21 \setmaghr ibi, 10, 21 \setnash, 8, 11 \setnashb f, 8, 11 \setnasta liq, 8, 11 \setnone, 10, 21 \setpasht o, 10, 21, 23 \seturdu, 10, 21, 23 \setverb, 10, 21, 24 \showfals e, 27 \showtrue , 27 \smallski p, 8 \space, 8 \spreadbo x, 8 \spreadfa lse, 25 \spreadli ne, 9 \spreadtr ue, 25 \tracinga rab, 26 INDEX 55 \tran sfals e, 19 \tran strue , 19 \twob locks , 52 \voca lize, 15, 16, 34 \yahd ots, 25 \yahn odots , 25 >, 10, 21 \|, 8 |, 14{16 |B, 15 |BB, 15 ||, 14, 15 ` (`ayn ), 14 ' (hamza ), 13 A, 12, 17, 38 'A, 14, 16, 41 ,A, 46 _A, 12, 17, 38 ~A, 14 ,a, 22, 23, 46 _a, 12, 16, 39 a (fath . a ), 12, 38 aa, 12, 38 abbreviation, 44 ab jad.st y , 53 'ab gad n um b ers, 53 Afghanic, 22 `ayn , 14 al-, 14, 19 'alif , 17 dagger, 12, 16, 39 initi al, 17 maqs . ur a , 12, 17, 38, 40 silen t, 17, 40 Qur'an, 16, 39 silen t, 17, 19, 38{40 sma ll , 16, 39 b elo w, 16, 39 'A l l ah (sp elling), 43 aN, 13, 17, 39 aN_A, 17, 40 aNA, 13, 17, 39 aNY, 40 Arabic con text, 6, 7 Arabic en vironmen t, 6 Arabic group, 7 Arabic item, 6 Arabic n um b er, 7 Arabic quotation, 6 Arabic quotes, 7 Arabic w ord, 7 arabtex.tex, 5 ArabT E X com m ands, 7, 8 arc haic text, 25 ASCI I, 48, 50 ASMO 449, 18, 48, 50 aspirated consonan t, 22 assignmen t, 9 assimi lati on, 14, 16, 19, 41 automa tic stret c hing, 25 aW, 38 a w, 45 aW A, 38 a y , 45 B, 15 b e-, 47 b o xing comm a nds, 8 breaking connections, 15 co de 7-bit, 48 8-bit, 50 arabtex, 18 ASCI I, 48, 50 ASMO 449, 18, 48, 50 ISO 646, 48, 50 ISO 8859-6, 18, 50 ISO 9036, 18, 48 co ding con v en tions, 12, 34 comm a nds ArabT E X, 7, 8 b o xing, 8 illegal , 9 in ternal, 5 L a T E X, 7 INDEX 56 o v erview, 9 size c hanging, 5, 8, 11 T E X, 7 user de ned, 5, 9 com p ounds, 47 cop yrigh t, 0, 32 dagger 'alif , 12, 16 d . amma , 12, 15, 16 in v erted, 16, 22, 39 Dari, 21 date, 15 default fon t, 5, 11 defectiv e writing, 12, 16, 39 de nite article, 14, 19, 41 Derzhanski, Iv an, 45 diacritics, 16 diph thongs, 45 displa y mo de, 7 dots on y a' , 22, 25 E, 21 -E, 22 ,e, 22, 23, 46 -e, 22 EDMA C, 27 empha sis, 44 en vironm en t Arabic, 6, 18 arabtext, 6, 18 setco de, 18 tabbing, 6 F arsi, 21 fath . a , 12, 15, 16 Fisc her, W ol fdietric h, 38 fon t b old, 11 default, 5, 11 install ation, 33 nash10, 34 nash14, 32{34 nash14bf, 33 naskh, 11, 32, 33 nasta`liq, 22, 32 selec tion, 11 una v ail able, 11 grouping, 7, 44 H, 21{23, 46 h-, 15 hamza , 13, 15, 22, 40, 45, 46 carrier, 17, 40 old st yle, 41 h . ar ak at , 12, 15, 16, 38, 45 on tatw l , 15 Heer , Nic holas, 53 h yphen, 15, 43 I, 12, 38 -I, 22 ~I, 14 -i, 22 _i, 12, 16, 39 i (kasr a ), 12, 38 im plem en tation Mac, 32 PC, 32 U*IX, 32 iN, 13, 39 input switc hing, 18 insertion mathem ati cal, 7 non-Arabic, 7 Rom an, 7 installatio n, 33 in ternal comm ands, 5 in v erted d . amma , 16, 22 in visible consonan t, 14 ISO 646, 48, 50 ISO 8859-6, 50 ISO 9036, 48 iy , 12, 38 iz . afet , 15, 22, 23, 46 ka s da, 15, 25, 43 kasr a , 12, 15, 16 INDEX 57 Kurdish, 21 la-, 43 langua ge selec tion, 10 L a T E X comm ands, 7 li- , 43 lig ature, 16, 34, 44 breaking, 14{16 , 44 lists, 9 long v o w els, 12, 16 Macin tosh, 32 madda , 14, 16, 45 Maghribi, 23 m athem atical insertion, 7 MET AF ONT, 33 MLS2ARAB, 53 Multi-Li ngual Sc holar, 53 N, 15, 16, 19 naskh, 11, 32, 33 nasta`li q, 22, 32 nesting, 7, 9 NFSS, 33 NFSS2, 33 non-Arabic insertion, 7 NU, 13, 39 n um b ers, 43 'ab gad , 53 O, 21, 46 option ab jad, 53 arabtex, 5 asm o449 , 18 atrans, 20 etrans, 20 iso885 96, 18 nash bf, 11 nastaliq, 11 oldarabtex, 35 t w oblks, 52 Ottom an, 21 P ash to, 22, 23 PC im plem en tation, 32 P ersian, 21 P ersian copula, 22 pi s , 45 punctuation, 6 quotation Arabic, 6 non-Arabic, 7 Rom an, 7 quoting, 13, 15, 16 Qur'an 'alif , 16 reading module, 18 Rom an insertion, 7 sadda , 14, 16, 41 on tat w eel, 15 short v o w els, 12 silen t 'alif , 17, 19 size c hanging, 5, 8, 11 sp ec ial co dings, 25 stret c hing, 8, 15, 25 automa tic, 25 suk un , 15, 16, 22, 34, 46 on l am , 14 on tatw l , 15 sun letter, 14 T, 40 tabbing en vironmen t, 6 t a' marbut . a , 40 tanw n , 13, 15{17 , 19, 39, 40 fath . a , 40 on tatw l , 15 ta sd d , 14, 16 tatw l , 15, 43 T E X comm a nds, 7 T E X hash size, 5, 33 text arc haic, 25 erroneous , 25 T E X-X E T, 33 transliteration, 12, 19, 34 INDEX 58 Encyclop edia of Islam , 20 ZDMG, 19 t w oblks. st y , 52 U, 12, 19, 38 _U, 39, 46 ~U, 14 _u, 12, 16, 39 u (d . amma ), 12, 38 U*IX im plem en tation, 32 UA, 17, 38 uN, 13, 39 una v ai la ble fon t, 11 Urdu, 22, 23 user de ne d comm ands, 5, 9 u w, 12, 38 v an Dalen, Benno, 53 v erbatim , 17 v o w el m arks, 16 v o w els long, 12, 16, 38, 45 short, 12, 38, 45 W, 19 W A, 17 was . la , 15, 16, 19, 34, 42 Y, 12, 38 y a' dots, 22, 25 y a'-i-wah . dat , 22, 23, 46 z r , 45 zwar akay , 22