Table Of Content﴾ ﻲﺑﺮﻌﻟا ﴿ ﺦﺗﻻ مﺎﻈﻧ
ﻲﺑﺮﻌﻟا ﻂﺨﻟﺎﺑ ﺔﺑﺎﺘﻜﻟا ﻲﻓ ج يرﺎﺒﻟا ﺔﻨﻣ
و ﻲﺑﺮﻋ
ﯽﺳرﺎﻓ
TypesettingArabicandFarsiwiththeArabipackage
TheUsersGuide
يﺮﺑﺎﺠﻟاﻒﺳﻮﻳ
(cid:13)c YOUSSEF JABRI
Écolenationaledessciencesappliquées,
Box696,Oujda,Morocco
yjabri@ensa.univ-oujda.ac.ma
Version1.1, December16,2006
Contents
ListofFigures 4
ListofTables 5
Chapter1. PrefacetoVersion1.1
١.١ راﺪﺻﻺﻟ ﻢﻳﺪﻘﺗ
10
Chapter2. Presentation
ﺔﻣﺪﻘﻣ
11
2.1. WhatyouneedtohavetouseArabi 12
2.2. Howthisdocumentisorganized 12
Chapter3. TheArabicScript
ﻲﺑﺮﻌﻟا ﻂﺨﻟا تﺎﻴﺻﻮﺼﺧ
14
3.1. TheArabicscript 14
3.2. TheArabiclanguage 15
3.3. TheArabicalphabet 15
3.4. ThePersianlanguage(s)“Farsi” 17
3.5. TheFarsiAlphabetadditions 18
Chapter4. UseoftheSystem
مﺎﻈﻨﻟا لﺎﻤﻌﺘﺳا
22
4.1. InputencodingssupportedbyArabi 22
4.2. Declaringtherightinputencoding 23
4.3. CallingBABEL 23
4.4. PreparinganInputfile 24
4.5. Thedocument 25
4.6. NumberswithinArabicandFarsitexts 25
4.7. Breakingligatures 27
4.8. TurningvowelsON/OFF 28
4.9. Forcingthefinalformofavowelizedconnectingcharacter 29
Chapter5. Bi-directionalSupport
ﻦﻴﻫﺎﺠﺗﻻا رﺎﺘﺨﺗ ﻒﻴﻛ
30
5.1. Globalformattingparameters 30
5.2. Sectioningcommands 31
5.3. DisplayedMaterial.Listsenvironments 32
5.4. MoreDisplayedMaterial 36
5.5. Footnotes 37
1
2 ﻲﺑﺮﻌﻟا مﺎﻈﻧ
Chapter6. ArabiLocalisation
فﻼﺘﺧاو ﺰﻳﺎﻤﺗ
39
6.1. ArabicandFarsicaptions 39
6.2. ArabicandFarsidates 39
6.3. TheArabiabjadnumerationsystem 41
6.4. Farsimathematics 43
6.5. Transliterationsignsandstandards 45
6.6. Specialcharacters 45
Chapter7. ArabiFeatures
ﻲﺑﺮﻌﻟا تﺎﻴﺻﻮﺼﺧ
47
7.1. Thefonts 47
7.2. AvailableArabicfonts 47
7.3. AvailableFarsifonts 49
7.4. HowtogetOutlinefontsforfree 49
7.5. SearchandcopyArabiPDFfiles 52
7.6. Arabiccharactersinthebookmarkssidebar 53
7.7. ArabicandFarsiPoetrywithinArabi 53
7.8. TEX4htsupport 55
HowtoproduceaHTMLfilefromaArabiinputfile 57
Chapter8. Somecompatibilityissues
ىﺮﺧﻷا مزﺮﻟا ﻊﻣ مﻼﺳ ﻲﻓ ﻪﺸﻳﺎﻌﺗو ﻲﺑﺮﻌﻟا ﺔﻧوﺮﻣ
59
8.1. PSTricksandArabi 59
8.2. shapeparandArabi 61
8.3. pgfandArabi 61
8.4. ArabTEXandArabiorinput encodinggymnastics 62
8.5. fmulticofromtheFarsipackage 65
8.6. PosterandArabi 67
Chapter9. ArabiwithXETEX
ﺦﺗيز و ﻲﺑﺮﻌﻟا
70
AppendixA. Arabipackagecomponents
ﻲﺑﺮﻌﻟا ﺔﻣزر تﺎﻳﻮﺘﺤﻣ
71
1.1. MainPackagefiles 71
1.2. Inputencodingfiles 72
1.3. Fontencodingfiles 72
1.4. SpecificfilestoaccessFonts 72
1.5. TeX4htsupportfiles 72
1.6. CMaptranslationfiles 72
AppendixB. FinalNote
مﻼﻜﻟا ﺮﺧآ
73
2.1. Acknowledgment 73
2.2. Shortcomings,Desiderata 73
2.3. ArabiLicense 74
2.4. BugsandErrorReporting 74
TheArabisystem 3
AppendixC. Changes
تاﺪﺠﺘﺴﻣ
75
3.1. Version1.1 75
3.2. Version1.0 76
Bibliography 77
Index 78
List of Figures
0.1 Arabiandthecalendrierfppackage 9
3.1 NUTSHELL.ArabiandtheparshapepackageI 21
4.1 SampleArabiinput 26
4.2 SampleArabioutput 27
4.3 Activating,DeactivatingandReactivationvowelizationagain 29
4.4 Typingfinalvowelizedconnectingcharacters 29
6.1 HowMathematicsarewrittenintheFarsieditor 43
6.2 Andhowtheyshouldappearoncetypeset 44
7.1 SearchingArabiPDFfiles 52
7.2 ArabiccharactersintheBookmarkssidebar 53
7.3 TEX4htandArabiinput 56
7.4 Thefilesamplebook.htmlasshowninawebbrowser 57
7.5 Thefilesamplebook.htmlwithaslightlymodifiedCSS 58
8.1 PSTricksandArabi 59
8.2 PSTricksandArabiinput 60
8.3 MOSQ DOOR.ArabiandtheparshapepackageII 61
8.4 pgfandArabi 63
8.5 ArabiandArabTEXsidebyside 65
8.6 ArabTEXatworkinsideArabi 66
8.7 Arabiandpostercoding 69
4
List of Tables
3.1 ThemodifiedFarsiletters 19
6.1 CaptionsinArabicandFarsi 40
6.2 ArabicandFarsimonthnames 41
6.3 Arabicabjadnumerals 42
6.4 Farsiabjadnumerals 42
6.5 Alittleexampleoftransliteration 45
7.1 ThethreefontchoicesforArabic 49
7.2 ThefontsactuallyavailablewithArabic 50
7.3 ThefontsactuallyavailablewithFarsi 51
7.4 ThetwofontchoicesforFarsi 51
5
ﻢﺴﺒﺑ
ﺎﻣ ﻻإ ﺎﻨﺒـــﻴﺼﻳ ﻦﻟ ﻞﻗ
ﺎﻧﻻﻮـــــــﻣ ﻮﻫ ﺎﻨﻟ ﷲا ﺐﺘﻛ
نﻮﻨﻣﺆﻤﻟا ﻞﻛﻮﺘﻴﻠﻓ ﷲا ﻰﻠﻋو
:صﷲالﻮﺳردءﺎﻋدﻦﻣنﺎﻛ
، ﻢﻠﺤﻟﺎﺑ ﻲﻨﻳزو ، ﻢﻠﻌﻟﺎﺑ ﻲﻨﻨﻏأ ﻢﻬﻠﻟا
. ﺔﻴﻓﺎﻌﻟﺎﺑ ﻲﻨﻠﻤﺟو ، ىﻮﻘﺘﻟﺎﺑ ﻲﻨﻣﺮﻛأو
،هﺮﻴﻣأ ﻦﻜﺗ ﺖﺌﺷ ﻦﻣ ﻰﻠﻋ ﻦﻨﻣأ
،هﺮﻴﻈﻧ ﻦﻜﺗ ﺖﺌﺷ ﻦﻤﻋ ﻦﻐﺘﺳاو
!هﺮﻴﺳأ ﻦﻜﺗ ﺖﺌﺷ ﻦﻣ ﻰﻟإ ﺞﺘﺣاو
ﺐﻟﺎﻃ ﯽﺑأ ﻦﺑ ﯽﻠﻋ مﺎﻣﻹا
ﻪﻬﺟو ﷲا مﺮﻛ
6
TheArabisystem 7
DedicatedtoAll thepeoplewhoneedit.
Abstract
The Arabi package provides the Right-to-Left scripts support for TEX without
the need of any external preprocessor. The Bi-directional capability supposes
thattheuserhasaTEXenginethatknowsthefourprimitives\beginR,\endR,
\beginL and\endL.ThatisthecaseoftheTEX--XETand #-TEXenginesandall
their extensions/variants like XETEX and Alpha1. Arabi is fully compliant with
the BABEL system and hence a standard switching mechanism to chose the
supportedlanguages.Weintendtoaddsomeimportantmultilingualtypeset-
tingcapabilitiesnotyetsupportedbyBABEL.ItcomeswithmanyGNUArabic
and Farsi good quality fonts and may of course also use the Arabic fonts of
commercialmanufacturers.Alimitedsupportisalreadyprovidedtousesome
widelyusedArabicandFarsifontsthatcomewithsuchsystems.Thepackage
isdistributedundertheLATEXProjectPublicLicense(LPPL),andhastheLPPL
maintenancestatus“author-maintained.”Itcanbeusedfreely(includingcom-
mercially)toproducebeautifultextsthatmixArabic,FarsiandLatin(orother
type)characters.
You can simply type the text you want in 8-bit what you see is what you get
textinmanyinputencodings(actually,CP1256,ISO8859-6andUnicodeUTF-
8 are supported) It can also typeset classical Arabic poetry, and has a limited,
butstilluseful,capabilityofvocalizing.ItisLATEX2# andBABELcompliant!
Ithasevenanexperimentalmoduleoftransliteration!
1ArabihasnotbeentestedwithAlphayet.
ﻢﻴﺣﺮﻟا ﻦﻤﺣﺮﻟا ﷲا ﻢﺴﺑ
﴾ﻲﺑﺮﻌﻟا﴿ ﺔﻣزﺮﻟ ﺐﻀﺘﻘﻣ ﻢﻳﺪﻘﺗ
ﺪﺣاو ﺪﻨﺘﺴﻣ ﻲﻓ ﺐﻨﺟ ﻰﻟإ ًﺎﺒﻨﺟ ﺔﻴﻨﻴﺗﻼﻟاو ﺔﻴﺑﺮﻌﻟا فوﺮﺤﻟا لﺎﻤﻌﺘﺳا ﺔﻴﻧﺎﻜﻣإ ﺢﻴﺘﻳ مﺎﻈﻧ ﺔﻣزر
ﻲﺑﺮﻌﻟا
درﻮﻔﻧﺎﺘﺳ ﺔﻌﻣﺎﺟ ﻦﻣ « ثﻮﻨﻛ ﺪﻟﺎﻧود » ذﺎﺘﺳﻷا هﺮﻜﺘﺑا يﺬﻟا فوﺮﺤﻟا ﻒﻴﻔﺼﺘﻟ « ﺦﻴﺗ » مﺎﻈﻧ لﺎﻤﻌﺘﺳﺎﺑ
TEX
ﻻ لﺎﺜﻤﻟا ﻞﻴﺒﺳ ﻰﻠﻋ ،ءﺎﻴﻤﻴﻜﻟاو ءﺎﻳﺰﻴﻔﻟاو تﺎﻴﺿﺎﻳﺮﻟا ﻰﻠﻋ يﻮﺘﺤﺗ ﻲﺘﻟﺎﻛ) ﺔﻴﻤﻠﻌﻟا تاﺪﻨﺘﺴﻤﻟا ﻒﻴﻔﺼﺗ ﻞﺟأ ﻦﻣ
. ﻞﺑﺎﻘﻣ نود ﻲﻤﻠﻌﻟا ﻊﻤﺘﺠﻤﻟا فﺮﺼﺗ ﺖﺤﺗ ﻪَﻌَﺿوو (ﺮﺼﺤﻟا
مﺎﻈﻧ ﻊﻣ (ﯽﺳرﺎﻓ و ﻲﺑﺮﻋ) ﻦﻴﺘﻐﻠﻟا لﺎﻤﻌﺘﺳا ﺔﻴﻧﺎﻜﻣإ ﺔﻓﺎﺿإ ﻞﺟأ ﻦﻣ ﺔﻌﺿاﻮﺘﻣ ﺔﻤﻫﺎﺴﻣ ﻲﺑﺮﻌﻟا ﺔﻣزر
رﺎﻴﺘﺧا ﻪﻨﻣ ﺖﻠﻌﺟ ﻲﺘﻟاو ،صﻮﺼﻨﻟا ﻒﻴﻔﺼﺗ ﻲﻓ تﺎﻴﻧﺎﻜﻣإ ﻦﻣ ﺮﺧاﺰﻟا ﻢَﻟﺎﻌﻟا اﺬﻫ ﻪﻳﻮﺘﺤﻳ ﺎﻣ ﻞﻛ لﻼﻐﺘﺳﻻ ﺦﻴﺗ
. هﺮﺳﺄﺑ ﻢﻟﺎﻌﻟا ﻲﻓ ﺔﻴﻤﻠﻌﻟا ثﻮﺤﺒﻟا ﺮﺸﻨﺑ مﻮﻘﺗ ﻲﺘﻟا ﺔﻴﻤﻟﺎﻌﻟا تﺎﺌﻴﻬﻟاو تﺎﺴﺳﺆﻤﻟا
ﻊﻣ لﺎﻤﻌﺘﺳﻼﻟ ﻞﺑﺎﻗ ﻪﻧﻷ ، ﺔﻧوﺮﻤﻟا ﻦﻣ ﺮﻴﺒﻛ رﺪﻘﺑ ﻊﺘﻤﺘﻳو ﻻﻮﻤﺤﻣ ﻪﻧﻮﻜﺑ ﺰﻴﻤﺘﻳ مﺎﻈﻨﻟا اﺬﻬﻓ ، ﺔﻳاﺪﺒﻟا ﺬﻨﻣو
ﻲﺟرﺎﺧ ﺞﻟﺎﻌﻣ يأ ﻰﻟإ جﺎﺘﺤﻳ ﻻ ﻪﻧأ ﻰﻟإ ﺔﻓﺎﺿإ ! ﺎﻫﺮﺜﻛأ ﺎﻣو ةﺪﻋﺎﺴﻣ ﺞﻣاﺮﺑو تﺎﻓﺎﺿإ ﻦﻣ هزﺎﺠﻧإ ﻢﺗ ﺎﻣ ﻢﻈﻌﻣ
. ﺔﻤﻠﻜﻟا ﻲﻓ فوﺮﺤﻟا لﺎﻜﺷأ ﺪﻳﺪﺤﺘﻟ
ﻪﻨﻜﻤﻳ ﺎﻤﻛ لﺎﻤﻌﺘﺳﻻا ةﺮﺣ ، ﺔﻴﺳرﺎﻔﻟاو ﺔﻴﺑﺮﻌﻟا طﻮﻄﺨﻟا ﻦﻣ ةﺮﺧاز ﺔﻋﻮﻤﺠﻤﺑ ًﺎﺑﻮﺤﺼﻣ ًﺎﻴﻟﺎﺣ ُمُﺪﻘﻳ
ﻲﺑﺮﻌﻟا
. ًﻼﺜﻣ زوﺪﻨﻳو مﺎﻈﻧ ﻊﻣ ﻲﺗﺄﺗ ﻲﺘﻟا طﻮﻄﺨﻟا ﻦﻣ دﺪﻋ لﺎﻤﻌﺘﺳا
، لﺎﻤﻌﺘﺳﻻا ءﺎﻨﻋ ﻻإ ﻪﻠِﻤﻌَﺘﺴُﻣ ﻒﻠﻜﻳ ﻻو ﻲﻧﺎﺠﻣ نﺈﻓ ، ﺦﻴﺗ مﺎﻈﻨﻟ ﺔﺒﺴﻨﻟﺎﺑ لﺎﺤﻟا ﻮﻫ ﺎﻤﻛ
ﻲﺑﺮﻌﻟا
نﺎﻌﺘﺴﻤﻟا ﷲاو
8
7002
03 92 82 72 62 52
42 32 22 12 02 91 81
71 61 51 41 31 21 11
01 9 8 7 6 5 4
ﺍﻷﺣ3ﺪﺍﻟﺴﺒ2ﺖﺍﻟﺠﻤ1ﻌﺍﺔﻟﺨﻤﻴﺍﺲﻷﺭﺑﻌﺎﺍﺀﻟﺜﻼﺛﺎﺀﺍﻹﺛﻨﻴﻦ
ﻳﻮﻧﻴﻪ
70025242813278112212671021124561290ﺪ234189ﺖﺒﺴ12ﻟﺍ317ﺔﻌﻤﺠ1ﻟﺍ216ﺲﻴﻤﺨﻟﺍ5ﺀﺎﻌﺑﺭﻷﺍﻓﺀﺒﺎﺛﻼﺜﺮﻟﺍﺍﻳﺮﻦﻴﻨﺛﻹﺍ ﻦ118ﻴ5ﻨﺛﻹﺍﺀ1ﺎ29ﺛ6ﻼﺜﻟﺍﺀﺎ113ﻌ07ﺑﺭﻷﺮﺍ11ﺲﻳ4ﺎﻴ18ﻨﻤﻳﺨﻟﺍﺔ115ﻌ29ﻤﺠﻟﺍ12ﺖ6ﺒ30ﺴﻟﺍ12ﺪ741ﺣﻷﺍ ﺍﻷﺣﺍﻟﻣﺪﺴﺎﻱﺍﻟﺒﺠﺖﺍﻤ6ﻟﺨﻌﺍﻤ5ﻷﺔ3ﻴ1ﺭﺲﺑﺍ4ﻟ2ﻌﺜ10ﻼ2ﺎ3ﺍﻹ1ﺀﺛ19ﺛﺎ127ﺀﻨ02ﻴ18ﻦ1162971528614275132143122031292708022
ﺣﻷﺍ 22 23 24 25 26 27 28
29 30 31
ﻷﺍ
ﺣ
26191225720ﻦ1ﻴ322ﻨ6ﺛ082ﻹﺀ10ﺍ1ﺎﺛ4727ﻼ92ﺜﺀﻟ2ﺎ1ﺍﻌ538ﺑ02ﺭ1ﺱﺲ31ﻷﺍ6ﻴ39ﻤﺭ122ﺎﺔﺨ41ﻣﻟﻌﺍ71ﻤ023ﺠ5ﻟﺖ1ﺍ8ﺒ11ﺴ4ﻟﺍﺪ ﺣ ﻷﺍ 2007 ﻦﻴﻨﺛﻹﺍ2ﺀﺎﺛ9ﻼ1ﺜﻟﺍ623ﺀ3ﺎ1ﻌﻞﺑ01ﺭﻷﺍﻳ724ﺮ41ﺲﺑﻴ1ﻤ1ﺍﺨﻟ8ﺍ255ﺔ1ﻌﻤ21ﺠﻟﺍ926621ﺖﺒ032ﺴﻟﺍ0027771ﺪ4211288152229
30
Figure0.1:Arabiandthecalendrierfppackage
9
Description:Typesetting Arabic and Farsi with the Arabi package . It has even an experimental module of transliteration! . In Chapter 5, we describe some Arabic features available with . (It is a text we found on the net, from Persian studies web site of Texas .. That is if you have selected the Arabic languag