arabluatex.dtx 210 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155
  1. % \iffalse meta-comment
  2. % ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
  3. % Copyright (C) 2016--2018 Robert Alesssi
  4. %
  5. % Please send error reports and suggestions for improvements to Robert
  6. % Alessi <alessi@robertalessi.net>
  7. %
  8. % This program is free software: you can redistribute it and/or modify
  9. % it under the terms of the GNU General Public License as published by
  10. % the Free Software Foundation, either version 3 of the License, or
  11. % (at your option) any later version.
  12. %
  13. % This program is distributed in the hope that it will be useful, but
  14. % WITHOUT ANY WARRANTY; without even the implied warranty of
  15. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. % General Public License for more details.
  17. %
  18. % You should have received a copy of the GNU General Public License
  19. % along with this program. If not, see
  20. % <http://www.gnu.org/licenses/>.
  21. % \fi
  22. %
  23. % \iffalse
  24. %<*driver>
  25. \ProvidesFile{arabluatex.dtx}
  26. %</driver>
  27. %<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
  28. %<package-info>\ProvidesPackage{arabluatex}
  29. %<*package-info>
  30. [2018/10/09 v1.15 An ArabTeX-like interface for LuaLaTeX]
  31. %</package-info>
  32. %
  33. %<*driver>
  34. \documentclass{ltxdoc}
  35. \usepackage{filecontents}
  36. \begin{filecontents}{\jobname.bib}
  37. % This file is part of the `arabluatex' package
  38. %
  39. % ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
  40. % Copyright (C) 2016--2018 Robert Alessi
  41. %
  42. % Please send error reports and suggestions for improvements to Robert
  43. % Alessi <alessi@robertalessi.net>
  44. %
  45. % This program is free software: you can redistribute it and/or modify
  46. % it under the terms of the GNU General Public License as published by
  47. % the Free Software Foundation, either version 3 of the License, or
  48. % (at your option) any later version.
  49. %
  50. % This program is distributed in the hope that it will be useful, but
  51. % WITHOUT ANY WARRANTY; without even the implied warranty of
  52. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  53. % General Public License for more details.
  54. %
  55. % You should have received a copy of the GNU General Public License
  56. % along with this program. If not, see
  57. % <http://www.gnu.org/licenses/>.
  58. @software{pkg:arabtex,
  59. author = {Lagally, Klaus},
  60. maintainer = {Lagally, Klaus},
  61. title = {Arab\TeX},
  62. indextitle = {Arab\TeX},
  63. date = {2004-11-03},
  64. version = {4.00},
  65. url =
  66. {http://mirrors.ctan.org/language/arabic/arabtex/doc/html/arabtex.htm},
  67. subtitle = {Typesetting Arabic and Hebrew},
  68. titleaddon = {User Manual Version 4.00}
  69. }
  70. @software{pkg:amiri,
  71. author = {Hosny, Khaled},
  72. maintainer = {Hosny, Khaled},
  73. title = {Amiri},
  74. indextitle = {Amiri},
  75. date = {2017-12-13},
  76. url = {http://www.amirifont.org/}
  77. }
  78. @Book{Habash,
  79. author = {Habash, Nizar Y.},
  80. title = {Introduction to Arabic Natural Language Processing},
  81. year = 2010,
  82. series = {Synthesis Lectures on Human Language Technologies},
  83. number = 10,
  84. publisher = {Morgan \& Claypool Publishers},
  85. location = {Toronto}
  86. }
  87. @MVBook{Wright,
  88. author = {Wright, W. LL.D},
  89. title = {A Grammar of the Arabic Language},
  90. indextitle = {Grammar of the Arabic Language, A},
  91. year = 1896,
  92. editor = {Robertson Smith, W. and de Goeje, M. J.},
  93. editortype = {reviser},
  94. foreword = {Cachia, Pierre},
  95. edition = 3,
  96. volumes = 2,
  97. pagination = {none},
  98. publisher = {Librairie du Liban},
  99. location = {Beirut},
  100. annote = {New impression, 1996}
  101. }
  102. @Manual{din31635,
  103. label = {{DIN 31~635}},
  104. title = {Information and Documentation - Romanization of the
  105. Arabic Alphabet for Arabic, Ottoman-Turkish,
  106. Persian, Kurdish, Urdu and Pushto},
  107. date = {2011-07},
  108. url = {http://www.din.de}
  109. }
  110. @InProceedings{dmg,
  111. author = {Brockelmann, Carl and Fischer, August and Heffening,
  112. W. and Taeschner, Franz},
  113. shorttitle = {Die Transliteration der arabischen Schrift},
  114. title = {Die Transliteration der arabischen Schrift in ihrer
  115. Anwendung auf die Hauptliteratursprachen der
  116. islamischen Welt},
  117. indextitle = {Transliteration der arabischen Schrift, Die},
  118. year = 1935,
  119. booktitle = {Denkschrift dem 19. internationalen
  120. Orientalistenkongreß in Rom vorgelegt von der
  121. Transkriptionkommission der Deutschen
  122. Morgenländischen Gesellschaft},
  123. editor = {van Ronkel, Ph. S. and Spies, Otto},
  124. editortype = {collaborator},
  125. publisher = {Deutsche Morgenländische Gesellschaft, in Kommission
  126. bei F. A. Brockaus},
  127. url =
  128. {http://www.naher-osten.uni-muenchen.de/studium_lehre/werkzeugkasten/dmgtransliteration.pdf},
  129. location = {Leipzig}
  130. }
  131. @MVBook{Lane,
  132. author = {Lane, Edward William},
  133. title = {An Arabic-English lexicon},
  134. date = {1863/1893},
  135. indextitle = {Arabic-English Lexicon, An},
  136. volumes = 8,
  137. shorthand = {Lane, \emph{Lexicon}},
  138. pagination = {none},
  139. publisher = {Williams and Norgate},
  140. location = {London -- Edinburgh}
  141. }
  142. \end{filecontents}
  143. \usepackage[english]{babel}
  144. \usepackage{dox}
  145. \doxitem{Option}{option}{options}
  146. \usepackage{fontspec}
  147. \usepackage{hologo}
  148. \defaultfontfeatures{RawFeature={+liga}}
  149. \setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps},
  150. RawFeature={+mark;+ccmp;+ss05;+ss06}]
  151. \usepackage{newunicodechar}
  152. \newunicodechar{ǧ}{ǧ} % Old Standard does not include ǧ/Ǧ
  153. \newunicodechar{Ǧ}{Ǧ} %
  154. \usepackage{arabluatex}[2018/10/09]
  155. \usepackage[nopar]{quran}
  156. \usepackage[noindex]{nameauth}
  157. \usepackage{varioref}
  158. \usepackage{hyperxmp}
  159. \PassOptionsToPackage{pdfa}{hyperref}
  160. \usepackage{hypdoc}
  161. \usepackage{uri}
  162. \usepackage{bookmark}
  163. \usepackage{authblk}
  164. \hypersetup{unicode=true, colorlinks, allcolors=blue,
  165. linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The
  166. arabluatex package}, pdfcontactemail={alessi@robertalessi.net},
  167. pdfcontacturl={http://www.robertalessi.net/arabluatex},
  168. pdfcopyright={Copyright (C) 2016--2018 Robert Alessi
  169. <alessi@robertalessi.net>. This document is licensed under the
  170. Creative Commons Attribution-ShareAlike 4.0 International
  171. License. To view a copy of this license, visit
  172. http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
  173. Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.},
  174. pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode},
  175. pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={Arabic language,
  176. arabtex, luatex}}
  177. \usepackage[scale=1.5]{ccicons}
  178. \usepackage[lot]{multitoc}
  179. \usepackage{enumitem}
  180. \setlist{nosep}
  181. \setlist[itemize]{label=\textendash}
  182. \setlist[enumerate,1]{label=(\alph*)}
  183. \setlist[enumerate,2]{label=\roman*.}
  184. \newlist{enumabjad}{enumerate}{10}
  185. \setlist[enumabjad]{label={\abjad{\arabic*}}}
  186. \usepackage{multicol}
  187. \usepackage{cleveref}
  188. \crefname{footnote}{note}{notes}
  189. \usepackage{quoting}
  190. \quotingsetup{noorphans, rightmargin=0pt}
  191. \renewcommand*{\quotingfont}{\footnotesize}
  192. \usepackage[position=below]{caption}
  193. \usepackage{lineno}
  194. \usepackage{longtable}
  195. \usepackage{booktabs}
  196. \usepackage[defaultlines=3,all]{nowidow}
  197. \usepackage{needspace}
  198. \usepackage{tikz}
  199. \usepackage[breakable, skins, listings, xparse]{tcolorbox}
  200. \tcbset{colback=white, boxrule=.15mm, colframe=red!50!white, left=6mm,
  201. breakable}
  202. \DeclareTCBListing{arabluacode}{s O{}}{listing
  203. options={style=tcblatex, numbers=left, numberstyle=\tiny},
  204. IfBooleanTF={#1}{listing side text}{#2}}
  205. \DeclareTCBListing{arabluaverbatim}{}{listing options={style=tcblatex,
  206. numbers=left, numberstyle=\tiny}, listing only}
  207. \DeclareTotalTCBox{\arabluaverb}{v}{verbatim}{#1}
  208. \DeclareTotalTCBox{\arabluabox}{m}{left=0mm, right=0mm, top=0mm,
  209. bottom=0mm}{#1}
  210. \newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}}
  211. \usepackage{csquotes}
  212. \DeclareQuoteStyle{arabic}
  213. {\rmfamily\textquotedblright}{\rmfamily\textquotedblleft}
  214. {\rmfamily\textquoteright}{\rmfamily\textquoteleft}
  215. \usepackage[style=authoryear, indexing=cite]{biblatex}
  216. \DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}}
  217. \addbibresource{arabluatex.bib}
  218. \usepackage{etoc}
  219. \etocsettocdepth{paragraph}
  220. \newcommand{\altableofcontents}{%
  221. \begingroup
  222. \etocsetstyle{section}{}{}
  223. {\etocsavedsectiontocline{%
  224. \numberline{\etocnumber}\etocname}{\etocpage}}{}
  225. \etocsetstyle{subsection}{}{}
  226. {\etocsavedsubsectiontocline{%
  227. \numberline{\etocnumber}\etocname}{\etocpage}}{}%
  228. \etocsetstyle{subsubsection}{}{}
  229. {\etocsavedsubsubsectiontocline{%
  230. \numberline{\etocnumber}\etocname}{\etocpage}}{}%
  231. \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip
  232. 0pt plus 1fil\relax \nobreak}
  233. {\noindent\etocname{} \etocpage{} }{\par}%
  234. \etocmulticolstyle[2]{\section*{Contents}}
  235. \pdfbookmark[1]{Contents}{toc}
  236. \tableofcontents
  237. \endgroup}
  238. \EnableCrossrefs
  239. \RecordChanges
  240. \CodelineIndex
  241. \begin{document}
  242. \DocInput{arabluatex.dtx}
  243. \printbibliography[heading=bibintoc]
  244. \phantomsection
  245. \addcontentsline{toc}{section}{Change History}
  246. \PrintChanges
  247. \phantomsection
  248. \addcontentsline{toc}{section}{Index}
  249. \PrintIndex
  250. \end{document}
  251. %</driver>
  252. % \fi
  253. %
  254. % \CheckSum{899}
  255. %
  256. % \CharacterTable
  257. % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  258. % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  259. % Digits \0\1\2\3\4\5\6\7\8\9
  260. % Exclamation \! Double quote \" Hash (number) \#
  261. % Dollar \$ Percent \% Ampersand \&
  262. % Acute accent \' Left paren \( Right paren \)
  263. % Asterisk \* Plus \+ Comma \,
  264. % Minus \- Point \. Solidus \/
  265. % Colon \: Semicolon \; Less than \<
  266. % Equals \= Greater than \> Question mark \?
  267. % Commercial at \@ Left bracket \[ Backslash \\
  268. % Right bracket \] Circumflex \^ Underscore \_
  269. % Grave accent \` Left brace \{ Vertical bar \|
  270. % Right brace \} Tilde \~}
  271. %
  272. % \makeatletter
  273. % \let\org@changes@\changes@
  274. % \def\my@changes v#1.#2.#3\@nil{%
  275. % \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}%
  276. % }%
  277. % \newcommand*{\six@digits}[1]{%
  278. % \ifnum#1<100000 0\fi
  279. % \ifnum#1<10000 0\fi
  280. % \ifnum#1<1000 0\fi
  281. % \ifnum#1<100 0\fi
  282. % \two@digits{#1}%
  283. % }%
  284. % \renewcommand*{\changes@}[1]{%
  285. % \my@changes#1.\@nil
  286. % }%
  287. % \makeatother
  288. %
  289. % \changes{v1.0}{2016/03/29}{Initial release}
  290. % \changes{v1.0.1}{2016/03/31}{Minor update of the documentation}
  291. %
  292. % \DoNotIndex{\newcommand,\newenvironment,\renewcommand}
  293. % \DoNotIndex{\~,\AtBeginDocument,\bgroup,\csname}
  294. % \DoNotIndex{\DeclareDocumentCommand,\def,\edef,\egroup}
  295. % \DoNotIndex{\else,\endcsname,\endinput,\expandafter,\fi}
  296. % \DoNotIndex{\ifdef,\ifdefined,\ifx,\MessageBreak,\NeedsTeXFormat}
  297. % \DoNotIndex{\NewDocumentCommand,\newif,\PackageError,\PackageWarning}
  298. % \DoNotIndex{\relax,\RenewDocumentCommand,\string,\verb,\let}
  299. % \DoNotIndex{\enskip}
  300. %
  301. % \providecommand*{\url}{\texttt}
  302. % \GetFileInfo{arabluatex.dtx}
  303. %
  304. % \newcommand*{\NEWfeature}[1]{%
  305. % \hskip 1sp \marginpar{\small\sffamily\raggedright
  306. % New feature\\#1}}
  307. %
  308. % \title{\tcbox[colframe=black, enhanced, tikznode, drop lifted
  309. % shadow, colback=white, boxrule=.25mm]%
  310. % {The \textsf{arabluatex} package\\
  311. % \fileversion\ -- \filedate}}
  312. %
  313. % \author{Robert Alessi \\
  314. % \href{mailto:alessi@robertalessi.net?Subject=arabluatex package}%
  315. % {\texttt{alessi@robertalessi.net}}}
  316. % \date{}
  317. %
  318. % \maketitle
  319. % \footnotesize
  320. % \altableofcontents
  321. % \listoftables
  322. % \normalsize
  323. %
  324. % \begin{abstract}
  325. % This package provides for \hologo{LuaLaTeX} an Arab{\TeX}-like interface
  326. % to generate Arabic writing from an \textsc{ascii}
  327. % transliteration. It is particularly well-suited for complex
  328. % documents such as technical documents or critical editions where a
  329. % lot of left-to-right commands intertwine with Arabic
  330. % writing. \package{arabluatex} is able to process any Arab\TeX\
  331. % input notation. Its output can be set in the same modes of
  332. % vocalization as Arab\TeX, or in different roman
  333. % transliterations. It further allows many typographical
  334. % refinements. It will eventually interact with some other packages
  335. % yet to come to produce from \verb|.tex| source files, in addition
  336. % to printed books, \texttt{TEI xml} compliant critical editions
  337. % and/or lexicons that can be searched, analyzed and correlated in
  338. % various ways.
  339. % \end{abstract}
  340. %
  341. % \section*{License and disclamer}
  342. % \addcontentsline{toc}{section}{License and disclamer}
  343. % \subsection*{License applicable to the software}
  344. % \label{sec:license-software}
  345. %
  346. % \package{arabluatex} --- Processing Arab\TeX\ notation under Lua\LaTeX.\\
  347. % Copyright \textcopyright\ 2016--2018 Robert Alessi
  348. %
  349. % Please send error reports and suggestions for improvements to Robert
  350. % Alessi:
  351. % \begin{itemize}
  352. % \item email: \mailto[arabluatex package]{alessi@roberalessi.net}
  353. % \item website: \url{http://www.robertalessi.net/arabluatex}
  354. % \item development: \url{http://git.robertalessi.net/arabluatex}
  355. % \item comments, feature requests, bug reports:
  356. % \url{https://notabug.org/ralessi/arabluatex/issues}
  357. % \end{itemize}
  358. %
  359. % \marginpar{\texttt{gpl3+}}
  360. % This program is free software: you can redistribute it and/or modify
  361. % it under the terms of the GNU General Public License as published by
  362. % the Free Software Foundation, either version 3 of the License, or
  363. % (at your option) any later version.
  364. %
  365. % This program is distributed in the hope that it will be useful, but
  366. % WITHOUT ANY WARRANTY; without even the implied warranty of
  367. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  368. % General Public License for more details.
  369. %
  370. % You should have received a copy of the GNU General Public License
  371. % along with this program. If not, see
  372. % <http://www.gnu.org/licenses/>.
  373. %
  374. % This release of \package{arabluatex} consists of the following
  375. % source files:
  376. % \begin{itemize}
  377. % \item |arabluatex.ins|
  378. % \item |arabluatex.dtx|
  379. % \item |arabluatex.lua|
  380. % \item |arabluatex_voc.lua|
  381. % \item |arabluatex_fullvoc.lua|
  382. % \item |arabluatex_novoc.lua|
  383. % \item |arabluatex_trans.lua|
  384. % \item |arabluatex.el|
  385. % \end{itemize}
  386. %
  387. % \subsection*{License applicable to this document}
  388. % \label{sec:documentation-license}
  389. % Copyright \textcopyright\ 2016--2018 Robert Alessi
  390. %
  391. % \ccbysa\marginpar{\texttt{CC BY-SA 4.0}}
  392. % This document is licensed under the Creative Commons
  393. % Attribution-ShareAlike 4.0 International License. To view a copy of
  394. % this license, visit
  395. % \url{http://creativecommons.org/licenses/by-sa/4.0/} or send a
  396. % letter to Creative Commons, PO Box 1866, Mountain View, CA 94042,
  397. % USA.
  398. %
  399. % \section{Introduction}
  400. % In comparison to Prof. Lagally's outstanding Arab\TeX,\footnote{See
  401. % \url{http://ctan.org/pkg/arabtex}} Arab\hologo{LuaTeX} is at present
  402. % nothing more than a modest piece of software. Hopefully---if I may
  403. % say so---it will eventually provide all of its valuable qualities to
  404. % the \hologo{LuaLaTeX} users.
  405. %
  406. % \package{arabtex} dates back to 1992. As far as I know, it was then
  407. % the first and only way to typeset Arabic texts with \TeX\ and
  408. % \LaTeX. To achieve that, \package{arabtex} provided---and still
  409. % does---an Arabic font in \arb[trans]{\uc{nasxI}} style and a macro
  410. % package that defined its own input notation which was, as the author
  411. % stated, \enquote{both machine, and human, readable, and suited for
  412. % electronic transmission and e-mail
  413. % communication}.\footnote{\textcite[2]{pkg:arabtex}.} Even if the
  414. % same can be said about Unicode, Arab\TeX\ \textsc{ASCII} input
  415. % notation still surpasses Unicode input, in my opinion, when it comes
  416. % to typesetting complex documents, such as scientific documents or
  417. % critical editions where footnotes and other kind of annotations can
  418. % be particulary abundant. It must also be said that most text editors
  419. % have trouble in displaying Arabic script connected with preceding or
  420. % following \LaTeX\ commands: it often happens that commands seem
  421. % misplaced, not to mention punctuation marks, or opening or closing
  422. % braces, brackets or parentheses that are unexpectedly displayed in
  423. % the wrong direction. Of course, some text editors provide ways to
  424. % get around such difficulties by inserting invisible Unicode
  425. % characters, such as LEFT-TO-RIGHT or RIGHT-TO-LEFT MARKS
  426. % (\texttt{U+200E}, \texttt{U+200F}), RTL/LTR \enquote{embed}
  427. % characters (\texttt{U+202B}, \texttt{U+202A}) and RLO/LRO
  428. % \enquote{bidi-override} characters (\texttt{U+202E},
  429. % \texttt{U+202D}).\footnote{Gáspár Sinai's Yudit probably has the
  430. % best Unicode support. See \url{http://www.yudit.org}.} Nonetheless,
  431. % it remains that inserting all the time these invisible characters in
  432. % complex documents rapidly becomes confusing and cumbersome.
  433. %
  434. % The great advantage of Arab\TeX\ notation is that it is immune from
  435. % all these difficulties, let alone its being clear and
  436. % straightforward. One also must remember that computers are designed
  437. % to process code. Arab\TeX\ notation is a way of encoding Arabic
  438. % language, just as \TeX\ \enquote{mathematics mode} is a way of
  439. % processing code to display mathematics. As such, not only does it
  440. % allow greater control over typographical features, but it also can
  441. % be processed in several different ways: so without going into
  442. % details, depending on one's wishes, Arab\TeX\ input can be full
  443. % vocalized Arabic (\emph{scriptio plena}), vocalized Arabic or
  444. % non-vocalized Arabic (\emph{scriptio defectiva}); it further can be
  445. % transliterated into whichever romanization standard the user may
  446. % choose.
  447. %
  448. % \label{ref:tei-to-come}
  449. % But there may be more to be said on that point, as encoding Arabic
  450. % also naturally encourages the coder to vocalize the texts---without
  451. % compelling him to do so, of course. Accurate coding may even have
  452. % other virtuous effects. For instance, hyphens may be used for tying
  453. % particles or prefixes to words, or to mark inflectional endings, and
  454. % so forth. In other words, accurate coding produces accurate texts
  455. % that can stand to close grammatical scrutiny and to complex textual
  456. % searches as well.
  457. %
  458. % Having that in mind, I started \package{arabluatex}. With the help
  459. % of Lua, it will eventually interact with some other packages yet to
  460. % come to produce from \verb|.tex| source files, in addition to
  461. % printed books, \texttt{TEI xml} compliant critical editions and/or
  462. % lexicons that can be searched, analyzed and correlated in various
  463. % ways.
  464. %
  465. %\subsection{\package{arabluatex} is for \hologo{LuaLaTeX}}
  466. % It goes without saying that \package{arabluatex} requires
  467. % \hologo{LuaLaTeX}. \TeX\ and \LaTeX\ have \package{arabtex}, and
  468. % \hologo{XeLaTeX} has \package{arabxetex}. Both of them are much more
  469. % advanced than \package{arabluatex}, as they can process a number of
  470. % different languages,\footnote{\label{fn:arabtex-languages}To date,
  471. % both packages support Arabic, Maghribi, Urdu, Pashto, Sindhi,
  472. % Kashmiri, Uighuric and Old Malay; in addition to these,
  473. % \package{arabtex} also has a Hebrew mode, including Judeo-Arabic and
  474. % Yiddish.} whereas \package{arabluatex} can process only Arabic for
  475. % the time being. More languages will be included in future releases
  476. % of \package{arabluatex}.
  477. %
  478. % In comparison to \package{arabxetex}, \package{arabluatex} works in
  479. % a very different way. The former relies on the
  480. % \href{http://scripts.sil.org/TECkitIntro}{\texttt{TECkit}} engine
  481. % which converts Arab\TeX\ input on the fly into Unicode Arabic
  482. % script, whereas the latter passes Arab\TeX\ input on to a set of Lua
  483. % functions. At first, \LaTeX\ commands are taken care of in different
  484. % ways: some, as \cs{emph}, \cs{textbf} and the like are expected to
  485. % have Arabic text as arguments, while others, as \cs{LR}, for
  486. % \enquote{left-to-right text}, are not. Then, once what is Arabic is
  487. % carefully separated form what is not, it is processed by other Lua
  488. % functions which rely on different sets of correpondence tables to do
  489. % the actual conversion in accordance with one's wishes. Finally, Lua
  490. % returns to \TeX\ the converted strings---which may in turn contain
  491. % some other Arab\TeX\ input yet to be processed---for further
  492. % processing.
  493. %
  494. % \section{The basics of \package{arabluatex}}
  495. % \subsection{Activating \package{arabluatex}}
  496. % \package{arabluatex} is loaded the usual way:\\
  497. % \arabluaverb{\usepackage{arabluatex}}\\
  498. % The only requirement of \package{arabluatex} is \hologo{LuaLaTeX};
  499. % it will complain if the document is compiled with another
  500. % engine. That aside, \package{arabluatex} does not load packages such
  501. % as \package{polyglossia}. Although it can work with
  502. % \package{polyglossia}, it does not require it.
  503. %
  504. % \paragraph{Font setup}
  505. % Any Arabic font can be defined to be used with
  506. % \package{arabluatex}. For example, assuming that \package{fontspec}
  507. % is loaded, this line may be inserted in the preamble, just above the
  508. % line that loads \package{arabluatex}:
  509. % \arabluabox{\cs{newfontfamily}\cs{arabicfont}\marg{fontname}[Script=Arabic]}
  510. % \noindent where \meta{fontname} is the standard name of the Arabic
  511. % font to be used.
  512. %
  513. % By default, if no Arabic font is selected, \package{arabluatex} will
  514. % issue a warning message and attempt to load the Amiri
  515. % font\footnote{\textcite{pkg:amiri}.} like so:---\\
  516. % \arabluaverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic]}
  517. % \begin{quoting}
  518. % \textsc{Rem.} By default Amiri places the \arb[trans]{kasraT} in
  519. % combination with the \arb[trans]{ta^sdId} below the consonant,
  520. % like so: \arb{BBi}\,. That is correct, as at least in the oldest
  521. % manuscripts {\renewfontfamily\arabicfont{Amiri}[Script=Arabic,
  522. % RawFeature={+ss05}]\arb{BBi}} may stand for \arb{BBa} as
  523. % well as \arb{BBi}\,. See \textcite[i. 14 C--D]{Wright}. The placement
  524. % of the \arb[trans]{kasraT} above the consonant may be obtained by
  525. % selecting the |ss05| feature of the Amiri font, like
  526. % so:---\footnote{See the documentation of \package{amiri},
  527. % \textcite[6]{pkg:amiri}.}\\
  528. % \arabluaverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic,RawFeature={+ss05}]}
  529. %
  530. % Other Arabic fonts may behave differently.
  531. % \end{quoting}
  532. %
  533. % \subsection{Options}
  534. % \label{sec:options}
  535. % \package{arabluatex} may be loaded with five global options, the
  536. % first four of which are mutually exclusive and may be overriden at
  537. % any point of the document (see below \vref{sec:local-options}):
  538. %
  539. % \DescribeOption{voc}\hfill\arabluaverb{Default}\\ In this mode,
  540. % which is the one selected by default, every short vowel written
  541. % generates its corresponding diacritical mark: \arb[trans]{.dammaT}
  542. % (\arb{Bu}), \arb[trans]{fat.haT} (\arb{Ba}) and \arb[trans]{kasraT}
  543. % (\arb{Bi}). If a vowel is followed by |N|, viz. \meta{uN, aN, iN},
  544. % then the corresponding \arb[trans]{tanwIn} (\arb{BuN}, \arb{B|aN}\,,
  545. % \arb{TaN}, \arb{BaN_A} or \arb{BiN}) is generated. Finally, \meta{u,
  546. % a, i} at the commencement of a word indicate a \enquote{connective
  547. % \arb[trans]{'alif}\,} (\arb[trans]{'alifu 'l-wa.sli}), but |voc|
  548. % mode does not show the \arb[trans]{wa.slaT} above the
  549. % \arb[trans]{'alif}; instead, the accompanying vowel may be expressed
  550. % at the beginning of a sentence (\arb{u} \arb{a} \arb{i}).
  551. %
  552. % \DescribeOption{fullvoc}\\ \label{fullvoc-mode}In addition to what
  553. % the |voc| mode does, |fullvoc| expresses the \arb[trans]{sukUn} and
  554. % the \arb[trans]{wa.slaT}.
  555. %
  556. % \DescribeOption{novoc}\\ None of the diacritics is showed in |novoc|
  557. % mode, unless otherwise specified (see \enquote{quoting} technique
  558. % below \vref{sec:quoting}).
  559. %
  560. % \DescribeOption{trans} \\ \label{ref:describe-trans}This mode
  561. % transliterates the Arab\TeX\ input into one of the accepted
  562. % standards. At present, three standards are supported (see below
  563. % \vref{sec:transliteration} for more details):
  564. % \begin{description}
  565. % \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which is
  566. % selected by default;
  567. % \item[loc] \emph{Library of Congress};
  568. % \item[arabica] \emph{Arabica}.
  569. % \end{description}
  570. % More standards will be included in future releases of
  571. % \package{arabluatex}.
  572. %
  573. % \label{ref:export-global-opt}
  574. % \DescribeOption{export} |export|$=$|true|\verb+|+|false|
  575. % \hfill\arabluaverb{Default: false}\\ \label{export-mode}
  576. % \NEWfeature{v.1.13} This option acts as a named argument and does
  577. % not need a value as it defaults to |true| if it is used. It enables
  578. % \package{arabluatex} to produce a duplicate of the original |.tex|
  579. % source file in which all \textsc{ascii} strings are replaced with
  580. % Unicode equivalents. See below \vref{sec:arabtex2utf} for more
  581. % information.
  582. %
  583. % \subsubsection{Classic contrasted with modern typesetting of Arabic}
  584. % \label{sec:classic-modern-typesetting}
  585. % \NEWfeature{v.1.2} By default, \package{arabluatex} typesets Arabic
  586. % in a classic, traditional style the most prominent features of which
  587. % are the following:
  588. % \begin{itemize}
  589. % \item \enquote*{Classic} \arb[trans]{maddaT}: when
  590. % \arb[trans]{'alif} and \arb[trans]{hamzaT} accompanied by a simple
  591. % vowel or \arb[trans]{tanwIn} is preceded by an \arb[trans]{'alif} of
  592. % prolongation (\arb[voc]{BA}), then a mere \arb[trans]{hamzaT} is
  593. % written on the line, and a \arb[trans]{maddaT} is placed over the
  594. % \arb[trans]{'alif}, like so:---
  595. % \begin{quote}
  596. % |samA'uN| \arb[voc]{samA'uN} \arb[trans]{samA'uN}, |jA'a|
  597. % \arb[voc]{jA'a} \arb[trans]{jA'a}, |yatasA'alUna|
  598. % \arb[voc]{yatasA'alUna} \arb[trans]{yatasA'alUna}\footnote{Note
  599. % that in old mss. such forms as \arb[voc]{samA"'a"'a},
  600. % \arb[voc]{jA"'a"'a} are also found; see \textcite[i. 24
  601. % D]{Wright}.} (see \vpageref{ref:madda} for further details).
  602. % \end{quote}
  603. % \item The euphonic \arb[trans]{ta^sdId} is generated (see
  604. % \vpageref{ref:euphonic-tashdid}).
  605. % \item In |fullvoc| mode, the \arb[trans]{sukUn} is expressed.
  606. % \item In such words as \arb{^say'aN}, \arb{.zim'aN} and the like,
  607. % the \arb[trans]{hamzaT} alone is not written over the letter
  608. % \arb[trans]{yA'} with no diacritical points below as in
  609. % \arb{^sayy"'aN}, \arb{.zimy"'aN}, but over a horizontal stroke
  610. % placed in the continuation of the preceding letter. %
  611. % \iffalse
  612. %<*example>
  613. % \fi
  614. \begin{arabluacode}[text only]
  615. Please note that only few Arabic fonts provide such contrivances. In
  616. case this feature is not supported by some Arabic font, it is
  617. advisable to use \cs{SetArbEasy}.
  618. \end{arabluacode}
  619. % \iffalse
  620. %</example>
  621. % \fi
  622. % \end{itemize}
  623. %
  624. % \DescribeMacro{\SetArbEasy} \NEWfeature{v1.4.4} Such refinements as
  625. % \enquote*{classic} \arb[trans]{maddaT} may be discarded by the
  626. % \cs{SetArbEasy} command, either globally in the preamble or locally
  627. % at any point of the document. The difference between \cs{SetArbEasy}
  628. % and its \enquote*{starred} version
  629. % \DescribeMacro{\SetArbEasy*}\cs{SetArbEasy*} is that the former
  630. % keeps the \arb[trans]{sukUn} that is generated by the |fullvoc|
  631. % mode, while the latter further takes it away. Default
  632. % \enquote*{classic} rules may be set back at any point of the
  633. % document with the \DescribeMacro{\SetArbDflt}\cs{SetArbDflt}
  634. % command. \NEWfeature{v1.6} \DescribeMacro{\SetArbDflt*}Assimilation
  635. % rules laid on \vref{ref:assimilation} may also be applied by the
  636. % \enquote*{starred} version of this command \cs{SetArbDflt*} either
  637. % in the preamble or at any point of the document.\footnote{For an
  638. % example, see \vref{sec:poetry-example}.} Examples follow:---
  639. % \begin{enumerate}
  640. % \item \cs{SetArbDflt}:
  641. % \begin{enumerate}
  642. % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma
  643. % kitAba-hu fI nujUm-i 'l-samA'-i}
  644. % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma
  645. % kitAba-hu fI nujUm-i 'l-samA'-i}
  646. % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma
  647. % kitAba-hu fI nujUm-i 'l-samA'-i}
  648. % \end{enumerate}
  649. % \item \cs{SetArbDflt*}:
  650. % \begin{enumerate}\SetArbDflt*
  651. % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma
  652. % kitAba-hu fI nujUm-i 'l-samA'-i}
  653. % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma
  654. % kitAba-hu fI nujUm-i 'l-samA'-i}
  655. % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma
  656. % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt
  657. % \end{enumerate}
  658. % \item \cs{SetArbEasy}:
  659. % \begin{enumerate}\SetArbEasy
  660. % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma
  661. % kitAba-hu fI nujUm-i 'l-samA'-i}
  662. % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma
  663. % kitAba-hu fI nujUm-i 'l-samA'-i}
  664. % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma
  665. % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt
  666. % \end{enumerate}
  667. % \item \cs{SetArbEasy*}:
  668. % \begin{enumerate}\SetArbEasy*
  669. % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma
  670. % kitAba-hu fI nujUm-i 'l-samA'-i}
  671. % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma
  672. % kitAba-hu fI nujUm-i 'l-samA'-i}
  673. % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma
  674. % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt
  675. % \end{enumerate}
  676. % \end{enumerate}
  677. %
  678. % \iffalse
  679. %<*example>
  680. % \fi
  681. \begin{arabluacode}[text only]
  682. Please note that this document is typeset with \cs{SetArbDflt} throughout.
  683. \end{arabluacode}
  684. % \iffalse
  685. %</example>
  686. % \fi
  687. %
  688. %\subsection{Typing Arabic}
  689. % \DescribeMacro{\arb} Once \package{arabluatex} is loaded, a
  690. % \cs{arb}\marg{Arabic text} command is available for inserting Arabic
  691. % text in paragraphs, like so:---%
  692. % \iffalse
  693. %<*example>
  694. % \fi
  695. \begin{arabluacode}
  696. From \textcite[i. 1 A]{Wright}:--- Arabic, like Hebrew and
  697. Syriac, is written and read from right to left. The letters
  698. of the alphabet (\arb{.hurUf-u 'l-hijA'-i}, \arb{.hurUf-u
  699. 'l-tahajjI}, \arb{al-.hurUf-u 'l-hijA'iyyaT-u}, or
  700. \arb{.hurUf-u 'l-mu`jam-i}) are twenty-eight in number and
  701. are all consonants, though three of them are also used as
  702. vowels (see §~3).
  703. \end{arabluacode}
  704. % \iffalse
  705. %</example>
  706. % \fi
  707. %
  708. % \paragraph{Caveat}
  709. % For some reason, left-to-right paragraphs that start with Arabic
  710. % words lose their indentation. For the time being, this can be
  711. % circumvented by appending the \cs{indent} command at the
  712. % commencement of such paragraphs.
  713. %
  714. % \label{ref:ltr-lists}%
  715. % The same remark applies to left-to-right list environments: when
  716. % items start with Arabic words, the \cs{arb} command must be prefixed
  717. % with \cs{indent}. The following example comes from \textcite[i. 213
  718. % C]{Wright}:--- %
  719. % \iffalse
  720. %<*example>
  721. % \fi
  722. \begin{arabluacode}
  723. \begin{enumerate}[label=\Roman*., start=16]
  724. \item \indent\arb{fawA`ilu}*.
  725. \begin{enumerate}[label=\arabic*.]
  726. \item \indent\arb{fA`aluN}; as \arb{_hAtamuN} \emph{a
  727. signet-ring}, ...
  728. \end{enumerate}
  729. \end{enumerate}
  730. \end{arabluacode}
  731. % \iffalse
  732. %</example>
  733. % \fi
  734. %
  735. % \DescribeEnv{arab} Running paragraphs of Arabic text should rather
  736. % be placed inside an \emph{Arabic environment}
  737. %
  738. % \iffalse
  739. %<*example>
  740. % \fi
  741. \begin{arabluaverbatim}
  742. \begin{arab}
  743. [...]
  744. \end{arab}
  745. \end{arabluaverbatim}
  746. % \iffalse
  747. %</example>
  748. % \fi
  749. % like so:---\label{ref:juha-code}
  750. % \setquotestyle{arabic}
  751. % \iffalse
  752. %<*example>
  753. % \fi
  754. \begin{arabluacode}
  755. \begin{arab}
  756. 'at_A .sadIquN 'il_A ju.hA ya.tlubu min-hu .himAra-hu
  757. li-yarkaba-hu fI safraTiN qa.sIraTiN fa-qAla la-hu:
  758. \enquote{sawfa 'u`Idu-hu 'ilay-ka fI 'l-masA'-i
  759. wa-'adfa`u la-ka 'ujraTaN.} fa-qAla ju.hA:
  760. \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an
  761. 'u.haqqiqa la-ka ra.gbata-ka fa-'l-.himAr-u laysa hunA
  762. 'l-yawm-a.} wa-qabla 'an yutimma ju.hA kalAma-hu bada'a
  763. 'l-.himAr-u yanhaqu fI 'i.s.tabli-hi. fa-qAla la-hu
  764. .sadIqu-hu: \enquote{'innI 'asma`u .himAra-ka yA ju.hA
  765. yanhaqu.} fa-qAla la-hu ju.hA: \enquote{.garIbuN
  766. 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a
  767. wa-tuka_d_diba-nI?}
  768. \end{arab}
  769. \end{arabluacode}
  770. % \iffalse
  771. %</example>
  772. % \fi
  773. % \setquotestyle{english}
  774. %
  775. % \subsubsection{Local options}
  776. % \label{sec:local-options}
  777. % As seen above in \vref{sec:options}, \package{arabluatex} may be
  778. % loaded with four mutually exclusive global options: |voc| (which is
  779. % the default option), |fullvoc|, |novoc| and |trans|. Whatever choice
  780. % has been made globally, it may be overriden at any point of the
  781. % document, as the \cs{arb} command may take any of the |voc|,
  782. % |fullvoc|, |novoc| or |trans| modes as optional argument, like
  783. % so:---
  784. % \begin{itemize}
  785. % \item \DescribeOption{voc} \cs{arb}|[voc]|\marg{Arabic text};
  786. % \item \DescribeOption{fullvoc} \cs{arb}|[fullvoc]|\marg{Arabic text};
  787. % \item \DescribeOption{novoc} \cs{arb}|[novoc]|\marg{Arabic text};
  788. % \item \DescribeOption{trans} \cs{arb}|[trans]|\marg{Arabic text}.
  789. % \end{itemize}
  790. %
  791. % The same optional arguments may be passed to the environment |arab|:
  792. % one may have \cs{begin}|{arab}|\oarg{mode}|...|\cs{end}|{arab}|,
  793. % where \meta{mode} may be any of |voc|, |fullvoc|, |novoc| or
  794. % |trans|.
  795. %
  796. %\section{Standard Arab\TeX\ input}
  797. %\subsection{Consonants}
  798. % \Cref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for
  799. % all of the Arabic consonants.
  800. %
  801. % \needspace{7\baselineskip}
  802. % \newcommand{\dmg}[1]{%
  803. % \SetTranslitConvention{dmg}%
  804. % \arb[trans]{#1}}
  805. % \newcommand{\loc}[1]{%
  806. % \SetTranslitConvention{loc}%
  807. % \arb[trans]{#1}\SetTranslitConvention{dmg}}
  808. % \newcommand{\brill}[1]{%
  809. % \SetTranslitConvention{arabica}%
  810. % \arb[trans]{#1}\SetTranslitConvention{dmg}}
  811. % \begin{longtable}{lllll}
  812. % \bottomrule
  813. % \caption*{\Cref*{tab:arabtex-consonants}: Standard Arab\TeX\
  814. % (consonants)}
  815. % \endfoot
  816. % \captionlistentry{Arab\TeX\ consonants}\\[-1em]
  817. % \toprule
  818. % Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  819. % & Arab\TeX\ notation \\
  820. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  821. % \endfirsthead
  822. % \toprule
  823. % Letter & \multicolumn{3}{l}{Transliteration}
  824. % & Arab\TeX\ notation \\
  825. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  826. % \endhead \footnotetext{See below \vref{sec:transliteration}.}
  827. % \label{tab:arabtex-consonants}
  828. % \arb[voc]{'i 'a 'u}\footnote{See below, \emph{Rem{.} a.} For
  829. % \arb[trans]{'alif} as a consonant, see \textcite[i. 16
  830. % D]{Wright}. The \arb[trans]{hamzaT} itself is encoded \texttt{<'>}
  831. % and may be followed by either \meta{u, a} or \meta{i}. See below
  832. % \vref{ref:hamza}.} & \dmg{'u 'a 'i} &
  833. % \loc{|'u, |'a, |'i} & \brill{|'u, |'a, |'i} & |'u| or |'a| or |'i| \\
  834. % \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| \\
  835. % \pagebreak[1]
  836. % \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| \\
  837. % \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & \brill{_t} & |_t| \\
  838. % \arb[novoc]{j} & \dmg{j} & \loc{j} & \brill{j} & |^g| or |j| \\
  839. % \arb[novoc]{.h} & \dmg{.h} & \loc{.h} & \brill{.h} & |.h| \\
  840. % \arb[novoc]{x} & \dmg{x} & \loc{x} & \brill{x} & |_h| or |x|\\
  841. % \arb[novoc]{d} & \dmg{d} & \loc{d} & \brill{d} & |d| \\
  842. % \arb[novoc]{_d} & \dmg{_d} & \loc{_d} & \brill{_d} & |_d| \\
  843. % \arb[novoc]{r} & \dmg{r} & \loc{r} & \brill{r} & |r| \\
  844. % \arb[novoc]{z} & \dmg{z} & \loc{z} & \brill{z} & |z| \\
  845. % \arb[novoc]{s} & \dmg{s} & \loc{s} & \brill{s} & |s| \\
  846. % \arb[novoc]{^s} & \dmg{^s} & \loc{^s} & \brill{^s} & |^s| \\
  847. % \arb[novoc]{.s} & \dmg{.s} & \loc{.s} & \brill{.s} & |.s| \\
  848. % \arb[novoc]{.d} & \dmg{.d} & \loc{.d} & \brill{.d} & |.d| \\
  849. % \arb[novoc]{.t} & \dmg{.t} & \loc{.t} & \brill{.t} & |.t| \\
  850. % \arb[novoc]{.z} & \dmg{.z} & \loc{.z} & \brill{.z} & |.z| \\
  851. % \arb[novoc]{`} & \dmg{`} & \loc{`} & \brill{`} & |`| \\
  852. % \arb[novoc]{.g} & \dmg{.g} & \loc{.g} & \brill{.g} & |.g| \\
  853. % \arb[novoc]{f} & \dmg{f} & \loc{f} & \brill{f} & |f| \\
  854. % \arb[novoc]{q} & \dmg{q} & \loc{q} & \brill{q} & |q| \\
  855. % \arb[novoc]{k} & \dmg{k} & \loc{k} & \brill{k} & |k| \\
  856. % \arb[novoc]{l} & \dmg{l} & \loc{l} & \brill{l} & |l| \\
  857. % \arb[novoc]{m} & \dmg{m} & \loc{m} & \brill{m} & |m| \\
  858. % \arb[novoc]{n} & \dmg{n} & \loc{n} & \brill{n} & |n| \\
  859. % \arb[novoc]{h} & \dmg{h} & \loc{h} & \brill{h} & |h| \\
  860. % \arb[novoc]{w} & \dmg{w} & \loc{w} & \brill{w} & |w| \\
  861. % \arb[novoc]{y} & \dmg{y} & \loc{y} & \brill{y} & |y|\footnote{For
  862. % the letter \arb[novoc]{.y} with no diacritical points below, see
  863. % \emph{Rem{.} b.} below.} \\
  864. % \arb[novoc]{T} & \dmg{aT} & \loc{aT} & \brill{aT} & |T| \\
  865. % \end{longtable}
  866. % \begin{quoting}
  867. % \textsc{Rem.}~\emph{a.} Please note that in all cases of elision,
  868. % the \arb[trans]{'alifu 'l-wa.sli} is expressed only by the vowel
  869. % that accompanies the omitted \arb[trans]{hamzaT}: \meta{u, a, i}
  870. % as in |wa-inhazama| \arb[fullvoc]{wa-inhazama}
  871. % \arb[trans]{wa-inhazama}. For more details on the definite article
  872. % and the \arb[trans]{'alifu 'l-wa.sli} see
  873. % \vref{ref:definite-article}.
  874. %
  875. % That said, \arb{.A} as a consonant is actually the \emph{spiritus
  876. % lenis} of the Greeks and is distinguished by the
  877. % \arb[trans]{hamzaT} \arb[novoc]{(|"')} as it is shown in the above
  878. % table. However, the bare \arb[trans]{'alif} may also be encoded as
  879. % |.A| whether it be followed by a vowel or not, like so: |wa-.An|
  880. % \arb{wa-.An} \arb[trans]{wa-.An} (where the dot symbolizes the
  881. % absence of vowel), |wa-.Aan| \arb{wa-.Aan} \arb[trans]{wa-.Aan},
  882. % |wa-.Ain| \arb{wa-.Ain} \arb[trans]{wa-.Ain}.
  883. %
  884. % \textsc{Rem.}~\emph{b.} The letter \arb[novoc]{y} with two points
  885. % below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be
  886. % written without diacritical points as \arb[novoc]{Y}. When it is
  887. % used as a consonant, it is encoded |aY|, where |a| recalls the
  888. % \arb[trans]{fat.haT} placed above the preceding letter in
  889. % vocalized Arabic, like so: |qaY'uN| \arb{qaY'uN}
  890. % \arb[trans]{qaY'uN}, |^saY'uN| \arb{^saY'uN} \arb[trans]{^saY'uN},
  891. % |^saY'aN| \arb[trans]{^saY'aN} \arb{^saY'aN}.
  892. %
  893. % The same result may be achieved by encoding this letter as |.y|,
  894. % like so: |qa.y'uN| \arb{qa.y'uN} \arb[trans]{qa.y'uN}, |^sa.y'uN|
  895. % \arb{^sa.y'uN} \arb[trans]{^sa.y'uN}, |^sa.y'aN|
  896. % \arb[trans]{^sa.y'aN} \arb{^sa.y'aN}.
  897. % \end{quoting}
  898. %
  899. % \subsection{Additional characters}
  900. % \changes{v1.8.5}{2017/06/20}{Six additional Persian characters are
  901. % now available}
  902. % \NEWfeature{v1.8.5}\Cref{tab:arabtex-additional-characters} gives
  903. % the Arab\TeX\ equivalents for some additional Persian characters.
  904. %
  905. % \begin{longtable}{lllll}
  906. % \bottomrule
  907. % \caption*{\Cref*{tab:arabtex-additional-characters}: Standard
  908. % Arab\TeX\ (additional characters)}
  909. % \endfoot
  910. % \captionlistentry{Arab\TeX\ additional characters}\\[-1em]
  911. % \toprule
  912. % Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  913. % & Arab\TeX\ notation \\
  914. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica}\footnotemark
  915. % & \\ \midrule
  916. % \endfirsthead
  917. % \toprule
  918. % Letter & \multicolumn{3}{l}{Transliteration}
  919. % & Arab\TeX\ notation \\
  920. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  921. % \endhead
  922. % \addtocounter{footnote}{-1}
  923. % \footnotetext{See below \vref{sec:transliteration}.}
  924. % \stepcounter{footnote}
  925. % \footnotetext{The characters that are listed in this table are not
  926. % included in this standard. However, as \texttt{arabica} is based on
  927. % \texttt{dmg}, the \texttt{dmg} equivalents have been used here.}
  928. % \label{tab:arabtex-additional-characters}
  929. % \hskip-1em\arb[novoc]{p} & \dmg{p} & \loc{p} & \brill{p} & \verb|p| \\
  930. % \arb[novoc]{^c} & \dmg{^c} & \loc{^c} & \brill{^c} & \verb|^c| \\
  931. % \arb[novoc]{^z} & \dmg{^z} & \loc{^z} & \brill{^z} & \verb|^z| \\
  932. % \arb[novoc]{v}\footnote{\label{fn:not-in-dmg}This character is not found in
  933. % \textcite[2]{dmg}. It is taken from the \textcite{din31635} standard.} &
  934. % \dmg{v} & \loc{v} & \brill{v} & \verb|v| \\
  935. % \arb[novoc]{g} & \dmg{g} & \loc{g} & \brill{g} & \verb|g| \\
  936. % \arb[novoc]{^n}\footnote{See \cref{fn:not-in-dmg}.} & \dmg{^n} &
  937. % \loc{^n} & \brill{^n} & \verb|^n| \\
  938. % \end{longtable}
  939. % \begin{quoting}
  940. % \textsc{Rem.} The alveolar consonants \arb[novoc]{^c} and
  941. % \arb[novoc]{^z} are processed as solar letters by
  942. % \package{arabluatex}.
  943. % \end{quoting}
  944. %
  945. % \subsection{Vowels}
  946. % \subsubsection{Long vowels}
  947. % \Cref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for
  948. % the Arabic long vowels.
  949. %
  950. % \needspace{7\baselineskip}
  951. % \begin{longtable}{lllll}
  952. % \bottomrule
  953. % \caption*{\Cref*{tab:arabtex-long-vowels}: Standard Arab\TeX\ (long
  954. % vowels)}
  955. % \endfoot
  956. % \captionlistentry{Arab\TeX\ long vowels}\\[-1em]
  957. % \toprule
  958. % Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  959. % & Arab\TeX\ notation \\
  960. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  961. % \endfirsthead
  962. % \toprule
  963. % Letter & \multicolumn{3}{l}{Transliteration}
  964. % & Arab\TeX\ notation \\
  965. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  966. % \endhead \footnotetext{See below \vref{sec:transliteration}.}
  967. % \label{tab:arabtex-long-vowels}
  968. % \arb[novoc]{A} & \dmg{A} & \loc{A} & \brill{A} & \verb|A| \\
  969. % \arb[novoc]{U} & \dmg{U} & \loc{U} & \brill{U} & \verb|U| \\
  970. % \arb[novoc]{I} & \dmg{I} & \loc{I} & \brill{I} &
  971. % \verb|I|\footnote{For the letter \arb[novoc]{I} with no diacritical
  972. % points, see \emph{Rem{.} c.} below.} \\
  973. % \arb[novoc]{_A}\footnote{$=$ \arb[trans]{al-'alif-u 'l-maq.sUraT-u}.}
  974. % & \dmg{_A} & \loc{_A} & \brill{_A} & \verb|_A| or \verb|Y| \\
  975. % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & \verb|_a| \\
  976. % \arb[novoc]{B_u} & \dmg{B_u} & \loc{B_u} & \brill{B_u} & \verb|_u| \\
  977. % \arb[novoc]{B_i} & \dmg{B_i} & \loc{B_i} & \brill{B_i} & \verb|_i| \\
  978. % \end{longtable}
  979. %
  980. % \begin{quoting}
  981. % \textsc{Rem.}~\emph{a.} The long vowels \arb[trans]{A, U, I},
  982. % otherwise called \arb[trans]{.hurUf-u 'l-madd-i}, \emph{the
  983. % letters of prolongation}, involve the placing of the short vowels
  984. % \arb[trans]{Ba, Bu, Bi} before the letters \arb[novoc]{A},
  985. % \arb[novoc]{U}, \arb[novoc]{I} respectively. \package{arabluatex}
  986. % does that automatically in case any from |voc|, |fullvoc| or
  987. % |trans| modes is selected e.g. \arb[voc]{qAla} \arb[trans]{qAla},
  988. % \arb[voc]{qIla} \arb[trans]{qIla}, \arb[voc]{yaqUlu}
  989. % \arb[trans]{yaqUlu}.
  990. %
  991. % \textsc{Rem.}~\emph{b.} Defective writings, such as
  992. % \arb[novoc]{B_a}, \arb[trans]{al-'alif-u 'l-ma.h_dUfaT-u}, or
  993. % defective writings of \arb[trans]{B_u} and \arb[trans]{B_i} are
  994. % encoded |_a| |_u| and |_i| respectively, e.g. |_d_alika|
  995. % \arb[voc]{_d_alika}, |al-mal_a'ikaT-u| |'l-ra.hm_an-u|
  996. % \arb[voc]{al-mal_a'ikaT-u 'l-ra.hm_an-u}, |.hu_dayfaT-u| |bn-u|
  997. % |'l-yamAn_i| \arb[fullvoc]{.hu_dayfaT-u bn-u 'l-yamAn_i} for
  998. % \arb[trans]{\uc{.hu_dayfaT-u} bn-u 'l-\uc{yamAn_i}}, etc.
  999. %
  1000. % \textsc{Rem.}~\emph{c.} The letter \arb[novoc]{y} with two points
  1001. % below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be
  1002. % written without diacritical points as \arb[novoc]{Y}. When it is
  1003. % used as a long vowel, it is encoded |iY|, where |i| recalls the
  1004. % \arb[trans]{kasraT} placed below the preceding letter in vocalized
  1005. % Arabic, like so: |liY| \arb{liY} \arb[trans]{liY}, |yam^siY|
  1006. % \arb{yam^siY} \arb[trans]{yam^siY}.
  1007. % \end{quoting}
  1008. %
  1009. % \subsubsection{Short vowels}
  1010. % \Cref{tab:arabtex-short-vowels} gives the Arab\TeX\ equivalents for
  1011. % the Arabic short vowels.
  1012. %
  1013. % \begin{longtable}{lllll}
  1014. % \bottomrule
  1015. % \caption*{\Cref*{tab:arabtex-short-vowels}: Standard Arab\TeX\
  1016. % (short vowels)}
  1017. % \endfoot
  1018. % \captionlistentry{Arab\TeX\ short vowels}\\[-1em]
  1019. % \toprule
  1020. % Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  1021. % & Arab\TeX\ notation \\
  1022. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  1023. % \endfirsthead
  1024. % \toprule
  1025. % Letter & \multicolumn{3}{l}{Transliteration}
  1026. % & Arab\TeX\ notation \\
  1027. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  1028. % \endhead \footnotetext{See below \vref{sec:transliteration}.}
  1029. % \label{tab:arabtex-short-vowels}
  1030. % \arb[voc]{Ba} & \dmg{Ba} & \loc{Ba} & \brill{Ba} & \verb|a| \\
  1031. % \arb[voc]{Bu} & \dmg{Bu} & \loc{Bu} & \brill{Bu} & \verb|u| \\
  1032. % \arb[voc]{Bi} & \dmg{Bi} & \loc{Bi} & \brill{Bi} & \verb|i| \\
  1033. % \arb[voc]{BaN} & \dmg{BaN} & \loc{BaN} & \brill{BaN} & \verb|aN| \\
  1034. % \arb[voc]{BuN} & \dmg{BuN} & \loc{BuN} & \brill{BuN} & \verb|uN| \\
  1035. % \arb[voc]{BiN} & \dmg{BiN} & \loc{BiN} & \brill{BiN} & \verb|iN| \\
  1036. % \end{longtable}
  1037. %
  1038. % Whether Arabic texts be vocalized or not is essentially a matter of
  1039. % personal choice. So one may use |voc| mode and decide not to write
  1040. % vowels except at some particular places for disambiguation purposes,
  1041. % or use |novoc| mode, not write vowels---as |novoc| normally does not
  1042. % show them---except, again, where disambiguation is needed.\footnote{See
  1043. % below \vref{sec:quoting}.}
  1044. %
  1045. % \iffalse
  1046. %<*example>
  1047. % \fi
  1048. \begin{arabluacode}[text only]
  1049. However, it may be wise to always write the vowels, leaving to the
  1050. various modes provided by \package{arabluatex} to take care of
  1051. showing or not showing the vowels.
  1052. \end{arabluacode}
  1053. % \iffalse
  1054. %</example>
  1055. % \fi
  1056. %
  1057. % That said, there is no need to write the short vowels
  1058. % \arb[trans]{fat.haT}, \arb[trans]{.dammaT} or \arb[trans]{kasraT}
  1059. % except in the following cases:---
  1060. % \begin{itemize}
  1061. % \item at the commencement of a word, to indicate that a connective
  1062. % \arb[trans]{'alif} is needed, with the exception of the article (see
  1063. % below \vref{sec:quoting});
  1064. % \item when \package{arabluatex} needs to perform a contextual
  1065. % analysis to determine the carrier of the \arb[trans]{hamzaT};
  1066. % \item in the various transliteration modes, as vowels are always
  1067. % expressed in romanized Arabic.
  1068. % \end{itemize}
  1069. %
  1070. %\section{\package{arabluatex} in action}
  1071. %\subsection{The vowels and diphthongs}
  1072. % \paragraph{Short vowels} As said above, they are written \meta{a, u,
  1073. % i}:
  1074. % \begin{quote}
  1075. % |_halaqa| (or |xalaqa|) \arb[voc]{xalaqa} \arb[trans]{xalaqa},
  1076. % |^samsuN| \arb[voc]{^samsuN} \arb[trans]{^samsuN}, |karImuN|
  1077. % \arb[voc]{karImuN} \arb[trans]{\uc{karImuN}}.
  1078. %
  1079. % |bi-hi| \arb[voc]{bi-hi} \arb[trans]{bi-hi}, |'aqi.tuN|
  1080. % \arb[voc]{'aqi.tuN} \arb[trans]{'aqi.tuN}.
  1081. %
  1082. % |la-hu| \arb[voc]{la-hu} \arb[trans]{la-hu}, |.hujjaTuN|
  1083. % \arb[voc]{.hujjaTuN} \arb[trans]{.hujjaTuN}.
  1084. % \end{quote}
  1085. %
  1086. %\paragraph{Long vowels} They are written \meta{U, A, I}:
  1087. % \begin{quote}
  1088. % |qAla| \arb[voc]{qAla} \arb[trans]{qAla}, |bI`a| \arb[voc]{bI`a}
  1089. % \arb[trans]{bI`a}, |.tUruN| \arb[voc]{.tUruN} \arb[trans]{.tUruN},
  1090. % |.tInuN| \arb[voc]{.tInuN} \arb[trans]{.tInuN}, |murU'aTuN|
  1091. % \arb[voc]{murU'aTuN} \arb[trans]{murU'aTuN}.
  1092. % \end{quote}
  1093. %
  1094. % \paragraph{\texorpdfstring{\arb[trans]{'alif maq.sUraT}}{ʾalif
  1095. % maqṣūrah}} It is written \meta{\_A} or \meta{Y}:
  1096. % \begin{quote}
  1097. % |al-fat_A| \arb[voc]{al-fat_A} \arb[trans]{al-fat_A}, |al-maqh_A|
  1098. % \arb[voc]{al-maqh_A} \arb[trans]{al-maqh_A}, |'il_A|
  1099. % \arb[voc]{'il_A} \arb[trans]{'il_A}.
  1100. % \end{quote}
  1101. %
  1102. % \paragraph{\texorpdfstring{\arb[trans]{'alif} \emph{otiosum}}{ʾalif
  1103. % otiosum}} Said \arb[trans]{'alif-u 'l-wiqAyaT-i}, \enquote{the
  1104. % guarding \arb[trans]{'alif}}\,, after \arb[novoc]{U} at the end of a
  1105. % word, both when preceded by \arb[trans]{.dammaT} and by
  1106. % \arb[trans]{fat.haT} is written \meta{UA} or \meta{aW, aWA}:
  1107. % \begin{quote}
  1108. % |na.sarUA| \arb[voc]{na.sarUA} \arb[trans]{na.sarUA}, |katabUA|
  1109. % \arb[voc]{katabUA} \arb[trans]{katabUA}, |ya.gzUA|
  1110. % \arb[voc]{ya.gzUA} \arb[trans]{ya.gzUA}, |ramaW|
  1111. % \arb[fullvoc]{ramaW} \arb[trans]{ramaW}, |banaWA|
  1112. % \arb[fullvoc]{banaWA}, \arb[trans]{banaWA}.
  1113. % \end{quote}
  1114. %
  1115. % \paragraph{\texorpdfstring{\arb[trans]{'alif ma.h_dUfaT} and
  1116. % defective \arb[trans]{U, I}}{ʾalif maḥḏūfah and defective ū, ī}}
  1117. % They are written \meta{\_a, \_i \_u}:
  1118. % \begin{quote}
  1119. % |al-l_ah-u| \arb[voc]{al-l_ah-u} \arb[trans]{al-l_ah-u},
  1120. % |'il_ahuN| \arb[voc]{'il_ahuN} \arb[trans]{'il_ahuN}.
  1121. %
  1122. % |al-ra.hm_an-u| \arb[voc]{al-ra.hm_an-u}
  1123. % \arb[trans]{al-ra.hm_an-u}, |l_akin| \arb[voc]{l_akin}
  1124. % \arb[trans]{l_akin}, |h_ahunA| \arb[voc]{h_ahunA}
  1125. % \arb[trans]{h_ahunA}, |.hunayn-u| |bn-u| |'is.h_aq-a|
  1126. % \arb[voc]{.hunayn-u bn-u 'is.h_aq-a} \arb[trans]{\uc{.hunayn}-u
  1127. % bn-u \uc{'is.h_aq-a}}, |rabb_i| \arb[voc]{rabb_i}
  1128. % \arb[trans]{rabb_i}, |al-`A.s_i| \arb[voc]{al-`A.s_i}
  1129. % \arb[trans]{al-\uc{`A.s_i}}.
  1130. % \end{quote}
  1131. %
  1132. % \paragraph{\texorpdfstring{Silent
  1133. % \arb[novoc]{U}/\arb[novoc]{I}}{Silent ي/و}}
  1134. % Some words ending with \arb[voc]{BAT} are usually written
  1135. % \arb[voc]{BawT} or \arb[voc]{B_aUT} instead of \arb[voc]{BAT}: see
  1136. % \textcite[i. 12 A]{Wright}. \package{arabluatex} preserves that
  1137. % particular writing; the same applies to words ending in
  1138. % \arb[voc]{BayT} for \arb[voc]{BAT}\,. Long vowels \meta{U, I} shall
  1139. % receive no \arb[trans]{sukUn} after a \arb[trans]{'alif ma.h_dUfaT}
  1140. % and are discarded in |trans| mode:
  1141. % \begin{quote}
  1142. % |.hay_aUTuN| \arb[voc]{.hay_aUTuN} \arb[trans]{.hay_aUTuN},
  1143. % |.sal_aUTuN| \arb[voc]{.sal_aUTuN} \arb[trans]{.sal_aUTuN},
  1144. % |mi^sk_aUTuN| \arb[voc]{mi^sk_aUTuN} \arb[trans]{mi^s\-k_aUTuN},
  1145. % |tawr_aITuN| \arb[voc]{tawr_aITuN} \arb[trans]{tawr_aITuN}.
  1146. %
  1147. % And so also: |al-rib_aIT-u| \arb[voc]{al-rib_aIT-u}
  1148. % \arb[trans]{al-rib_aIT-u}.
  1149. % \end{quote}
  1150. %
  1151. % \paragraph{\texorpdfstring{\arb[trans]{\uc{`amruNU}}, and the silent
  1152. % \arb[novoc]{U}}{ʿAmrun, and the silent و}} To that name a silent
  1153. % \arb[novoc]{U} is added to distinguish it from
  1154. % \arb[trans]{\uc{`umar-u}}: see \textcite[i. 12 C]{Wright}. In no way
  1155. % this affects the sound of the \arb[trans]{tanwIn}, so it has to be
  1156. % discarded in |trans| mode:
  1157. % \begin{quote}
  1158. % |`amruNU| \arb[voc]{`amruNU} \arb[trans]{`amruNU}, |`amraNU|
  1159. % \arb[voc]{`amraNU} \arb[trans]{`amraNU}, |`amriNU|
  1160. % \arb[voc]{`amriNU} \arb[trans]{`amriNU}.
  1161. %
  1162. % When the \arb[trans]{tanwIn} falls away \parencite[i. 249
  1163. % B]{Wright}: |`amr-uU| |bn-u| |mu.hammadiN| \arb[fullvoc]{`amr-uU
  1164. % bnu mu.hammadiN} \arb[trans]{\uc{`amr-uU} bn-u
  1165. % \uc{mu.hammadiN}}, |mu.hammad-u| |bn-u| |`amr-iU| |bn-i|
  1166. % |_hAlidiN| \arb[fullvoc]{mu.hammad-u bn-u `amr-iU bn-i _hAlidiN}
  1167. % \arb[trans]{\uc{mu.hammad-u} bn-u \uc{`amr-iU} bn-i
  1168. % \uc{_hAlidiN}}.
  1169. %
  1170. % And so also: |al-rib_aUA| \arb[voc]{al-rib_aUA}
  1171. % \arb[trans]{al-rib_aUA}, |ribaNU| \arb[voc]{ribaNU}
  1172. % \arb[trans]{ribaNU}.
  1173. % \end{quote}
  1174. %
  1175. % \paragraph{\texorpdfstring{\arb[trans]{tanwIn}}{tanwīn}}
  1176. % The marks of doubled short vowels, \arb{BuN}, \arb{BaN}, \arb{BiN},
  1177. % are written \meta{uN, aN, iN} respectively. \package{arabluatex}
  1178. % deals with special cases, such as \arb{BaN} taking an \arb[novoc]{A}
  1179. % after all consonants except \arb[novoc]{T}, and \arb[trans]{tanwIn}
  1180. % preceding \arb[novoc]{Y} as in \arb[voc]{hudaN_A}, which is written
  1181. % \meta{aN\_A} or \meta{aNY}:
  1182. % \begin{quote}
  1183. % |mAluN| \arb[voc]{mAluN} \arb[trans]{mAluN}, |bAbaN|
  1184. % \arb[voc]{bAbaN} \arb[trans]{bAbaN}, |madInaTaN|
  1185. % \arb[voc]{madInaTaN} \arb[trans]{madInaTaN}, |bintiN|
  1186. % \arb[voc]{bintiN} \arb[trans]{bintiN} |maqhaN_A|
  1187. % \arb[voc]{maqhaN_A} \arb[trans]{maqhaN_A}, |fataNY|
  1188. % \arb[voc]{fataNY} \arb[trans]{fataNY}.
  1189. %
  1190. % \package{arabluatex} is aware of special orthographies: |^say'uN|
  1191. % \arb[voc]{^say'uN} \arb[trans]{^say'uN}, |^say'aN|
  1192. % \arb[voc]{^say'aN} \arb[trans]{^say'aN}, |^say'iN|
  1193. % \arb[voc]{^say'iN} \arb[trans]{^say'iN}.
  1194. % \end{quote}
  1195. %
  1196. % In some cases, it may be useful to mark the root form of defective
  1197. % words so as to produce a more accurate transliteration of ending
  1198. % \arb[trans]{tanwIn}. As seen above, \arb[trans]{tanwIn} preceding
  1199. % \arb[novoc]{_A} is written \meta{aN\_A} or \meta{aNY}. Such forms as
  1200. % \arb[voc]{qA.diNI} may likewise be written \meta{iNI}:---
  1201. % \begin{quote}
  1202. % |al-qA.dI| \arb[voc]{al-qA.dI} \arb[trans]{al-qA.dI}, |qA.diyaN|
  1203. % \arb[voc]{qA.diyaN} \arb[trans]{qA.diyaN}, |qA.diNI|
  1204. % \arb[voc]{qA.diNI} \arb[trans]{qA.diNI}.
  1205. % \end{quote}
  1206. %
  1207. % \subsection{Other orthographic signs}
  1208. % \paragraph{\texorpdfstring{\arb[trans]{tA' marbU.taT}}{tāʾ marbūṭah}}
  1209. % It is written \meta{T}:
  1210. % \begin{quote}
  1211. % |madInaTuN| \arb[voc]{madInaTuN} \arb[trans]{madInaTuN},
  1212. % |madInaTaN| \arb[voc]{madInaTaN} \arb[trans]{madInaTaN},
  1213. % |madInaTiN| \arb[voc]{madInaTiN} \arb[trans]{madInaTiN}.
  1214. % \end{quote}
  1215. %
  1216. % \paragraph{\texorpdfstring{\arb[trans]{hamzaT}}{hamzah}}
  1217. % \label{ref:hamza}It is written \meta{\texttt{'}}, its carrier being
  1218. % determined by contextual analysis. In case one wishes to bypass this
  1219. % mechanism, he can use the \enquote{quoting} feature that is
  1220. % described below in \vref{sec:quoting}.
  1221. % \begin{quote}
  1222. % \textbf{Initial \arb[trans]{hamzaT}}: |'asaduN| \arb[voc]{'asaduN}
  1223. % \arb[trans]{'asaduN}, |'u_htuN| \arb[voc]{'u_htuN}
  1224. % \arb[trans]{'u_htuN}, |'iqlIduN| \arb[voc]{'iqlIduN}
  1225. % \arb[trans]{'iqlIduN}, |'anna| \arb[voc]{'anna}
  1226. % \arb[trans]{'anna}, |'inna| \arb[voc]{'inna} \arb[trans]{'inna}.
  1227. %
  1228. % \label{ref:initial-hamza}
  1229. % \arb[trans]{hamzaT} followed by the long vowel \arb[novoc]{U} is
  1230. % encoded |'_U|: |'_Ul_A| \arb[voc]{'_Ul_A} \arb[trans]{'_Ul_A}, |'_UlU|
  1231. % \arb[voc]{'_UlU} \arb[trans]{'_UlU}, |'_UlA'ika|
  1232. % \arb[voc]{'_UlA'ika} \arb[trans]{'_UlA'ika}.
  1233. %
  1234. % \arb[trans]{hamzaT} followed by the long vowel \arb[novoc]{I} is
  1235. % encoded |'_I|: |'_ImAnuN| \arb[voc]{'_ImAnuN}
  1236. % \arb[trans]{'_ImA\-nuN}\footnote{For another way of encoding the
  1237. % initial \arb[trans]{hamzaT} followed by a long vowel, see the
  1238. % \arb[trans]{ta_hfIf-u 'l-hamzaT-i}\vpageref{ref:taxfif-hamzah}.}.
  1239. %
  1240. % \textbf{Middle \arb[trans]{hamzaT}}: |xA.ti'-Ina|
  1241. % \arb[voc]{xA.ti'-Ina} \arb[trans]{xA.ti'-Ina}, |ru'UsuN|
  1242. % \arb[voc]{ru'UsuN}, \arb[trans]{ru'UsuN}, |xa.tI'aTuN|
  1243. % \arb[voc]{xa.tI'aTuN} \arb[trans]{xa.tI'aTuN}, |su'ila|
  1244. % \arb[voc]{su'ila} \arb[trans]{su'ila}, |'as'ilaTuN|
  1245. % \arb[voc]{'as'i\-laTuN} \arb[trans]{'as'ilaTuN}, |mas'alaTuN|
  1246. % \arb[voc]{mas'alaTuN} \arb[trans]{mas'alaTuN}, |'as'alu|
  1247. % \arb[voc]{'as'alu} \arb[trans]{'as'alu}, |yatasA'alUna|
  1248. % \arb[voc]{yatasA'alUna}\linebreak \arb[trans]{yatasA'alUna},
  1249. % |murU'aTuN| \arb[voc]{murU'aTuN}, |taw'amuN|
  1250. % \arb[fullvoc]{taw'amuN} \arb[trans]{taw'amuN},
  1251. % \arb[trans]{murU'aTuN}, |ta'xIruN| \arb[fullvoc]{ta'xIruN}
  1252. % \arb[trans]{ta'xIruN}, |ta'ax|\allowbreak|xara|
  1253. % \arb[voc]{ta'axxara} \arb[trans]{ta'axxara}, |ji'tu-ka|
  1254. % \arb[voc]{ji'tu-ka} \arb[trans]{ji'tu-ka}, |qA'iluN|
  1255. % \arb[voc]{qA'iluN} \arb[trans]{qA'iluN}, |.hIna'i_diN|
  1256. % \arb[trans]{.hIna'i_diN} \arb[voc]{.hIna'i_diN}, |hay'aTuN|
  1257. % \arb[voc]{hay'aTuN} \arb[trans]{hay\-'aTuN}, |hay'AtuN|
  1258. % \arb[voc]{hay'AtuN} \arb[trans]{hay'AtuN}.
  1259. %
  1260. % From \textcite[i. 14 B]{Wright}:--- All consonants, whatsoever,
  1261. % not even \arb[trans]{'alif} \emph{hèmzatum} excepted, admit of
  1262. % being doubled and take \arb[trans]{ta^sdId}. Hence we speak and
  1263. % write |ra''AsuN| \arb[voc]{ra''AsuN} \arb[trans]{ra''AsuN},
  1264. % |sa''AluN| \arb[voc]{sa''AluN} \arb[trans]{sa''AluN}, |na''AjuN|
  1265. % \arb[voc]{na''AjuN} \arb[trans]{na''AjuN}.
  1266. %
  1267. % \textbf{Final \arb[trans]{hamzaT}}: |xa.ta'uN| \arb[voc]{xa.ta'uN}
  1268. % \arb[trans]{xa.ta'uN}, |xa.ta'aN| \arb[voc]{xa.ta'aN}
  1269. % \arb[trans]{xa.ta'aN}, |xa.ta'iN| \arb[voc]{xa.ta'iN}
  1270. % \arb[trans]{xa.ta'iN}, |'aqra'u| \arb[voc]{'aqra'u}
  1271. % \arb[trans]{'aqra'u}, |taqra'Ina| \arb[voc]{taqra'Ina}
  1272. % \arb[trans]{taqra'Ina}, |taqra'Una| \arb[voc]{taqra'Una}
  1273. % \arb[trans]{taqra'Una}, |yaqra'na| \arb[fullvoc]{yaqra'na}
  1274. % \arb[trans]{yaqra'na}, |yaxba'Ani| \arb[voc]{yaxba'Ani}
  1275. % \arb[trans]{yaxba'Ani}, |xaba'A| \arb[voc]{xaba'A}
  1276. % \arb[trans]{xaba'A}, |xubi'a| \arb[voc]{xubi'a}
  1277. % \arb[trans]{xubi'a}, |xubi'UA| \arb[voc]{xubi'UA}
  1278. % \arb[trans]{xubi'UA}, |jA'a| \arb[voc]{jA'a} \arb[trans]{jA'a},
  1279. % |ridA'uN| \arb[voc]{ridA'uN} \arb[trans]{ridA'uN}, |ridA'aN|
  1280. % \arb[voc]{ridA'aN} \arb[trans]{ridA'aN}, |jI'a| \arb[voc]{jI'a}
  1281. % \arb[trans]{jI'a}, |radI'iN| \arb[voc]{radI'iN}
  1282. % \arb[trans]{radI'iN}, |sU'uN| \arb[voc]{sU'uN} \arb[trans]{sU'uN},
  1283. % |.daw'uN| \arb[voc]{.daw'uN} \arb[trans]{.daw'uN}, |qay'iN|
  1284. % \arb[voc]{qay'iN} \arb[trans]{qay'iN}, |^sifA'I|
  1285. % \arb[voc]{^sifA'I} \arb[trans]{^sifA'I}, |man^sa'I|
  1286. % \arb[trans]{man^sa'I} \arb[voc]{man^sa'I}, |nisA'uN|
  1287. % \arb[voc]{nisA'uN} \arb[trans]{ni\-sA'uN}, |nisA'u-hu|
  1288. % \arb[voc]{nisA'u-hu} \arb[trans]{nisA'u-hu}, |nisA'i-hi|
  1289. % \arb[voc]{nisA'i-hi} \arb[trans]{nisA'i-hi}, |nisA'I|
  1290. % \arb[voc]{nisA'I} \arb[trans]{nisA'I}.
  1291. %
  1292. % |^say'uN| \arb[voc]{^say'uN} \arb[trans]{^say'uN}, |^say'aN|
  1293. % \arb[voc]{^say'aN} \arb[trans]{^say'aN}, |^say'iN|
  1294. % \arb[voc]{^say'iN} \arb[trans]{^say'iN}, |al-^say'-u|
  1295. % \arb[voc]{al-^say'-u} \arb[trans]{al-^say'-u}, |'a^syA'-u|
  1296. % \arb[voc]{'a^syA'-u} \arb[trans]{'a^syA'-u}, |'a^syA'-a|
  1297. % \arb[voc]{'a^syA'-a} \arb[trans]{'a^syA'-a}, |.zim'aN|
  1298. % \arb[voc]{.zim'aN} \arb[trans]{.zim'aN}, |radI'aN|
  1299. % \arb[voc]{radI'aN} \arb[trans]{radI'aN}.
  1300. %
  1301. % \label{ref:taxfif-hamzah}
  1302. % \textbf{\arb[trans]{ta_hfIf-u 'l-hamzaT-i}}: if the
  1303. % \arb[trans]{hamzaT} has \arb[trans]{jazmaT} and is preceded by
  1304. % \emph{\arb[trans]{'alif} hamzatum}, it must be changed into the
  1305. % letter of prolongation that is homogeneous with the preceding
  1306. % vowel; hence: |'a'mana| \arb[voc]{'a'mana} \arb[trans]{'a'mana},
  1307. % |'u'minu| \arb[voc]{'u'minu} \arb[trans]{'u'minu}, |'i'mAnuN|
  1308. % \arb[voc]{'i'mAnuN} \arb[trans]{'i'mAnuN}. For other possible ways
  1309. % of encoding such sequences, see \vpageref{ref:initial-hamza}
  1310. % (\arb[trans]{hamzaT} followed by \arb[novoc]{U} and \arb[novoc]{I})
  1311. % and the \arb[trans]{maddaT} \vpageref{ref:madda}.
  1312. %
  1313. % Imperatives of verbs that have the \arb[trans]{hamzaT} as the
  1314. % first radical are other cases of \arb[trans]{ta_hfIf-u
  1315. % 'l-hamzaT-i}: |i'sir| \arb[fullvoc]{i'sir} \arb[trans]{i'sir},
  1316. % |i'_dan| \arb[fullvoc]{i'_dan} \arb[trans]{i'_dan}, |u'mul|
  1317. % \arb[fullvoc]{u'mul} \arb[trans]{u'mul}. \package{arabluatex}
  1318. % also provides ways of encoding those words when the initial
  1319. % \arb[trans]{'alif} comes into \arb[trans]{wa.sl}, so as to make
  1320. % the \arb[trans]{'alif wa.sl} fall away when preceded by
  1321. % \arb[voc]{wa} or \arb[voc]{fa}: |wa-'sir| \arb[fullvoc]{wa-'sir}
  1322. % \arb[trans]{wa-'sir}, |fa-'_dan| \arb[fullvoc]{fa-'_dan}
  1323. % \arb[trans]{fa-'_dan}, |fa-'ti| \arb[fullvoc]{fa-'ti}
  1324. % \arb[trans]{fa-'ti}, |wa-'tamirUA| \arb[fullvoc]{wa-'tamirUA}
  1325. % \arb[trans]{wa-'tamirUA}; or be retained outside the imperative,
  1326. % as in |fa-i'tazarat| \arb[fullvoc]{fa-i'tazarat}
  1327. % \arb[trans]{fa-i'tazarat}, |ba`da| |i'tilAfiN| \arb[fullvoc]{ba`da
  1328. % i'tilAfiN} \arb[trans]{ba`da i'tilAfiN}.
  1329. %
  1330. % \textbf{The strange spelling of \arb[trans]{mi'aTuN}}: |mi'aTuN|
  1331. % \arb[voc]{mi'aTuN} \arb[trans]{mi'aTuN}, \linebreak |mi'atAni|
  1332. % \arb[voc]{mi'atAni} \arb[trans]{mi'atAni}, |mi'atayni|
  1333. % \arb[voc]{mi'atayni} \arb[trans]{mi'atayni}, |mi'Una|
  1334. % \arb[voc]{mi'Una} \arb[trans]{mi'Una}, |mi'AtuN|
  1335. % \arb[voc]{mi'AtuN} \arb[trans]{mi'AtuN}, |mi'aN_A|
  1336. % \arb[voc]{mi'aN_A} \arb[trans]{mi'aN_A}. Of course, the
  1337. % \enquote*{pipe} character can be used to prevent this rule from
  1338. % being applied (see \vref{sec:pipe}): \verb+mi'a|TuN+
  1339. % \arb[voc]{mi'a|TuN} \arb[trans]{mi'a|TuN}.
  1340. % \end{quote}
  1341. %
  1342. % \paragraph{\texorpdfstring{\arb[trans]{maddaT}}{maddah}}
  1343. % \label{ref:madda}At the beginning of a syllabe, \arb[trans]{'alif}
  1344. % with \arb[trans]{hamzaT} and \arb[trans]{fat.haT} (\arb[voc]{'a})
  1345. % followed by \arb[trans]{'alifu 'l-maddi} (\arb[trans]{'alif} of
  1346. % prolongation) or \arb[trans]{'alif} with \arb[trans]{hamzaT} and
  1347. % \arb[trans]{jazmaT} (\arb[voc]{a"'"}) are both represented in
  1348. % writing \arb[trans]{'alif} with \arb[trans]{maddaT}: \arb[voc]{A"'}
  1349. % \parencite[see][i. 25 A--B]{Wright}.
  1350. %
  1351. % \iffalse
  1352. %<*example>
  1353. % \fi
  1354. \begin{arabluacode}[text only]
  1355. Hence one should keep to this distinction and encode |'a'kulu|
  1356. \arb[voc]{'a'kulu} \arb[trans]{'a'kulu} and |'AkiluN|
  1357. \arb[voc]{'AkiluN} \arb[trans]{'AkiluN} respectively.
  1358. \end{arabluacode}
  1359. % \iffalse
  1360. %</example>
  1361. % \fi
  1362. %
  1363. % \package{arabluatex} otherwise determines \arb[trans]{al-'alif-u
  1364. % 'l-mamdUdaT-u} by context analysis.
  1365. %
  1366. % \begin{quote}
  1367. % |'is'AduN| \arb[voc]{'is'AduN} \arb[trans]{'is'AduN}, |'AkilUna|
  1368. % \arb[voc]{'AkilUna} \arb[trans]{'AkilUna}, |'a'mannA|
  1369. % \arb[voc]{'a'mannA} \arb[trans]{'a'mannA}, |al-qur'An-u|
  1370. % \arb[voc]{al-qur'An-u} \arb[trans]{al-qur'An-u}.
  1371. %
  1372. % |jA'a| \arb[voc]{jA'a} \arb[trans]{jA'a}, |yatasA'alUna|
  1373. % \arb[voc]{yatasA'alUna} \arb[trans]{yatasA'alUna}, |ridA'uN|
  1374. % \arb[voc]{ridA'uN} \arb[trans]{ridA'uN}, |xaba'A|
  1375. % \arb[voc]{xaba'A} \arb[trans]{xaba'A}, |yaxba'Ani|
  1376. % \arb[voc]{yaxba'Ani} \arb[trans]{yaxba'Ani}.
  1377. % \end{quote}
  1378. %
  1379. % \paragraph{\texorpdfstring{\arb[trans]{^saddaT}}{šaddah}}
  1380. % \arb[trans]{ta^sdId} is either \emph{necessary} or \emph{euphonic}.
  1381. %
  1382. % \subparagraph{The necessary \arb[trans]{ta^sdId}}
  1383. % \label{ref:necessary-tashdid}always follows a vowel, whether short
  1384. % or long \parencite[see][i. 15 A--B]{Wright}. It is encoded in
  1385. % writing the consonant that carries it twice:
  1386. % \begin{quote}
  1387. % |`allaqa| \arb[voc]{`allaqa} \arb[trans]{`allaqa}, |mAdduN|
  1388. % \arb[voc]{mAdduN} \arb[trans]{mAdduN}, |'ammara|
  1389. % \arb[voc]{'ammara} \arb[trans]{ammara}, |murruN| \arb[voc]{murruN}
  1390. % \arb[trans]{murruN}.
  1391. % \end{quote}
  1392. %
  1393. % \subparagraph{The euphonic \arb[trans]{ta^sdId}}
  1394. % \label{ref:euphonic-tashdid} always follows a vowelless consonant
  1395. % which is passed over in pronunciation and assimilated to a following
  1396. % consonant. It may be found \parencite[i. 15 B--16 C]{Wright}:---
  1397. % \begin{enumerate}
  1398. % \item With the \emph{solar} letters \arb[novoc]{t}, \arb[novoc]{_t},
  1399. % \arb[novoc]{d}, \arb[novoc]{_d}, \arb[novoc]{r}, \arb[novoc]{z},
  1400. % \arb[novoc]{s}, \arb[novoc]{^s}, \arb[novoc]{.s}, \arb[novoc]{.d},
  1401. % \arb[novoc]{.t}, \arb[novoc]{.z}, \arb[novoc]{l}, \arb[novoc]{n},
  1402. % after the article \arb[fullvoc]{al-}:---
  1403. % \iffalse
  1404. %<*example>
  1405. % \fi
  1406. \begin{arabluacode}[text only]
  1407. Unlike \package{arabtex} and \package{arabxetex},
  1408. \package{arabluatex} \emph{never requires the solar letter to be
  1409. written twice}, as it automatically generates the euphonic
  1410. \arb[trans]{ta^sdId} above the letter that carries it, whether the
  1411. article be written in the assimilated form or not, e.g. |al-^sams-u|
  1412. \arb[voc]{al-^sams-u} \arb[trans]{al-^sams-u}, or |a^s-^sams-u|
  1413. \arb[voc]{a^s-^sams-u} \arb[trans]{a^s-^sams-u}.
  1414. \end{arabluacode}
  1415. % \iffalse
  1416. %</example>
  1417. % \fi
  1418. % \begin{quote}
  1419. % |al-tamr-u| \arb[voc]{al-tamr-u} \arb[trans]{al-tamr-u},
  1420. % |al-ra.hm_an-u| \arb[voc]{al-ra.hm_an-u}
  1421. % \arb[trans]{al-ra.hm_an-u}, |al-.zulm-u| \arb[voc]{al-.zulm-u}
  1422. % \arb[trans]{al-.zulm-u}, |al-lu.gaT-u| \arb[voc]{al-lu.gaT-u}
  1423. % \arb[trans]{al-lu.gaT-u}.
  1424. % \end{quote}
  1425. % \item \label{ref:assimilation} With the letters \arb[novoc]{r},
  1426. % \arb[novoc]{l}, \arb[novoc]{m}, \arb[novoc]{w}, \arb[novoc]{y}
  1427. % after \arb[voc]{n} with \arb[trans]{jazmaT}, and also after the
  1428. % \arb[trans]{tanwIn}:---
  1429. % \begin{quote}\SetArbDflt*
  1430. % Note the absence of \arb[trans]{sukUn} above the passed over
  1431. % \arb[novoc]{n} in the following examples, each of which is
  1432. % accompanied by a consistent transliteration: |min rabbi-hi|
  1433. % \arb[fullvoc]{min rabbi-hi}, \arb[trans]{min rabbi-hi},
  1434. % |min| |layliN| \arb[fullvoc]{min layliN} \arb[trans]{min layliN},
  1435. % |'an| |yaqtula| \arb[fullvoc]{'an yaqtula} \arb[trans]{'an yaqtula}.
  1436. %
  1437. % With \arb[trans]{tanwIn}: |kitAbuN| |mubInuN| \arb[voc]{kitAbuN
  1438. % mubInuN} \arb[trans]{kitAbuN mubInuN}.\SetArbDflt
  1439. % \end{quote}
  1440. % \iffalse
  1441. %<*example>
  1442. % \fi
  1443. \begin{arabluacode}[text only]
  1444. \textsc{Rem.} This particular feature must be put into operation by
  1445. the \cs{SetArbDflt*} command explicitly. See above
  1446. \vref{sec:classic-modern-typesetting} for further details. Other
  1447. kinds of assimilations, including the various cases of
  1448. \arb[trans]{'id.gAm}, will be included in \package{arabluatex}
  1449. gradually.
  1450. \end{arabluacode}
  1451. % \iffalse
  1452. %</example>
  1453. % \fi
  1454. % \item With the letter \arb[voc]{t} after the dentals
  1455. % \arb[novoc]{_t}, \arb[novoc]{d}, \arb[novoc]{_d}, \arb[novoc]{.d},
  1456. % \arb[novoc]{.t}, \arb[novoc]{.z} in certain parts of the verb:
  1457. % this kind of assimilation, e.g. \arb[voc]{labi_tttu} for
  1458. % \arb[voc]{labi_ttu} \arb[trans]{labi_ttu}, will be discarded here,
  1459. % as it is largely condemned by the
  1460. % grammarians \parencite[see][i. 16 B--C]{Wright}.
  1461. % \end{enumerate}
  1462. %
  1463. % \paragraph{\texorpdfstring{The definite article and the
  1464. % \arb[trans]{'alif-u 'l-wa.sl-i}}{The definite article and the ʾalifu
  1465. % 'l-waṣli}}
  1466. % \label{ref:definite-article}
  1467. % At the beginning of a sentence, \arb[fullvoc]{"a} is never written,
  1468. % as \arb[fullvoc]{'l-.hamd-u li-ll_ah-i}; instead, to indicate that
  1469. % the \arb[trans]{'alif} is a connective \arb[trans]{'alif}
  1470. % (\arb[trans]{'alif-u 'l-wa.sl-i}), the \arb[trans]{hamzaT} is
  1471. % omitted and only its accompanying vowel is expressed:
  1472. % \begin{quote}
  1473. % |al-.hamd-u| |li-l-l_ah-i| \arb[fullvoc]{al-.hamd-u li-l-l_ah-i}
  1474. % \arb[trans]{al-.hamd-u li-l-l_ah-i}.
  1475. % \end{quote}
  1476. % As said above on \cpageref{fullvoc-mode}, |fullvoc| is the mode
  1477. % in which \package{arabluatex} expresses the \arb[trans]{sukUn} and
  1478. % the \arb[trans]{wa.slaT}. \package{arabluatex} will take care of
  1479. % doing that automatically provided that the vowel which is to be
  1480. % absorbed by the final vowel of the preceding word be properly
  1481. % encoded, like so:---
  1482. % \begin{enumerate}
  1483. % \item Definite article at the beginning of a sentence is encoded\\
  1484. % \arabluaverb{al-}, or \arabluaverb{a<solar letter>-}\\ if one
  1485. % wishes to mark the assimilation---which is in no way required, as
  1486. % \package{arabulatex} will detect all cases of assimilation.
  1487. % \item Definite article inside sentences is encoded\\ \arabluaverb{'l-}
  1488. % or \arabluaverb{'<solar letter>-}.
  1489. % \item In all remaining cases of elision, the \arb[trans]{'alifu
  1490. % 'l-wa.sli} is expressed by the vowel that accompanies the omitted
  1491. % \arb[trans]{hamzaT}: \meta{u, a, i}.
  1492. % \end{enumerate}
  1493. % \begin{quote}
  1494. % \textbf{Article}: |bAb-u| |'l-madrasaT-i| \arb[fullvoc]{bAb-u
  1495. % 'l-madrasaT-i} \arb[trans]{bAb-u 'l-madrasaT-i},
  1496. % |al-maqA|\allowbreak|laT-u| |'l-'_Ul_A| \arb[fullvoc]{al-maqAlaT-u
  1497. % 'l-'_Ul_A} \arb[trans]{al-maqAlaT-u 'l-'_Ul_A}, |al-lu.gaT-u|
  1498. % |'l-`ara|\allowbreak|biyyaT-u| \arb[fullvoc]{al-lu.gaT-u
  1499. % 'l-`arabiyyaT-u} \arb[trans]{al-lu.gaT-u 'l-`arabiyyaT-u}, |fI|
  1500. % |.sinA`aT-i| |'l-.tibb-i| \arb[fullvoc]{fI .sinA`aT-i 'l-.tibb-i}
  1501. % \arb[trans]{fI .sinA`aT-i 'l-.tibb-i}, |'il_A| |'l-intiqA.d-i|
  1502. % \arb[fullvoc]{'il_A 'l-intiqA.d-i} \arb[trans]{'il_A
  1503. % 'l-intiqA.d-i}, |fI| |'l-ibtidA'-i| \arb[fullvoc]{fI 'l-ibtidA'-i}
  1504. % \arb[trans]{fI 'l-ibtidA'-i}, |'abU| |'l-wazIr-i|
  1505. % \arb[fullvoc]{'abU 'l-wazIr-i} \arb[trans]{'abU 'l-wazIr-i},
  1506. % |fa-lammA| |ra'aW| |'l-najm-a| \arb[fullvoc]{fa-lammA ra'aW
  1507. % 'l-najm-a} \arb[trans]{fa-lammA ra'aW 'l-najm-a}.
  1508. %
  1509. % \textbf{Particles}:---
  1510. % \begin{enumerate}
  1511. % \item \arb[trans]{li-}: \arb[trans]{'alif-u 'l-wa.sl-i} is omitted
  1512. % in the article \arb[fullvoc]{al} when it is preceded by the
  1513. % preposition \arb[fullvoc]{li}: |li-l-rajul-i|
  1514. % \arb[fullvoc]{li-l-rajul-i}
  1515. % \arb[trans]{li-l-rajul-i}.\\
  1516. % If the first letter of the noun be \arb[novoc]{l}, then the
  1517. % \arb[novoc]{l} of the article also falls away, but
  1518. % \package{arabluatex} is aware of that: |li-l-laylaT-i|
  1519. % \arb[fullvoc]{li-l-laylaT-i} \arb[trans]{li-l-laylaT-i}.
  1520. % \item \arb[trans]{la-}: the same applies to the affirmative
  1521. % particle \arb[fullvoc]{la}: |la-l-.haqq-u|
  1522. % \arb[fullvoc]{la-l-.haqq-u} \arb[trans]{la-l-.haqq-u}.
  1523. % \item With the other particles, \arb[trans]{'alif-u 'l-wa.sl-i} is
  1524. % expressed: |fI| |'l-madIna|\allowbreak|T-i| \arb[fullvoc]{fI
  1525. % 'l-madInaT-i} \arb[trans]{fI 'l-madInaT-i}, |wa-'l-rajul-u|
  1526. % \arb[fullvoc]{wa-'l-rajul-u} \arb[trans]{wa-'l-rajul-u},
  1527. % |bi-'l-|\allowbreak|qalam-i| \arb[fullvoc]{bi-'l-qalam-i}
  1528. % \arb[trans]{bi-'l-qalam-i}, |bi-'l-ru`b-i|
  1529. % \arb[fullvoc]{bi-'l-ru`b-i} \arb[trans]{bi-'l-ru`b-i}.
  1530. % \end{enumerate}
  1531. %
  1532. % \textbf{Perfect active, imperative, nomen actionis}: |qAla|
  1533. % |isma`| \arb[fullvoc]{qAla isma`} \arb[trans]{qAla isma`}, |qAla|
  1534. % |uqtul| \arb[fullvoc]{qAla uqtul} \arb[trans]{qAla uqtul}, |huwa|
  1535. % |inhazama| \arb[fullvoc]{huwa inhazama} \arb[trans]{huwa
  1536. % inhazama}, |wa-ustu`mila| \arb[fullvoc]{wa-ustu`mila}
  1537. % \arb[trans]{wa-ustu`mila}, |qad-i| |in.sarafa| \arb[fullvoc]{qadi
  1538. % in.sarafa} \arb[trans]{qadi in.sarafa}, |al-iqtidAr-u|
  1539. % \arb[fullvoc]{al-iqtidAr-u} \arb[trans]{al-iqtidAr-u}, |'il_A|
  1540. % |'l-inti|\allowbreak|qA.d-i| \arb[fullvoc]{'il_A 'l-intiqA.d-i}
  1541. % \arb[trans]{'il_A 'l-intiqA.d-i}, |law| |istaqbala|
  1542. % \arb[fullvoc]{law istaqbala} \arb[trans]{law istaqbala}.
  1543. %
  1544. % \textbf{Other cases}: |'awi| |ismu-hu| \arb[fullvoc]{'awi ismu-hu}
  1545. % \arb[trans]{'awi ismu-hu}, |zayduN| |ibn-u| |`amriNU|
  1546. % \arb[fullvoc]{\uc{z}ayduN ibn-u \uc{`amriNU}}
  1547. % \arb[trans]{\uc{z}ayduN ibn-u
  1548. % \uc{`amriNU}},\footnote{\label{fn:zayd-is-son}%
  1549. % \enquote{\arb[trans]{\uc{z}ayd} is the son of
  1550. % \arb[trans]{\uc{`a}mr}}: the second noun is not in apposition to
  1551. % the first, but forms part of the predicate. Hence \arb[voc]{zayduN
  1552. % ibn-u `amriNU} and not \arb[voc]{zayd-u bn-u `amriNU},
  1553. % \enquote{Zayd, son of ʿAmr}.} |`umar-u| |ibn-u| |'l-_ha.t.tAb-i|
  1554. % \arb[fullvoc]{\uc{`umar}-u ibn-u \uc{'l-_ha.t.tAb-i}}
  1555. % \arb[trans]{\uc{`umar}-u ibn-u
  1556. % \uc{'l-_ha.t.tAb-i}},\footnote{\enquote{\arb[trans]{\uc{`umar}}
  1557. % is the son of \arb[trans]{\uc{al-_ha.t.tAb}}} (see
  1558. % \vref{fn:zayd-is-son}).} |imru'-u| |'l-qays-i|
  1559. % \arb[fullvoc]{imru'-u 'l-qays-i} \arb[trans]{\uc{i}mru'-u
  1560. % \uc{'l-qays-i}}, |la-aymun-u| |'l-l_ah-i|
  1561. % \arb[fullvoc]{la-aymun-u 'l-l_ah-i} \arb[trans]{la-aymun-u
  1562. % 'l-l_ah-i}.
  1563. % \end{quote}
  1564. %
  1565. % \subparagraph{\arb[trans]{'alif-u 'l-wa.sl-i} preceded by a long
  1566. % vowel} The long vowel preceding the connective \arb[trans]{'alif} is
  1567. % shortened in pronunciation \parencite[i. 21 B--D]{Wright}. This does
  1568. % not appear in the Arabic script, but \package{arabluatex} takes it
  1569. % into account in some transliteration standards:---
  1570. % \begin{quote}
  1571. % |fI| |'l-nAs-i| \arb[fullvoc]{fI 'l-nAs-i} \arb[trans]{fI
  1572. % 'l-nAs-i}, |'abU| |'l-wazIr-i| \arb[fullvoc]{'abU 'l-wazIr-i}
  1573. % \arb[trans]{'abU 'l-wazIr-i}, |fI| |'l-ibtidA'-i| \arb[fullvoc]{fI
  1574. % 'l-ibtidA'-i} \arb[trans]{fI 'l-ibtidA'-i}, |_dU 'l-i`lAl-i|
  1575. % \arb[fullvoc]{_dU 'l-i`lAl-i} \arb[trans]{_dU 'l-i`lAl-i},
  1576. % |maqh_A| |'l-'amIr-i| \arb[voc]{maqh_A 'l-'amIr-i}
  1577. % \arb[trans]{maqh_A 'l-'amIr-i}.
  1578. % \end{quote}
  1579. %
  1580. % \subparagraph{\arb[trans]{'alif-u 'l-wa.sl-i} preceded by a diphthong}
  1581. % \label{sec:diphthong-alif}
  1582. % The diphthong is resolved into two simple vowels \parencite[i. 21
  1583. % D--22 A]{Wright} viz. \emph{ay}~→ \emph{\u{a}\u{i}} and \emph{aw}~→
  1584. % \emph{\u{a}\u{u}}. \package{arabluatex} detects the cases in which
  1585. % this rule applies:---
  1586. % \begin{quote}
  1587. % |fI| |`aynay| |'l-malik-i| \arb[fullvoc]{fI `aynay 'l-malik-i}
  1588. % \arb[trans]{fI `aynay 'l-malik-i}, |ix^say|
  1589. % |'l-qaw|\allowbreak|m-a| \arb[fullvoc]{ix^say 'l-qawm-a}
  1590. % \arb[trans]{ix^say 'l-qawm-a}, |mu.s.tafaw| |'l-l_ah-i|
  1591. % \arb[fullvoc]{mu.s.tafaw 'l-l_ah-i} \arb[trans]{mu.s.ta\-faw
  1592. % 'l-l_ah-i}.
  1593. %
  1594. % |ramaW| |'l-.hijAraT-a| \arb[fullvoc]{ramaW 'l-.hijAraT-a}
  1595. % \arb[trans]{ramaW 'l-.hijAraT-a}, |fa-lammA| |ra'aW |\allowbreak{}
  1596. % |'l-najm-a| \arb[fullvoc]{fa-lammA ra'aW 'l-najm-a}
  1597. % \arb[trans]{fa-lammA ra'aW 'l-najm-a}.
  1598. % \end{quote}
  1599. %
  1600. % \subparagraph{\arb[trans]{'alif-u 'l-wa.sl-i} preceded by a consonant
  1601. % with \arb[trans]{sukUn}} The vowel which the consonant takes is
  1602. % either its original vowel, or that which belongs to the connective
  1603. % \arb[trans]{'alif} or the \arb[trans]{kasraT}; in most of the
  1604. % cases \parencite[i. 22 A--C]{Wright}, it is encoded explicitly, like
  1605. % so:---
  1606. % \begin{quote}
  1607. % |'antumu| |'l-kA_dib-Una| \arb[fullvoc]{'antumu 'l-kA_dib-Una}
  1608. % \arb[trans]{'antumu 'l-kA_dib-Una}, |ra'aytumu| |'l-rajul-a|
  1609. % \arb[fullvoc]{ra'aytumu 'l-rajul-a} \arb[trans]{ra'aytumu
  1610. % 'l-rajul-a}, |mani| |'l-ka_d_dAb-u| \arb[fullvoc]{mani
  1611. % 'l-ka_d_dAb-u} \arb[trans]{mani 'l-ka_d_dAb-u}, |qatalati|
  1612. % |'l-rUm-u| \arb[fullvoc]{qatalati 'l-rUm-u} \arb[trans]{qatalati
  1613. % \uc{'l-rUm-u}}.
  1614. % \end{quote}
  1615. % \label{ref:muhammaduni}
  1616. % However, the Arabic script does not show the \arb[trans]{kasraT} or
  1617. % the \arb[trans]{.dammaT} which may be taken by the nouns having
  1618. % \arb[trans]{tanwIn} although it is explicit in pronunciation and
  1619. % must appear in some transliteration standards. \package{arabluatex}
  1620. % takes care of that automatically:---
  1621. % \begin{quote}
  1622. % |mu.hammaduN| |'l-nabI| \arb[fullvoc]{mu.hammaduN 'l-nabI}
  1623. % \arb[trans]{\uc{m}u.hammaduN 'l-nabI}, |salAmuN| |ud_hulUA|
  1624. % \arb[fullvoc]{salAmuN ud_hulUA} \arb[trans]{salAmuN ud_hulUA},
  1625. % |qa.sIdata-hu| |fI| |qatl-i| |\uc{'a}bI|
  1626. % |\uc{m}|\allowbreak|uslimiN| |'llatI| |yaqUlu| |fI-hA|
  1627. % \arb[fullvoc]{qa.sIdata-hu fI qatl-i \uc{'a}bI \uc{m}uslimiN
  1628. % 'llatI yaqUlu fI-hA} \arb[trans]{qa.sIdata-hu fI qatl-i \uc{'a}bI
  1629. % \uc{m}uslimiN 'llatI yaqUlu fI-hA}.
  1630. % \end{quote}
  1631. %
  1632. % \subsection{Special orthographies}
  1633. % \paragraph{The name of God}
  1634. % The name of God, \arb[voc]{al-l_ahu}, is compounded of the article
  1635. % \arb[fullvoc]{al-}, and \arb[fullvoc]{'ilAh-u} (noted
  1636. % \arb[fullvoc]{'il_ah-u} with the defective \arb[trans]{'alif}) so
  1637. % that it becomes \arb[fullvoc]{al-'ilAh-u}; then the
  1638. % \arb[trans]{hamzaT} is suppressed, its vowel being transferred to
  1639. % the \arb[novoc]{l} before it, so that there remains
  1640. % \arb[voc]{alil_ah-u} \parencite[I refer to][I. 83
  1641. % col. 1]{Lane}. Finally, the first \arb[novoc]{l} is made quiescent
  1642. % and incorporated into the other, hence the \arb[trans]{ta^sdId}
  1643. % above it. As \package{arabluatex} never requires a solar letter to
  1644. % be written twice (see above, \vpageref{ref:euphonic-tashdid}), the
  1645. % name of God is therefore encoded |al-l_ah-u| or |'l-l_ah-u|:---
  1646. % \begin{quote}
  1647. % |al-l_ah-u| \arb[fullvoc]{al-l_ah-u} \arb[trans]{al-l_ah-u},
  1648. % \verb+yA|+\footnote{\label{fn:pipe-allah-01}Note the
  1649. % \enquote{pipe} character \enquote*{\textbar} here after |yA| and
  1650. % below after |fa| before footnote mark \ref{fn:pipe-allah-02}: it
  1651. % is needed by the |dmg| transliteration mode as in this mode any
  1652. % vowel at the commencement of a word preceded by a word that ends
  1653. % with a vowel, either short or long, is absorbed by this vowel
  1654. % viz. \arb[trans]{`al_A 'l-.tarIq-i}. See \vref{sec:pipe} on the
  1655. % \enquote{pipe} and \vref{sec:transliteration} on |dmg| mode.}
  1656. % |al-l_ah-u| \arb[fullvoc]{yA| al-l_ah-u} \arb[trans]{yA|
  1657. % al-l_ah-u}, \verb+'a-fa|+\footnote{\label{fn:pipe-allah-02}See
  1658. % \cref{fn:pipe-allah-01}.}|-al-|\allowbreak|l_ah-i|
  1659. % |la-ta.g`alanna| \arb[fullvoc]{'a-fa|-al-l_ah-i la-ta.g`alanna}
  1660. % \arb[trans]{'a-fa|-al-l_ah-i la-ta.g`alanna},
  1661. % |bi-'l-|\allowbreak|l_ah-i| \arb[fullvoc]{bi-'l-l_ah-i}
  1662. % \arb[trans]{bi-'l-l_ah-i}, |wa-'l-l_ah-i|
  1663. % \arb[fullvoc]{wa-'l-l_ah-i} \arb[trans]{wa-'l-l_ah-i}, |bi-sm-i|
  1664. % |'l-l_ah-i| \arb[fullvoc]{bi-sm-i 'l-l_ah-i} \arb[trans]{bi-sm-i
  1665. % 'l-l_ah-i}, |al-.hamd-u| |li-l-l_ah-i| \arb[fullvoc]{al-.hamd-u
  1666. % li-l-l_ah-i} \arb[trans]{al-.hamd-u li-l-l_ah-i}, |li-l-l_ah-i|
  1667. % |'l-qA'il-u| \arb[fullvoc]{li-l-l_ah-i 'l-qA'il-u}
  1668. % \arb[trans]{li-l-l_ah-i 'l-qA'il-u}.
  1669. % \end{quote}
  1670. %
  1671. % \paragraph{\texorpdfstring{The conjunctive \arb[voc]{alla_dI}}{The
  1672. % conjunctive اَلَّذِي}}
  1673. % Although it is compounded of the article \arb[fullvoc]{al}, the
  1674. % demonstrative letter \arb[novoc]{l} and the demonstrative pronoun
  1675. % \arb[voc]{_dA}, both masculine and feminine forms that are written
  1676. % defectively are encoded |alla_dI| and |allatI| respectively. Forms
  1677. % starting with the connective \arb[trans]{'alif} are encoded
  1678. % |'lla_dI| and |'llatI|:---
  1679. % \begin{quote}
  1680. % |'a_hAfu| |mina| |'l-malik-i| |'lla_dI| |ya.zlimu| |'l-nAs-a|
  1681. % \arb[fullvoc]{'a_hAfu mina 'l-malik-i 'lla_dI ya.zlimu 'l-nAs-a}
  1682. % \arb[trans]{'a_hAfu mina 'l-malik-i 'lla_dI ya.zlimu 'l-nAs-a},
  1683. % |`udtu| |'l-^say_h-a| |'lla_dI| |huwa| |marI.duN|
  1684. % \arb[fullvoc]{`udtu 'l-^say_h-a 'lla_dI huwa marI.duN}
  1685. % \arb[trans]{`udtu 'l-^say_h-a 'lla_dI huwa marI.duN}, |mA| |'anA|
  1686. % |bi-'lla_dI| |qA'iluN| |la-ka| |^say'aN| \arb[fullvoc]{mA 'anA
  1687. % bi-'lla_dI qA'iluN la-ka ^say'aN} \arb[trans]{mA 'anA bi-'lla_dI
  1688. % qA'iluN la-ka ^say'aN}.
  1689. %
  1690. % |'ari-nA| |'lla_dayni| |'a.dallA-nA| |mina| |'l-jinn-i|
  1691. % |wa-'l-'ins-i| \arb[fullvoc]{'ari-nA 'lla_dayni 'a.dallA-nA mina
  1692. % 'l-jinn-i wa-'l-'ins-i} \arb[trans]{'ari-nA 'lla_dayni 'a.dallA-nA
  1693. % mina 'l-jinn-i wa-'l-'ins-i}.
  1694. % \end{quote}
  1695. % The other forms are encoded regularly as |al-l| or |'l-l|:---
  1696. % \begin{quote}
  1697. % |fa-'innA| |na_dkuru| |'l-.sawt-ayni| |'l-la_dayni| |rawaynA-humA|
  1698. % |`an| |ja.h.zaT-a| \arb[fullvoc]{fa-'innA na_dkuru 'l-.sawt-ayni
  1699. % 'l-la_dayni rawaynA-humA `an \uc{ja.h.zaT-a}}
  1700. % \arb[trans]{fa-'innA na_dkuru 'l-.sawt-ayni 'l-la_dayni
  1701. % rawaynA-humA `an \uc{ja.h.zaT-a}}.
  1702. %
  1703. % And also: |al-la_dAni| \arb[fullvoc]{al-la_dAni}
  1704. % \arb[trans]{al-la_dAni}, |al-la_dayni| \arb[fullvoc]{al-la_dayni}
  1705. % \arb[trans]{al-la_dayni}, |al-latAni| \arb[fullvoc]{al-latAni}
  1706. % \arb[trans]{al-latAni}, |al-latayni| \arb[fullvoc]{al-latayni}
  1707. % \arb[trans]{al-latayni}, |al-lAtI| \arb[fullvoc]{al-lAtI}
  1708. % \arb[trans]{al-lAtI},
  1709. % \verb+al-lA'|Ati+\footnote{\label{fn:pipe-madda}Note here the
  1710. % \enquote{pipe} character \enquote*{\textbar}: as already stated
  1711. % \vpageref{ref:madda}, the sequence |'A| usually encodes
  1712. % \arb[trans]{'alif} with \arb[trans]{hamzaT} followed by
  1713. % \arb[trans]{'alif} of prolongation, which is represented in writing
  1714. % \arb[trans]{'alif} with \arb[trans]{maddaT}: \arb[voc]{A"'}. The
  1715. % \enquote{pipe} character prevents this rule from being
  1716. % applied. See \vref{sec:pipe}.} \arb[fullvoc]{al-lA'|Ati}
  1717. % \arb[trans]{al-lA'|Ati}, |al-lA'I| \arb[fullvoc]{al-lA'I}
  1718. % \arb[trans]{al-lA'I}, and so forth.
  1719. % \end{quote}
  1720. %
  1721. % \subsection{Quoting}
  1722. % \label{sec:quoting}
  1723. % It is here referred to \enquote{quoting} after the \package{arabtex}
  1724. % package.\footnote{See \textcite[22]{pkg:arabtex}} The
  1725. % \enquote{quoting} mechanism of \package{arabluatex} is designed to
  1726. % be very similar in effect to the one of \package{arabtex}.
  1727. %
  1728. % To start with an example, suppose one types the following in |novoc|
  1729. % mode: \arb[novoc]{`ullima `ilm-a 'l-hay'aT-i}; is it
  1730. % \arb[fullvoc]{`ullima}, \emph{he was taught the science of
  1731. % astronomy}, or \arb[fullvoc]{`allama}, \emph{he taught the science
  1732. % of astronomy}? In order to disambiguate this clause, it may be
  1733. % sensible to put a \arb[trans]{.dammaT} above the first \arb[voc]{`}:
  1734. % \arb[novoc]{`"ullima `ilm-a 'l-hay'aT-i}, which is achieved by
  1735. % \enquote{quoting} the vowel |u|, like so: |`"ullima|, or, with no
  1736. % other vowel than the required |u|: |`"ullm|.
  1737. %
  1738. % This is how the \enquote{quoting} mechanism works: metaphorically
  1739. % speaking, it acts as a \emph{toggle switch}. If something, in a
  1740. % given mode, is supposed to be visible, \enquote{quoting} hides it;
  1741. % conversely, if it is supposed not to, it makes it visible.
  1742. %
  1743. % As shown above, \enquote{quoting} means inserting one straight
  1744. % double quote (|"|) \emph{before} the letter that is to be acted
  1745. % upon. Its effects depend on the mode which is currently selected,
  1746. % either |novoc|, |voc| or |fullvoc|:---
  1747. %
  1748. % \paragraph{\texttt{novoc}} In this mode, \enquote{quoting}
  1749. % essentially means make visible something that ought not to be so.
  1750. % \begin{enumerate}
  1751. % \item Quoting a vowel, either short or long, makes the
  1752. % \arb[trans]{.dammaT}, \arb[trans]{fat.haT} or \arb[trans]{kasraT}
  1753. % appear above the appropriate consonant:---
  1754. % \begin{quote}
  1755. % |`"ullima| |`ilm-a| |'l-hay'aT-i| \arb[novoc]{`"ullima `ilm-a
  1756. % 'l-hay'aT-i} \arb[trans]{`"ullima `ilm-a 'l-hay'aT-i}, |ya.gz"UA|
  1757. % \arb[novoc]{ya.gz"UA} \arb[trans]{ya.gz"UA}.
  1758. % \end{quote}
  1759. % \item The same applies when \enquote{quoting} the
  1760. % \arb[trans]{tanwIn}:---
  1761. % \begin{quote}
  1762. % |wa-'innA| |sawfa| |tudriku-nA| |'l-manAyA| |muqadd"araT"aN|
  1763. % \arb[novoc]{wa-'innA sawfa tudriku-nA 'l-manAyA muqadd"araT"aN},
  1764. % \arb[trans]{wa-'innA sawfa tudriku-nA 'l-manAyA muqadd"araT"aN}.
  1765. % \end{quote}
  1766. % \item \label{ref:quoted-sukun-b}If no vowel follows the straight
  1767. % double quote, then a \arb[trans]{sukUn} is put above the preceding
  1768. % consonant:---
  1769. % \begin{quote}
  1770. % |qAla isma`"| \arb[novoc]{qAla isma`"} \arb[trans]{qAla isma`"},
  1771. % |jA'at"| |hinduN| \arb[voc]{jA'at" \uc{hinduN}}
  1772. % \arb[trans]{jA'at" \uc{hinduN}}, |^sabIhuN| |bi-man| |q"u.ti`at"|
  1773. % |qadamA-hu| \arb[novoc]{^sabIhuN bi-man q"u.ti`at" qadamA-hu}
  1774. % \arb[trans]{^sabIhuN bi-man q"u.ti`at" qadamA-hu}.
  1775. % \end{quote}
  1776. % \item At the commencement of a word, the straight double quote is
  1777. % interpreted as \arb[trans]{'alif-u 'l-wa.sl-i}:---
  1778. % \begin{quote}
  1779. % |wa-"ust"u`mila| \arb[novoc]{wa-"ust"u`mila}
  1780. % \arb[trans]{wa-"ust"u`mila}, |huwa| |"inhazama| \arb[novoc]{huwa
  1781. % "inhazama} \arb[trans]{huwa "inhazama}, |al-"intiqA.d-u|
  1782. % \arb[novoc]{al-"intiqA.d-u} \arb[trans]{al-"intiqA.d-u}.
  1783. % \end{quote}
  1784. % \end{enumerate}
  1785. %
  1786. % \paragraph{\texttt{voc}}
  1787. % In accordance with the general rule, in this mode, \enquote{quoting}
  1788. % makes the vowels and the \arb[trans]{tanwIn} disappear, should this
  1789. % feature be required for some reason:---
  1790. % \begin{enumerate}
  1791. % \item Short and long vowels:---
  1792. % \begin{quote}
  1793. % |q"Ala q"A'iluN| \arb[voc]{q"Ala q"A'iluN} \arb[trans]{q"Ala
  1794. % q"A'iluN}, |ibn-u 'abI 'u.saybi`aT-"a| \arb[voc]{ibn-u 'abI
  1795. % 'u.saybi`aT-"a} \arb[trans]{\uc{ibn-u} \uc{'abI}
  1796. % \uc{'u.saybi`aT-"a}}.
  1797. % \end{quote}
  1798. % \item \arb[trans]{tanwIn}:---
  1799. % \begin{quote}
  1800. % |madInaT"aN| \arb[voc]{madInaT"aN} \arb[trans]{madInaT"aN},
  1801. % |bAb"aN| \arb[voc]{bAb"aN} \arb[trans]{bAb"aN}, |hud"aN_A|
  1802. % \arb[voc]{hud"aN_A} \arb[trans]{hud"aN_A}, |^say'"iN|
  1803. % \arb[voc]{^say'"iN} \arb[trans]{^say'"iN}.
  1804. % \end{quote}
  1805. % \end{enumerate}
  1806. % One may more usefully \enquote{quote} the initial vowels to write
  1807. % the \arb[trans]{wa.slaT} above the \arb[trans]{'alif} or insert a
  1808. % straight double quote after a consonant not followed by a vowel to
  1809. % make the \arb[trans]{sukUn} appear:---
  1810. % \begin{enumerate}
  1811. % \item \arb[trans]{'alif-u 'l-wa.sl-i}:---
  1812. % \begin{quote}
  1813. % |fI "istiq.sA'-iN| \arb[voc]{fI "istiq.sA'-iN} \arb[trans]{fI
  1814. % "istiq.sA'-iN}, |wa-"istiq.sA'-uN| \arb[voc]{wa-"istiq.sA'-uN}
  1815. % \allowbreak\arb[trans]{wa-"istiq.sA'-uN}, |qAla| |"uhrub|
  1816. % |fa-lan| |tuqtala| \arb[voc]{qAla "uhrub fa-lan tuqtala}
  1817. % \arb[trans]{qAla "uhrub fa-lan tuqtala}.
  1818. % \end{quote}
  1819. % \item \arb[trans]{sukUn}:---
  1820. % \begin{quote}
  1821. % |qAla| |"uqtul"| |fa-lan| |tuqtala| \arb[voc]{qAla "uqtul"
  1822. % fa-lan tuqtala} \arb[trans]{qAla "uqtul" fa-lan tuqtala}, |mA|
  1823. % |jA'at"| |mini| |imra'aTiN| \arb[voc]{mA jA'at" mini imra'aTiN}
  1824. % \arb[trans]{mA jA'at" mini imra'aTiN}, |kam"| |qad"| |ma.dat"|
  1825. % |min"| |laylaTiN| \arb[voc]{kam" qad" ma.dat" min" laylaTiN}
  1826. % \arb[trans]{kam" qad" ma.dat" min"
  1827. % laylaTiN}.\label{ref:quoted-sukun-e}
  1828. % \end{quote}
  1829. % \end{enumerate}
  1830. %
  1831. % \paragraph{\texttt{fullvoc}}
  1832. % In this mode, \enquote{quoting} can be used to take away any short
  1833. % vowel (or \arb[trans]{tanwIn}, as seen above) or any
  1834. % \arb[trans]{sukUn}:---
  1835. % \begin{quote}\label{ref:qrannun-full}
  1836. % |al-jamr-u| |'l-.sayfiyy-u| |'lla_dI| |kAna|
  1837. % \verb+bi-q"rAn"|nUn-a+ \arb[fullvoc]{al-jamr-u 'l-.sayfiyy-u
  1838. % 'lla_dI kAna \uc{bi-q"rAn"|nUn-a}} \arb[trans]{al-jamr-u
  1839. % 'l-.sayfiyy-u 'lla_dI kAna \uc{bi-q"rAn"|nUn-a}}.
  1840. % \end{quote}
  1841. %
  1842. % \subsubsection{\texorpdfstring{Quoting the
  1843. % \arb[trans]{hamzaT}}{Quoting the hamzah}}
  1844. % \label{sec:quoting-hamza}
  1845. % As said above in \vref{ref:hamza}, the \arb[trans]{hamzaT} is always
  1846. % written \meta{\texttt{'}}, its carrier being determined by contextual
  1847. % analysis. \enquote{Quoting} that straight single quote character
  1848. % like so: \meta{\texttt{"'}} allows to determine the carrier of the
  1849. % \arb[trans]{hamzaT} freely, without any consideration for the
  1850. % context. \Cref{tab:quoted-hamza} gives the equivalents for all the
  1851. % possible carriers the \arb[trans]{hamzaT} may take.
  1852. %
  1853. % \begin{longtable}{lllll}
  1854. % \bottomrule
  1855. % \caption*{\Cref*{tab:quoted-hamza}: \enquote{Quoted}
  1856. % \arb[trans]{hamzaT}}
  1857. % \endfoot
  1858. % \captionlistentry{\enquote{Quoted} \arb[trans]{hamzaT}}\\[-1em]
  1859. % \toprule Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  1860. % & Arab\TeX\ notation \\
  1861. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  1862. % \endfirsthead
  1863. % \toprule Letter & \multicolumn{3}{l}{Transliteration}
  1864. % & Arab\TeX\ notation \\
  1865. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  1866. % \endhead
  1867. % \footnotetext{See below \vref{sec:transliteration}.}
  1868. % \label{tab:quoted-hamza}
  1869. % \arb[novoc]{|"'} & \dmg{|"'} & \loc{|"'} & \brill{|"'} & \verb+|"'+ \\
  1870. % \pagebreak[1]
  1871. % \arb[novoc]{A"'} & \dmg{A"'} & \loc{A"'} & \brill{A"'} & \verb|A"'| \\
  1872. % \arb[novoc]{a"'} & \dmg{a"'} & \loc{a"'} & \brill{a"'} & \verb|a"'| \\
  1873. % \arb[novoc]{u"'} & \dmg{u"'} & \loc{u"'} & \brill{u"'} & \verb|u"'| \\
  1874. % \arb[novoc]{w"'} & \dmg{w"'} & \loc{w"'} & \brill{w"'} & \verb|w"'| \\
  1875. % \arb[novoc]{i"'} & \dmg{i"'} & \loc{i"'} & \brill{i"'} & \verb|i"'| \\
  1876. % \arb[novoc]{y"'} & \dmg{y"'} & \loc{y"'} & \brill{y"'} & \verb|y"'| \\
  1877. % \end{longtable}
  1878. %
  1879. % As one can see from \vref{tab:quoted-hamza}, the carrier of the
  1880. % \arb[trans]{hamzaT} is inferred from the letter that precedes the
  1881. % straight double quote \meta{\texttt{"}}. Of course, any
  1882. % \enquote{quoted} \arb[trans]{hamzaT} may take a short vowel, which
  1883. % is to be written \emph{after} the Arab\TeX\ equivalent for the
  1884. % \arb[trans]{hamzaT} itself, namely \meta{\texttt{'}}. For example,
  1885. % \arb[voc]{w"'a} is encoded \meta{\texttt{w"'a}}, while
  1886. % \arb[voc]{w"'"} is encoded \meta{\texttt{w"'"}}. In the latter
  1887. % example, the second straight double quote encodes the
  1888. % \arb[trans]{sukUn} in |voc| mode in accordance with the rule laid
  1889. % above \vpagerefrange{ref:quoted-sukun-b}{ref:quoted-sukun-e}.
  1890. % \begin{quote}
  1891. % |'a`dA'ukum| \arb[fullvoc]{'a`dA'ukum} \arb[trans]{'a`dA'ukum},
  1892. % \verb+'a`dA|"'ukum+ \arb[fullvoc]{'a`daA"'|"'ukum}
  1893. % \arb[trans]{'a`dA|"'ukum}, |'a`dA'ikum| \arb[fullvoc]{'a`dA'ikum}
  1894. % \arb[trans]{'a`dA'ikum}, \verb+'a`dA|"'ikum+
  1895. % \arb[fullvoc]{'a`daA"'|"'ikum} \arb[trans]{'a`dA|"'ikum}.
  1896. % \end{quote}
  1897. %
  1898. % \subsection{The \enquote{pipe} character (\textbar)}
  1899. % \label{sec:pipe}
  1900. % In the terminology of Arab\TeX, the \enquote{pipe} character
  1901. % \enquote*{\textbar} is referred to as the \enquote{invisible
  1902. % consonant}. Hence, as already seen above in
  1903. % \vref{sec:quoting-hamza}, its usage to encode the
  1904. % \arb[trans]{hamzaT} alone, with no carrier: \verb+|"'+
  1905. % \arb[novoc]{|"'}.
  1906. %
  1907. % Aside from that usage, the \enquote{pipe} character is used to
  1908. % prevent almost any of the contextual analysis rules that are
  1909. % described above from being applied. Two examples have already been
  1910. % given to demonstrate how that particular mechanism works in
  1911. % \vref{fn:pipe-allah-01} and in \vref{fn:pipe-madda}. One more example
  1912. % follows:---
  1913. % \begin{quote}
  1914. % \verb+bi-qrAn|nUn-a+ \arb[voc]{\uc{bi-qrAn|nUn-a}}
  1915. % \arb[trans]{\uc{bi-qrAn|nUn-a}}, \enquote{in Crannon} (Thessaly,
  1916. % Greece).\footnote{See more context \vpageref{ref:qrannun-full}.}
  1917. % \end{quote}
  1918. % As one can see, the \enquote{pipe} character between the two
  1919. % \meta{n} prevents the necessary \arb[trans]{ta^sdId} rule
  1920. % (\cpageref{ref:necessary-tashdid}) from being applied.
  1921. %
  1922. % \subsection{Putting back on broken contextual analysis rules}
  1923. % \label{sec:arbnull}
  1924. % \NEWfeature{v1.7} In complex documents such as critical editions
  1925. % where footnotes and other kind of annotations can be particularly
  1926. % abundant, the contextual analysis rules that are described above may
  1927. % be broken by \LaTeX\ commands. To take an example, consider the
  1928. % following:---%
  1929. % \iffalse
  1930. %<*example>
  1931. % \fi
  1932. \begin{arabluacode}
  1933. This is wrong:
  1934. \begin{arab}[fullvoc]
  1935. fa-lammA ra'aW\LRfootnote{A footnote which interferes with the
  1936. contextual analysis.} 'l-na^gma...
  1937. \end{arab}
  1938. \end{arabluacode}
  1939. % \iffalse
  1940. %</example>
  1941. % \fi%
  1942. % According to the rule stated \vpageref{sec:diphthong-alif}, the
  1943. % diphthong in \arb[trans]{ra'aW} must be resolved into two simple
  1944. % vowels before the \arb[trans]{'alif-u 'l-wa.sl-i}, as
  1945. % \arb[fullvoc]{ra'aW 'l-na^gma}.
  1946. %
  1947. % \DescribeMacro{\arbnull} The \cs{arbnull} command is provided so as
  1948. % to put back on contextual analysis rules in such situations. It
  1949. % takes as argument the word that must be brought back for any given
  1950. % rule to be applied as it ought to. Depending on the contexts that
  1951. % have to be restored, \cs{arbnull} may be found just after or before
  1952. % Arabic words.%
  1953. % \iffalse
  1954. %<*example>
  1955. % \fi
  1956. \begin{arabluacode}[text only]
  1957. In any case, \emph{no space must be left} after or before the Arabic
  1958. word that \cs{arbnull} is applied to.
  1959. \end{arabluacode}
  1960. % \iffalse
  1961. %</example>
  1962. % \fi%
  1963. % The following shows how the Arabic should have been written in the
  1964. % preceding example and gives further illustrations of the same
  1965. % technique:---%
  1966. % \iffalse
  1967. %<*example>
  1968. % \fi
  1969. \begin{arabluacode}
  1970. \begin{arab}[fullvoc]
  1971. fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote which
  1972. interferes with the contextual analysis.} 'l-na^gma...
  1973. qAla\LRfootnote{A footnote which interferes with the contextual
  1974. analysis.} \arbnull{qAla}uhrub fa-lan tuqtala.
  1975. \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote which
  1976. interferes with the contextual analysis.}
  1977. \arbnull{zayduN}ibn-u \uc{`a}mriNU.\LRfootnote{See
  1978. \vref{fn:zayd-is-son}.}
  1979. \end{arab}
  1980. \begin{arab}[trans]
  1981. \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote which
  1982. interferes with the contextual analysis.}
  1983. \arbnull{zayduN}ibn-u \uc{`a}mriNU.\LRfootnote{See
  1984. \vref{fn:zayd-is-son}.}
  1985. \end{arab}
  1986. \end{arabluacode}
  1987. % \iffalse
  1988. %</example>
  1989. % \fi%
  1990. %
  1991. % \subsection{\texorpdfstring{Stretching characters: the
  1992. % \arb[trans]{ta.twIl}}{Stretching characters: the taṭwīl}}
  1993. % \label{sec:tatwil}
  1994. % A double hyphen \meta{-\,-} stretches the ligature in which one
  1995. % letter is bound to another. Although it is always better to rely on
  1996. % automatic stretching, this technique can be used to a modest extent,
  1997. % especially to increase legibility of letters and diacritics which
  1998. % stand one above the other:--
  1999. % \begin{quote}
  2000. % |.hunayn-u| |bn-u| |'is.h--_aq-a| \arb[voc]{.hunayn-u bn-u
  2001. % 'is.h--_aq-a} \arb[trans]{\uc{.hunayn-u} bn-u \uc{'is.h--_aq-a}}
  2002. % \end{quote}
  2003. %
  2004. % \subsection{Digits}
  2005. % \label{sec:digits}
  2006. % \subsubsection{Numerical figures}
  2007. % \label{sec:numerical-figures}
  2008. % The \emph{Indian numbers}, \arb[trans]{al-raqam-u 'l-hindiyy-u}, are
  2009. % ten in number, and they are compounded in exactly the same way as
  2010. % our numerals:---
  2011. % \begin{quote}
  2012. % |1874| \arb[voc]{1874}, |123-456,789| \arb[voc]{123-456,789}, |fI|
  2013. % |sanaT-i| |1024| \arb[voc]{fI sanaT-i 1024}
  2014. % \end{quote}
  2015. %
  2016. % \subsubsection{The \emph{abjad}}
  2017. % \label{sec:abjad}
  2018. % The numbers may also be expressed with letters from right to left
  2019. % arranged in accordance with the order of the Hebrew and Aramaic
  2020. % alphabets \parencite[see][i. 28 B--C]{Wright}. The
  2021. % \arb[trans]{'abjad} numbers are usually distinguished from the
  2022. % surrounding words by a stroke placed over them.
  2023. %
  2024. % \DescribeMacro{\abjad} \NEWfeature{v.1.1} \arb[trans]{'abjad}
  2025. % numbers are inserted with the \cs{abjad}\marg{number} command in any
  2026. % of the |voc|, |fullvoc| and |novoc| modes, where \meta{number} may
  2027. % be any number between 1 and 1999, like so:---
  2028. % \begin{quote}
  2029. % |\abjad{45}| |kitAbu-hu| |fI| |'l-`AdAt-i| \arb[voc]{\abjad{45}
  2030. % kitAbu-hu fI 'l-`AdAt-i} \arb[trans]{\abjad{45} kitAbu-hu fI
  2031. % 'l-`AdAt-i}.
  2032. % \end{quote}
  2033. % \begin{quoting}
  2034. % \textsc{Rem.}~\emph{a.} As can be seen in the above given example,
  2035. % \package{arabluatex} expresses the \arb[trans]{'abjad} numbers in
  2036. % Roman numerals if it finds the \cs{abjad} command in any of the
  2037. % transliteration modes.
  2038. %
  2039. % \textsc{Rem.}~\emph{b.} \cs{abjad} may also be found outside
  2040. % Arabic environments. In that case, \package{arabluatex} does not
  2041. % print the stroke as a distinctive mark over the number for it is
  2042. % not surrounded by other Arabic words. In case one nonetheless
  2043. % wishes to print the stroke, he can use the \cs{aemph} command that
  2044. % is described below in \vref{sec:emphasis}:---
  2045. % \begin{quote}
  2046. % |The| |\arb[trans]{'abjad}| |number| |for| |1874| |is|
  2047. % |\abjad{1874}| The \arb[trans]{'abjad} number for 1874 is
  2048. % \abjad{1874}.
  2049. %
  2050. % |The| |\arb[trans]{'abjad}| |number| |for| |1874| |is|
  2051. % |\aemph*{\abjad{1874}}| The \arb[trans]{'abjad} number for 1874
  2052. % is \aemph*{\abjad{1874}}.
  2053. % \end{quote}
  2054. % \end{quoting}
  2055. %
  2056. % \NEWfeature{v1.12}\cs{abjad} may also be used to convert values of
  2057. % counters into \arb[trans]{'ab^gad} numbers, like so:--- %
  2058. % \changes{v1.12}{2018/06/24}{\cs{abjad} can now process \LaTeX\
  2059. % counters}%
  2060. % \iffalse
  2061. %<*example>
  2062. % \fi
  2063. \begin{arabluacode}
  2064. The \arb[trans]{'ab^gad} number for the current page (\thepage) is
  2065. \abjad{\thepage}.
  2066. \end{arabluacode}
  2067. % \iffalse
  2068. %</example>
  2069. % \fi%
  2070. %
  2071. % This technique can be used to produce abjad-numbered lists as will
  2072. % be demonstrated \vpageref{ref:abjad-list}.
  2073. %
  2074. % \subsection{Additional characters}
  2075. % \label{sec:additional-characters}
  2076. % In the manuscripts, the unpointed letters, \arb[trans]{al-.hurUfu
  2077. % 'l-muhmalaTu}, are sometimes further distinguished from the pointed
  2078. % by various contrivances, as explained in \textcite[i. 4
  2079. % B--C]{Wright}. One may find these letters written in a smaller size
  2080. % below the line, or with a dot or another mark below. As representing
  2081. % all the possible contrivances leads to much complexity and also
  2082. % needs to be agreed among scholars, new ways of encoding them will be
  2083. % proposed and gradually included as \package{arabluatex} will mature.
  2084. %
  2085. % For the time being, the following is included:---
  2086. % \begin{longtable}{lllll}
  2087. % \bottomrule
  2088. % \caption*{\Cref*{tab:additional-arabic-codings}: Additional Arabic
  2089. % codings}
  2090. % \endfoot
  2091. % \captionlistentry{Additional Arabic codings}\\[-1em]
  2092. % \toprule
  2093. % Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  2094. % & Arab\TeX\ notation \\
  2095. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  2096. % \endfirsthead
  2097. % \toprule
  2098. % Letter & \multicolumn{3}{l}{Transliteration}
  2099. % & Arab\TeX\ notation \\
  2100. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} \\ \midrule
  2101. % \endhead \footnotetext{See below \vref{sec:transliteration}.}
  2102. % \label{tab:additional-arabic-codings}
  2103. % \arb[novoc]{.b} & \dmg{.b} & \loc{.b} & \brill{.b} & |.b| \\
  2104. % \arb[novoc]{^d} & \dmg{^d} & \loc{^d} & \brill{^d} & |^d| \\
  2105. % \arb[novoc]{.f} & \dmg{.f} & \loc{.f} & \brill{.f} & |.f| \\
  2106. % \arb[novoc]{.q} & \dmg{.q} & \loc{.q} & \brill{.q} & |.q| \\
  2107. % \arb[novoc]{.k} & \dmg{.k} & \loc{.k} & \brill{.k} & |.k| \\
  2108. % \arb[novoc]{.n} & \dmg{.n} & \loc{.n} & \brill{.n} & |.n| \\
  2109. % \arb[novoc]{((} & \dmg{((} & \loc{((} & \brill{((} & |((| \\
  2110. % \pagebreak[1]
  2111. % \arb[novoc]{))} & \dmg{))} & \loc{))} & \brill{))} & |))| \\
  2112. % \end{longtable}
  2113. %
  2114. % \begin{quote}
  2115. % |'afAman.tUs| Gal.(M) |.fmn.n.ts| (sic) Gal.(E1),
  2116. % \arb[novoc]{'afAman.tUs} Gal.(M) \arb[novoc]{.fmn.n.ts} (sic)
  2117. % Gal.(E1), \arb[trans]{'afAman.tUs} Gal.(M) \arb[trans]{.fmn.n.ts}
  2118. % (sic) Gal.(E1).
  2119. % \end{quote}
  2120. %
  2121. % \subsection{Arabic emphasis}
  2122. % \label{sec:emphasis}
  2123. % As already seen in \vref{sec:abjad}, the \arb[trans]{'abjad} numbers
  2124. % are distinguished from the surrounding words by a stroke placed
  2125. % over them. This technique is used to distinguish further words that
  2126. % are proper names or book titles.
  2127. %
  2128. % \DescribeMacro{\aemph} One may use the \cs{aemph}\marg{Arabic
  2129. % text} command to use the same technique to emphasize words, like so:---
  2130. % \begin{quote}
  2131. % |\abjad{45}:| |kitAbu-hu| |\aemph{fI| |'l-`AdAt-i}|
  2132. % \arb[voc]{\abjad{45}: kitAbu-hu \aemph{fI 'l-`AdAt-i}}
  2133. % \arb[trans]{\abjad{45}: kitAbu-hu \aemph{fI 'l-\uc{`AdAt-i}}}.
  2134. % \end{quote}
  2135. %
  2136. % \begin{quoting}
  2137. % \textsc{Rem.}~\emph{a.} As the above example shows,
  2138. % \package{arabluatex} places the horizontal stroke \emph{under} the
  2139. % emphasized words in any of the transliteration modes.
  2140. %
  2141. % \textsc{Rem.}~\emph{b.} \NEWfeature{v1.9.2}\DescribeMacro{\aemph*}
  2142. % \cs{aemph*} is also provided should one wish to always have the
  2143. % horizontal stroke printed over the emphasized words, like so:
  2144. % |\abjad{45}:| |kitAbu-hu| |\aemph*{fI| |'l-`AdAt-i}|
  2145. % \arb[voc]{\abjad{45}: kitAbu-hu \aemph*{fI 'l-`AdAt-i}}
  2146. % \arb[trans]{\abjad{45}: kitAbu-hu \aemph*{fI 'l-\uc{`AdAt-i}}}.
  2147. % \end{quoting}
  2148. %
  2149. % \section{Arabic poetry}
  2150. % \label{sec:poetry}
  2151. % \NEWfeature{v1.6} \package{arabluatex} provides a special
  2152. % environment for typesetting Arabic poetry. Every line in this
  2153. % environment must end with |\\|.
  2154. %
  2155. % \DescribeEnv{arabverse} The |arabverse| environment may take up to
  2156. % six optional \enquote*{named arguments} each of which is set using
  2157. % the syntax \meta{key}$=$\meta{value}, like so:---%
  2158. % \iffalse
  2159. %<*example>
  2160. % \fi
  2161. \begin{arabluaverbatim}
  2162. \begin{arabverse}[key1=value1, key2=value2, ...]
  2163. <verses>
  2164. \end{arabverse}
  2165. \end{arabluaverbatim}
  2166. % \iffalse
  2167. %</example>
  2168. % \fi
  2169. %
  2170. % The description of the optional arguments follows:---
  2171. %
  2172. % \DescribeOption{mode} |mode|$=$\meta{mode}, either |voc|, |fullvoc|,
  2173. % |novoc| or |trans|. The default mode is the one that is set at load
  2174. % time as already seen \vref{sec:options}.
  2175. %
  2176. % \DescribeOption{width} |width|$=$\meta{length}
  2177. % \hfill\arabluaverb{Default: 0.3\linewidth}\\ The default width of
  2178. % each hemistich that the verse consists of. It may be expressed in
  2179. % any accepted unit of measurement, such as |4cm| or |2in|. However,
  2180. % one must keep in mind that the total length of the two hemistichs
  2181. % added to the one of the gutter that separates them must not exceed
  2182. % the length of the base line, unless one wishes to have the
  2183. % hemistichs distributed on subsequent lines.
  2184. %
  2185. % \DescribeOption{gutter} |gutter|$=$\meta{width}
  2186. % \hfill\arabluaverb{Default: 0.15 x (hemistich width)}\\ The gutter
  2187. % consists of the blank space that is between the two hemistichs. By
  2188. % default, it is commensurate with the width of the hemistich, but it
  2189. % may be expressed in any accepted unit of measurement as well.
  2190. %
  2191. % \DescribeOption{metre} |metre|$=$\meta{name}
  2192. % \hfill\arabluaverb{Default: none}\\ If the name of the metre is
  2193. % expressed, it is printed after the lines and set flush left in
  2194. % |voc|, |fullvoc| and |novoc| modes or flush right in |trans| mode.
  2195. %
  2196. % \DescribeOption{delim} |delim|$=$|true|\verb+|+|false|
  2197. % \hfill\arabluaverb{Default: false}\\ This named argument does not
  2198. % need a value as it defaults to |true| if it is used. If so, a
  2199. % delimiter is printed between each of the hemistichs. By default, it
  2200. % is set to the \enquote*{star} character \enquote*{*}. The
  2201. % \DescribeMacro{\SetHemistichDelim}\cs{SetHemistichDelim}\marg{delimiter}
  2202. % command may be used at any point of the document to change this
  2203. % default setting.
  2204. %
  2205. % \DescribeOption{utf} |utf|$=$|true|\verb+|+|false|
  2206. % \hfill\arabluaverb{Default: false}\\ As the preceding one, this
  2207. % named argument does not need a value as it defaults to |true| if it
  2208. % is used. If so, Unicode Arabic input is expected in the |arabverse|
  2209. % environment instead of \textsc{ascii} Arab\TeX\ or Buckwalter input
  2210. % schemes. See \vref{sec:unicode-input} for more details.
  2211. %
  2212. % \DescribeOption{color} |color|$=$\meta{color name}
  2213. % \hfill\arabluaverb{Default: not set}\\
  2214. % \NEWfeature{v1.13} The color in which lines of poetry are to be
  2215. % rendered.
  2216. %
  2217. % \label{ref:poetry-export}
  2218. % \DescribeOption{export} |export|$=$|true|\verb+|+|false|
  2219. % \hfill\arabluaverb{Default: false}\\
  2220. % \NEWfeature{v.1.13} This named argument does not need a value as it
  2221. % defaults to |true| if it is used. If |export| is set as a global
  2222. % option as well (see above \vpageref{export-mode}), all the lines
  2223. % will be converted to Unicode and exported to the external selected
  2224. % file. See below \vref{sec:arabtex2utf} for more details.
  2225. %
  2226. % \DescribeMacro{\bayt} Inside the |arabverse| environment, each line
  2227. % is typeset by the \cs{bayt} command which takes two mandatory
  2228. % arguments and may accept one optional
  2229. % argument.\footnote{\label{ref:bayt-star}A \enquote*{starred} version
  2230. % \cs{bayt*} is also defined. \package{arabluatex} uses it internally
  2231. % when \texttt{export} is set to \texttt{true} to instruct some Lua
  2232. % functions that lines of poetry have already been processed. That
  2233. % aside, \cs{bayt} and \cs{bayt*} do the same, and only \cs{bayt}
  2234. % should be used.} Additionally, every \cs{bayt} command \emph{must}
  2235. % be followed with |\\| like so:---%
  2236. % \iffalse
  2237. %<*example>
  2238. % \fi
  2239. \begin{arabluacode}[text only]
  2240. \cs{bayt}\marg{\arb[trans]{.sadr}}\oarg{\arb[trans]{tadwIr}}%
  2241. \marg{\arb[trans]{`ajuz}}|\\|
  2242. \end{arabluacode}
  2243. % \iffalse
  2244. %</example>
  2245. % \fi
  2246. %
  2247. % That two subsequent hemistichs should be connected with one another
  2248. % is technically named \arb[trans]{tadwIr}. Should that happen, either
  2249. % the \arb[trans]{.sadr} or the \arb[trans]{`ajuz} or both of them,
  2250. % may be connected to one another by letters that are naturally bound
  2251. % to the following or the preceding ones over the
  2252. % \arb[trans]{tadwIr}. The optional argument of the \cs{bayt} command
  2253. % is designed to deal with the various situations that may arise:---
  2254. % \begin{enumerate}
  2255. % \item If the two hemistichs be connected with one another by a
  2256. % prominent horizontal flexible stroke, the \arb[trans]{ta.twIl} should
  2257. % be used, like so: |[--]| (see \vref{sec:tatwil}). Of course, the
  2258. % ending word of the \arb[trans]{.sadr} and the word at the
  2259. % commencement of the \arb[trans]{`a^guz} must have the
  2260. % \arb[trans]{ta.twIl} too so that the proper shapes of the letters be
  2261. % selected. Consider for example the following:---
  2262. % \iffalse
  2263. %<*example>
  2264. % \fi
  2265. \begin{arabluacode}
  2266. \begin{arabverse}[mode=fullvoc, width=.3\linewidth]
  2267. \bayt{lA 'ar_A man `ahidtu fI-hA fa-'abkI 'l---}[--]{---yawma
  2268. dalhaN wa-mA yaruddu 'l-bukA'u}\\
  2269. \end{arabverse}
  2270. \end{arabluacode}
  2271. % \iffalse
  2272. %</example>
  2273. % \fi%
  2274. % As one can see, \emph{triple hyphens} have been used. In the
  2275. % \arb[trans]{.sadr}, the first hyphen triggers the rules that are
  2276. % related to the definite article and the \arb[trans]{'alif-u
  2277. % 'l-wa.sl-i},\footnote{See \vref{ref:definite-article}} while the
  2278. % following two select the figure of the letter \arb[trans]{lAm}
  2279. % connected with a following letter. In the \arb[trans]{`a^guz}, the
  2280. % last two hyphens select the letter \arb[trans]{yA'} connected with a
  2281. % preceding letter, while the first one is simply discarded in this
  2282. % mode, but still may appear as it should, if the |trans| mode be
  2283. % selected:---%
  2284. % \iffalse
  2285. %<*example>
  2286. % \fi
  2287. \begin{arabluacode}
  2288. \begin{arabverse}[mode=trans, width=.4\linewidth]
  2289. \bayt{lA 'ar_A man `ahidtu fI-hA fa-'abkI 'l---}[--]{---yawma
  2290. dalhaN wa-mA yaruddu 'l-bukA'u}\\
  2291. \end{arabverse}
  2292. \end{arabluacode}
  2293. % \iffalse
  2294. %</example>
  2295. % \fi%
  2296. % \item In some other cases, it may seem difficult, if not fairly
  2297. % impossible, to split a given word into two parts. This happens
  2298. % mostly because of the \arb[trans]{^saddaT}. Consider for example
  2299. % the following:---
  2300. % \iffalse
  2301. %<*example>
  2302. % \fi
  2303. \begin{arabluacode}
  2304. \begin{arabverse}[mode=fullvoc, width=.25\linewidth, gutter=1cm]
  2305. \bayt{.gayra 'annI qad 'asta`Inu `al_A 'l-ha--}[--mmi ]{'i_dA
  2306. _haffa bi-'l-_tawiyyi 'l-na^gA'u}\\
  2307. \bayt{bi-zaf--UfiN ka-'anna-hA hiq--laTuN}[ 'ummu ]{ri'AliN
  2308. dawwiyyaTuN saqfA'u}\\
  2309. \end{arabverse}
  2310. \end{arabluacode}
  2311. % \iffalse
  2312. %</example>
  2313. % \fi%
  2314. % In the first line, the word \arb{al-hammi} should be split into
  2315. % \arb{al-ham"-- --mi} as the first part of it belongs to the
  2316. % \arb[trans]{.sadr} and the second to the \arb[trans]{`a^guz}. One
  2317. % solution to avoid splitting this word in such a way is to write
  2318. % inside the \arb[trans]{tadwIr} the part of it that belongs to either
  2319. % hemistich, without omitting to add a space after it. In the second
  2320. % line, the word \arb{'ummu} should be split into \arb{'um"-- --mu},
  2321. % so that the only way to avoid splitting it into two parts is to
  2322. % write it all inside the \arb[trans]{tadwIr}. In that case, as the
  2323. % word is to be placed in the middle, it has been surrounded by
  2324. % spaces.
  2325. % \end{enumerate}
  2326. %
  2327. % \paragraph{Scaling and distortion of characters}
  2328. % The |arabverse| environment and the \cs{bayt} command are designed
  2329. % to typeset the verses in a two-column, fixed width layout. This may
  2330. % result in a somewhat distorted text. Should that happen, one may
  2331. % adapt the layout by modifying the values of the above described
  2332. % |width| and |gutter| named arguments until the visual aspect of the
  2333. % layout be satisfactory. It has to be noted that distortion and
  2334. % warping may be even more perceptible in Roman than in Arabic
  2335. % characters.
  2336. %
  2337. % \paragraph{Footnotes}
  2338. % Footnotes are not set by default inside the \cs{bayt} command, but
  2339. % there are two easy ways to have them printed.
  2340. %
  2341. % If they are little in number, each footnote may be split into pairs
  2342. % of \cs{footnote\allowbreak{}mark}|{}| (please mind the braces or
  2343. % \enquote{declare} |footnotemark| using \cs{MkArbBreak} to take it
  2344. % out of the Arabic environment\footnote{See
  2345. % \vref{sec:declare-new-commands}.}) in the argument of the \cs{bayt}
  2346. % command and \cs{footnotetext} outside the \cs{bayt} command.
  2347. %
  2348. % If the footnotes are abundant in number, it is advised to load the
  2349. % \package{footnotehyper} package which \package{arabluatex} will then
  2350. % use to typeset any kind of footnote that is called from the
  2351. % arguments of the \cs{bayt} command.\footnote{The \package{footnote}
  2352. % package can also be used for the same effect. However, it must be
  2353. % loaded \emph{after} \package{arabluatex}.}
  2354. %
  2355. % \paragraph{Line numbering}
  2356. % Inside the |arabverse| environment, the |linenumbers| environment of
  2357. % the \package{lineno} package can be used to have the lines of
  2358. % succeeding verses numbered. Please refer to the documentation of
  2359. % this package for more information or to the example below for a
  2360. % basic implementation of this technique.
  2361. %
  2362. % \subsection{Example}
  2363. % \label{sec:poetry-example}
  2364. % Here follow the first lines of \arb[trans]{\upshape{}\uc{i}mru'u
  2365. % 'l-\uc{q}aysi}'s \arb[trans]{\uc{m}u`allaqaT}. In this example,
  2366. % \cs{SetArbDflt*} has been selected so as to mark the
  2367. % \arb[trans]{'id.gAm} that is fit to this declamatory
  2368. % poetry:---\footnote{Please note that for the time being only the
  2369. % assimilation rules that are laid on \vref{ref:assimilation} are
  2370. % applied. See \vref{sec:classic-modern-typesetting} for more
  2371. % information. None of the editions of the
  2372. % \arb[trans]{\uc{M}u`allaqAt} that I know of feature the
  2373. % \arb[trans]{'id.gAm} in the Arabic text, although it is often
  2374. % strongly marked in declamation.}%
  2375. % \iffalse
  2376. %<*example>
  2377. % \fi
  2378. \begin{arabluaverbatim}
  2379. \begin{arab}[fullvoc]
  2380. qAla \uc{i}mru'u 'l-\uc{q}aysi fI mu`allaqati-hi:
  2381. \end{arab}
  2382. \begin{arabverse}[mode=fullvoc, metre={(al-.darbu 'l-_tAnI mina
  2383. 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}]
  2384. \SetArbDflt*
  2385. \begin{linenumbers*}
  2386. \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti
  2387. 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
  2388. \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
  2389. rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
  2390. \bayt{tar_A ba`ara 'l-'ar'Ami fI `ara.sAti-hA}{wa-qI`Ani-hA
  2391. ka-'anna-hu .habbu fulfuli}\\
  2392. \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{lad_A
  2393. samurAti 'l-.hayyi nAqifu .han.zali}\\
  2394. \bayt{wuqUfaN bi-hA .sa.hbI `alayya ma.tiyya-hum}{yaqUlUna lA
  2395. tahlik 'asaN_A wa-ta^gammali}\\
  2396. \bayt{wa-'inna ^sifA'I `abraTuN muharAqaTuN}{fa-hal `inda rasmiN
  2397. dAsiriN min mu`awwali}\\
  2398. \end{linenumbers*}
  2399. \end{arabverse}
  2400. \end{arabluaverbatim}
  2401. % \iffalse
  2402. %</example>
  2403. % \fi%
  2404. % \begin{arab}[fullvoc]
  2405. % qAla \uc{i}mru'u 'l-\uc{q}aysi fI mu`allaqati-hi:
  2406. % \end{arab}
  2407. %
  2408. % \begin{arabverse}[mode=fullvoc, metre={(al-.darbu 'l-_tAnI mina
  2409. % 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.25\linewidth]
  2410. % \SetArbDflt*
  2411. % \begin{linenumbers*}
  2412. % \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti
  2413. % 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
  2414. % \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
  2415. % rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
  2416. % \bayt{tar_A ba`ara 'l-'ar'Ami fI `ara.sAti-hA}{wa-qI`Ani-hA
  2417. % ka-'anna-hu .habbu fulfuli}\\
  2418. % \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{lad_A
  2419. % samurAti
  2420. % 'l-.hayyi nAqifu .han.zali}\\
  2421. % \bayt{wuqUfaN bi-hA .sa.hbI `alayya ma.tiyya-hum}{yaqUlUna lA
  2422. % tahlik 'asaN_A wa-ta^gammali}\\
  2423. % \bayt{wa-'inna ^sifA'I `abraTuN muharAqaTuN}{fa-hal `inda rasmiN
  2424. % dAsiriN min mu`awwali}\\
  2425. % \end{linenumbers*}
  2426. % \end{arabverse}
  2427. %
  2428. % \medskip
  2429. %
  2430. % \begin{arab}[trans]
  2431. % qAla \uc{i}mru'u 'l-\uc{q}aysi fI mu`allaqati-hi:
  2432. % \end{arab}
  2433. %
  2434. % \begin{arabverse}[mode=trans, metre={(al-.darbu 'l-_tAnI mina
  2435. % 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.4\linewidth]
  2436. % \SetArbDflt*
  2437. % \begin{linenumbers*}
  2438. % \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti
  2439. % 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
  2440. % \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
  2441. % rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
  2442. % \bayt{tar_A ba`ara 'l-'ar'Ami fI `ara.sAti-hA}{wa-qI`Ani-hA
  2443. % ka-'anna-hu .habbu fulfuli}\\
  2444. % \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{lad_A
  2445. % samurAti
  2446. % 'l-.hayyi nAqifu .han.zali}\\
  2447. % \bayt{wuqUfaN bi-hA .sa.hbI `alayya ma.tiyya-hum}{yaqUlUna lA
  2448. % tahlik 'asaN_A wa-ta^gammali}\\
  2449. % \bayt{wa-'inna ^sifA'I `abraTuN muharAqaTuN}{fa-hal `inda rasmiN
  2450. % dAsiriN min mu`awwali}\\
  2451. % \end{linenumbers*}
  2452. % \end{arabverse}
  2453. %
  2454. % \section{Special applications}
  2455. % \label{sec:special-applications}
  2456. % \phantomsection
  2457. % \paragraph{Linguistics}
  2458. % The same horizontal stroke as the \arb[trans]{ta.twIl} (see
  2459. % \vref{sec:tatwil}) may be encoded \meta{B}; \meta{BB} will receive
  2460. % the \arb[trans]{ta^sdId}. This is useful to make linguistic
  2461. % annotations and comments on vowels:---
  2462. % \begin{quote}
  2463. % |Bu| |Ba| |Bi| |BuN| |BaN| |BiN| \arb[voc]{Bu Ba Bi BuN BaN BiN}
  2464. % \arb[trans]{Bu Ba Bi BuN BaN BiN}, |BBu| |BBa| |BBi| \arb[voc]{BBu
  2465. % BBa BBi} \arb[trans]{BBu BBa BBi}, |B--aN| \arb[voc]{B--aN}
  2466. % \arb[trans]{B--aN}, |B"| \arb[voc]{B"}\,.
  2467. % \end{quote}
  2468. %
  2469. % \paragraph{Brackets}
  2470. % \phantomsection
  2471. % \NEWfeature{v1.4.3} The various bracket symbols are useful in
  2472. % technical documents such as critical editions for indicating that
  2473. % some words or some letters must be added or
  2474. % removed. \package{arabluatex} will automatically fit those symbols
  2475. % to the direction of the text. For the time being, the following
  2476. % symbols are supported:
  2477. % \begin{itemize}
  2478. % \item parentheses: |()|
  2479. % \item square brackets: |[]|
  2480. % \item angle brackets: |<>|
  2481. % \item braces: |{}|
  2482. % \end{itemize}
  2483. %
  2484. % \DescribeMacro{\abraces} Parentheses, square and angle brackets may
  2485. % be input directly at the keyboard; however, words or letters that
  2486. % are to be read between braces must be passed as arguments to the
  2487. % \cs{abraces} command:---%
  2488. % \iffalse
  2489. %<*example>
  2490. % \fi
  2491. \begin{arabluacode}
  2492. \begin{arab}
  2493. \abraces{wa-qAla} 'inna 'abI kAna mina 'l-muqAtilaTi
  2494. wa-kAna--<--t> 'ummI min `u.zamA'i buyUti 'l-zamAzimaTi.
  2495. \end{arab}
  2496. \end{arabluacode}
  2497. % \iffalse
  2498. %</example>
  2499. % \fi
  2500. %
  2501. % \paragraph{Additional Arabic marks}
  2502. % \label{sec:arabic-marks}
  2503. % In addition to common letters, many symbols and ligatures are
  2504. % encoded in Arabic Unicode standard, such as honorifics consisting of
  2505. % complex ligatures, and annotation signs used in the
  2506. % \arb[trans]{\uc{qur'An}} or in classical poetry.
  2507. %
  2508. % \DescribeMacro{\arbmark}
  2509. % \NEWfeature{v1.11}\cs{arbmark}\oarg{rl\textbar{}lr}\marg{shorthand}
  2510. % can be used to insert such characters either in Unicode or in
  2511. % romanized Arabic environments. It takes as argument a shorthand
  2512. % defined beforehand in a default list which consists of the following
  2513. % at the time of writing:---\\
  2514. % \begin{longtable}{llp{.3\linewidth}p{.3\linewidth}}
  2515. % \bottomrule
  2516. % \caption*{\Cref*{tab:arabtex-additional-marks}: Additional Arabic
  2517. % marks}
  2518. % \endfoot
  2519. % \captionlistentry{Additional Arabic marks}\\[-1em]
  2520. % \toprule
  2521. % Codepoint & Shorthand & Glyph & Transliteration \\ \midrule
  2522. % \endfirsthead
  2523. % \toprule
  2524. % Codepoint & Shorthand & Glyph & Transliteration \\ \midrule
  2525. % \endhead\label{tab:arabtex-additional-marks}%
  2526. % |FDFD| & |bismillah| & \arb{\arbmark{bismillah}} &
  2527. % \arbmark{bismillah} \\
  2528. % |FDF5| & |salam| & \arb{\arbmark{salam}} & \arbmark{salam} \\
  2529. % |FDFA| & |slm| & \arb{\arbmark{slm}} & \arbmark{slm} \\
  2530. % |FDFB| & |jalla| & \arb{\arbmark{jalla}} & \arbmark{jalla} \\
  2531. % \end{longtable}
  2532. %
  2533. % \NEWfeature{v1.13}
  2534. % The mark to be inserted is determined by contextual analysis, or by
  2535. % an optional argument, either |rl| to have the Arabic glyph printed,
  2536. % or |lr| to print the tranliterated equivalent.
  2537. %
  2538. % \DescribeMacro{\newarbmark} \NEWfeature{v1.11} \cs{newarbmark} is
  2539. % also provided should one wish to define new marks in addition to the
  2540. % marks defined above. This command takes three arguments, like so:---
  2541. % \arabluabox{\cs{newarbmark}\marg{shorthand}\marg{RTL
  2542. % codepoint}\marg{LTR rendition}}
  2543. %
  2544. % As regards the right-to-left codepoint, it may be either typed in
  2545. % Unicode or selected as Unicode codepoint. To that end, the \LaTeX\
  2546. % command \arabluaverb{\symbol{"XYZT}} or its plain \TeX\ variant
  2547. % \arabluaverb{\char"XYZT\relax} may be used, where |XYZT| are
  2548. % uppercase hex digits (|0| to |9| or |A| to |F|).
  2549. %
  2550. % It is also possible to use the so-called `|^^^^| notation' like so:
  2551. % \arabluaverb{^^^^xyzt}, where |xyzt| are lowercase hex digits (|0|
  2552. % to |9| or |a| to |f|).
  2553. %
  2554. % As regards the third argument (left-to-right rendition), it may be
  2555. % either left empty or typed by means of
  2556. % \cs{arb}|[trans]|\marg{arabtex code} so as to have it printed in
  2557. % romanized Arabic.%
  2558. % \iffalse
  2559. %<*example>
  2560. % \fi
  2561. \begin{arabluacode}[text only]
  2562. It must be noted that \cs{newarbmark} expects Arab\TeX\ input scheme
  2563. inside \cs{arb}|[trans]{}| to the exclusion of \textsf{buckwalter}
  2564. input scheme.
  2565. \end{arabluacode}
  2566. % \iffalse
  2567. %</example>
  2568. % \fi%
  2569. %
  2570. % The example below provides an implementation of this technique. It
  2571. % may be observed that \cs{arbcolor} is used so as to have the marks
  2572. % printed in red:---%
  2573. % \iffalse
  2574. %<*example>
  2575. % \fi
  2576. \begin{arabluacode}
  2577. \SetArbDflt*
  2578. \newarbmark{sly}{\arbcolor[red]{^^^^06d6}}{}
  2579. \newarbmark{jim}{\arbcolor[red]{^^^^06da}}{}
  2580. \begin{arab}
  2581. sUraTu 'l-nisA'i, 19:
  2582. \end{arab}
  2583. \begin{center}
  2584. \begin{arab}
  2585. \arbmark{bismillah}
  2586. \end{arab}
  2587. \end{center}
  2588. \begin{arab}[fullvoc]
  2589. y_a'ayyuhA 'lla_dIna 'a'manUA lA ya.hillu la-kum 'an tari_tUA
  2590. 'l-nisA'a karhaN\arbmark{sly} wa-lA ta`.dulU-hunna li-ta_dhabUA
  2591. bi-ba`.di mA 'a'taytumU-hunna 'illA 'an ya'tIna bi-fA.hi^saTiN
  2592. mubayyinaTiN\arbmark{jim} wa-`A^sirU-hunna
  2593. bi-'l-ma`rUfi\arbmark{jim} fa-'in karihtumU-hunna fa-`as_A_a
  2594. 'an takrahUA ^say'aN wa-ya^g`ala 'l-l_ahu fI-hi _hayraN
  2595. ka_tIraN ((19))
  2596. \end{arab}
  2597. \end{arabluacode}
  2598. % \iffalse
  2599. %</example>
  2600. % \fi
  2601. %
  2602. % \subsection{\texorpdfstring{The \prname{qur'An}}{The Qurʾān}}
  2603. % \label{sec:the-quran}
  2604. % This sub-part is destined to become a part of its own, as fine
  2605. % typesetting of \prname{qur'An}ic text is planned in the versions of
  2606. % \package{arabluatex} to come in the medium-term. New functions and
  2607. % new Arabic modes will be available as \package{arabluatex} will
  2608. % mature.
  2609. %
  2610. % \DescribeMacro{\ayah}\NEWfeature{v1.15}For the time being,
  2611. % \cs{ayah}\marg{3-digit number} is provided so as to typeset the
  2612. % number of the \arb[trans]{'AyaT} that it is referred to inside the
  2613. % dedicated mark---Unicode |U+06DD|: \txarb{^^^^06dd}---in Arabic
  2614. % script or inside parentheses in romanized Arabic:---
  2615. % \begin{quote}
  2616. % |\ayah{123}| \arb{\ayah{123}} \arb[trans]{\ayah{123}}.
  2617. % \end{quote}
  2618. %
  2619. % An example follows:---
  2620. % \iffalse
  2621. %<*example>
  2622. % \fi
  2623. \begin{arabluacode}
  2624. \SetArbDflt*
  2625. \newarbmark{alifsp}{^^^^0627}{\arb[trans]{'alif} }
  2626. \newarbmark{lamsp}{^^^^0644^^^^0653}{\arb[trans]{lAm} }
  2627. \newarbmark{mim}{^^^^0645^^^^0653}{\arb[trans]{mIm}}
  2628. \begin{arab}[fullvoc]
  2629. min ((sUraTi \uc{'l-b}aqaraTi)):
  2630. \end{arab}
  2631. \begin{arab}[fullvoc]
  2632. \arbmark{alifsp}\arbmark{lamsp}\arbmark{mim}~\ayah{1}
  2633. _d_alika 'l-kit_abu lA rayba fI-hi hudaN_A
  2634. li-l-muttaqIna~\ayah{2} 'lla_dIna yu'minUna bi-'l-.gaybi
  2635. wa-yuqImUna 'l-.sal_aUTa wa-mimmA razaqn_a-hum
  2636. yunfiqUna~\ayah{3}
  2637. \end{arab}
  2638. \end{arabluacode}
  2639. \begin{arabluacode}[text only]
  2640. \SetArbDflt*
  2641. \begin{arab}[trans]
  2642. min ((sUraTi \uc{'l-b}aqaraTi)):
  2643. \end{arab}
  2644. \begin{arab}[trans]
  2645. \arbmark{alifsp}\arbmark{lamsp}\arbmark{mim}~\ayah{1}
  2646. _d_alika 'l-kit_abu lA rayba fI-hi hudaN_A
  2647. li-l-muttaqIna~\ayah{2} 'lla_dIna yu'minUna bi-'l-.gaybi
  2648. wa-yuqImUna 'l-.sal_aUTa wa-mimmA razaqn_a-hum
  2649. yunfiqUna~\ayah{3}
  2650. \end{arab}
  2651. \end{arabluacode}
  2652. % \iffalse
  2653. %</example>
  2654. % \fi
  2655. %
  2656. % \paragraph{Caveat}
  2657. % For some reason, most of the Arabic fonts do not show the number
  2658. % properly: some are only able to display at most two digits, while
  2659. % others display the digits outside the \enquote*{end of
  2660. % \arb[trans]{'AyaT}} sign, let alone those that print the digits
  2661. % stacked. To the knowledge of the writer, this should be reported to
  2662. % the developpers of those fonts.
  2663. %
  2664. % \section{Color}
  2665. % \label{sec:color}
  2666. % \NEWfeature{v1.12}\package{arabluatex} is able to render in color
  2667. % either words, parts of words or diacritics. As the techniques
  2668. % implemented in this section may lead to some complexity, the reader
  2669. % should first become well acquainted with the following
  2670. % points:\footnote{Regarding the colors themselves and the way new
  2671. % colors can be defined in addition to those that are already
  2672. % available, please refer to the \package{xcolor} package.}---
  2673. % \begin{enumerate}
  2674. % \item The \enquote{pipe} character (\textbar, \vref{sec:pipe});
  2675. % \item \enquote*{Quoting} technique (\vref{sec:quoting}), and more
  2676. % specifically \enquote*{quoting the \arb[trans]{hamzaT}}
  2677. % (\vpageref{sec:quoting-hamza});
  2678. % \item Putting back on broken contextual analysis rules
  2679. % (\vref{sec:arbnull});
  2680. % \item Arabic marks (\vref{sec:arabic-marks}).
  2681. % \end{enumerate}
  2682. %
  2683. % \DescribeMacro{\arbcolor} \cs{arbcolor} takes the text to be colored
  2684. % into \meta{color} as an argument:---
  2685. % \arabluabox{\cs{arbcolor}\oarg{color}\marg{Arabic text}}
  2686. %
  2687. % \iffalse
  2688. %<*example>
  2689. % \fi
  2690. \begin{arabluacode}
  2691. \begin{arab}
  2692. \arbcolor[red]{al-bAbu 'l-_hAmisu} fI .tabaqAti 'l-'a.tibbA'i
  2693. 'lla_dIna kAnUA mun_du zamAni \uc{^gAlInUsa} wa-qarIbaN
  2694. min-hu. \arbcolor[red]{\uc{^gAlInUsu}}: wa-li-na.da` 'awwalaN
  2695. kalAmaN kulliyyaN fI 'a_hbAri \uc{^gAlInUsa} wa-mA kAna
  2696. `alay-hi...
  2697. \end{arab}
  2698. \begin{arab}[trans]
  2699. \arbcolor[red]{al-bAbu 'l-_hAmisu} fI .tabaqAti 'l-'a.tibbA'i
  2700. 'lla_dIna kAnUA mun_du zamAni \uc{^gAlInUsa} wa-qarIbaN
  2701. min-hu. \arbcolor[red]{\uc{^gAlInUsu}}: wa-li-na.da` 'awwalaN
  2702. kalAmaN kulliyyaN fI 'a_hbAri \uc{^gAlInUsa} wa-mA kAna
  2703. `alay-hi...
  2704. \end{arab}
  2705. \end{arabluacode}
  2706. % \iffalse
  2707. %</example>
  2708. % \fi
  2709. %
  2710. % As this example shows, \cs{arbcolor} has been used to render
  2711. % headings in red with the same encoding both in vocalized and in
  2712. % romanized Arabic. The same technique also applies to syllabes inside
  2713. % words. \package{arabluatex} takes care of selecting the appropriate
  2714. % shape of the letters while coloring them:---
  2715. % \begin{quote}\textbf{\enquote*{voc} mode}:\\
  2716. % |i^stara\arbcolor[brown]{y}tu-hu| |bi-_tama\arbcolor[red]{niN}|
  2717. % |'a`\arbcolor[blue]{^ga}ba-ka|
  2718. % \arb{i^stara\arbcolor[brown]{y}tu-hu bi-_tama\arbcolor[red]{niN}
  2719. % 'a`\arbcolor[blue]{^ga}ba-ka}
  2720. % \arb[trans]{i^stara\arbcolor[brown]{y}tu-hu
  2721. % bi-_tama\-\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}.
  2722. % \end{quote}
  2723. % \begin{quote}\textbf{\enquote*{fullvoc} mode}:\\
  2724. % |i^stara\arbcolor[brown]{y}tu-hu| |bi-_tama\arbcolor[red]{niN}|
  2725. % |'a`\arbcolor[blue]{^ga}ba-ka|
  2726. % \arb[fullvoc]{i^stara\arbcolor[brown]{y}tu-hu
  2727. % bi-_tama\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}
  2728. % \arb[trans]{i^stara\arbcolor[brown]{y}tu-hu
  2729. % bi-_tama\-\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}.
  2730. % \end{quote}
  2731. %
  2732. % \subsection{Tricks of the trade}
  2733. % \label{sec:color-tricks}
  2734. % \paragraph{Diacritics}
  2735. % Depending on the mode selected, either |voc|, |novoc| or |fullvoc|,
  2736. % coloring the diacritics requires more attention for the insertion of
  2737. % \cs{arbcolor} may prevent contextual analysis from being applied.
  2738. %
  2739. % Furthermore, depending on the surrounding letters, the standard
  2740. % encoding of short vowels \meta{u, a, i} may result either in
  2741. % diacritics or in a connective \arb[trans]{'alif} with the
  2742. % \arb[trans]{wa.slaT} or its accompanying vowel. As for the
  2743. % \arb[trans]{sukUn}, it is generated by contextual analysis. Thus
  2744. % applying colors to bare diacritics requires them to have specific
  2745. % encodings.
  2746. %
  2747. % \Cref{tab:arbcolor-diacritics} gives the Arab\TeX\ equivalents for
  2748. % the diacritics to be printed inside or just after \cs{arbcolor}.
  2749. %
  2750. % \needspace{7\baselineskip}
  2751. % \begin{longtable}{lllll}
  2752. % \bottomrule
  2753. % \caption*{\Cref*{tab:arbcolor-diacritics}: Arab\TeX\ diacritics
  2754. % for \cs{arbcolor}}
  2755. % \endfoot
  2756. % \captionlistentry{Arab\TeX\ diacritics for \cs{arbcolor}}\\[-1em]
  2757. % \toprule
  2758. % Diacritic & \multicolumn{3}{l}{Transliteration\footnotemark}
  2759. % & Arab\TeX\ notation \\
  2760. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  2761. % \endfirsthead
  2762. % \toprule
  2763. % Diacritic & \multicolumn{3}{l}{Transliteration}
  2764. % & Arab\TeX\ notation \\
  2765. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
  2766. % \endhead \footnotetext{See below \vref{sec:transliteration}.}
  2767. % \label{tab:arbcolor-diacritics}
  2768. % \arb{B.a} & \dmg{.a} & \loc{.a} & \brill{.a} & \verb|.a| \\
  2769. % \pagebreak[1]
  2770. % \arb{B.u} & \dmg{.u} & \loc{.u} & \brill{.u} & \verb|.u| \\
  2771. % \arb{B.i} & \dmg{.i} & \loc{.i} & \brill{.i} & \verb|.i| \\ \midrule
  2772. % \arb{Bo} & \dmg{o} & \loc{o} & \brill{o} & \verb|o| \\
  2773. % \end{longtable}
  2774. %
  2775. % The following examples show how the letters, or the diacritics above
  2776. % or under them or both the letters and the diacritics can be rendered
  2777. % in different colors:---
  2778. % \begin{quote}\textbf{\enquote*{voc} mode}:\\
  2779. % |i^staraytu-hu| |bi-_taman\arbcolor[red]{iN}|
  2780. % |'a`^g\arbcolor[red]|\allowbreak|{.a}ba-ka|
  2781. % \arb{i^staraytu-hu bi-_taman\arbcolor[red]{iN}
  2782. % 'a`^g\arbcolor[red]{.a}ba-ka}
  2783. % \arb[trans]{i^staraytu-hu bi-_taman\arbcolor[red]{iN}
  2784. % 'a`^g\arbcolor[red]{.a}ba-ka}.
  2785. %
  2786. % |i^staraytu-hu| |bi-_tama\arbcolor[red]{n}iN|
  2787. % |'a`\arbcolor[red]|\allowbreak|{^g}.aba-ka|
  2788. % \arb{i^staraytu-hu bi-_tama\arbcolor[red]{n}iN
  2789. % 'a`\arbcolor[red]{^g}.aba-ka}
  2790. % \arb[trans]{i^staraytu-hu bi-_tama\arbcolor[red]{n}iN
  2791. % 'a`\arbcolor[red]{^g}.aba-ka}.
  2792. %
  2793. % |i^staraytu-hu| |bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN}|
  2794. % |'a`\arbcolor[red]|\allowbreak|{^g}\arbcolor[blue]{.a}ba-ka|
  2795. % \arb{i^staraytu-hu bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN}
  2796. % 'a`\arbcolor[red]{^g}\arbcolor[blue]{.a}ba-ka} \linebreak
  2797. % \arb[trans]{i^staraytu-hu
  2798. % bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN}
  2799. % 'a`\arbcolor[red]{^g}\arbcolor[blue]{.a}ba-ka}.
  2800. % \end{quote}
  2801. %
  2802. % \begin{quote}\textbf{\enquote*{fullvoc} mode}:\\
  2803. % |i^staray"\arbcolor[red]{o}tu-hu| |bi-_taman"\arbcolor[red]{iN}|
  2804. % |'a`^g"\arbcolor[red]{.a}ba-ka|
  2805. % \arb[fullvoc]{i^staray"\arbcolor[red]{o}tu-hu
  2806. % bi-_taman"\arbcolor[red]{iN} 'a`^g"\arbcolor[red]{.a}ba-ka}
  2807. % \arb[trans]{i^staray"\arbcolor[red]{o}tu-hu
  2808. % bi-_taman"\arbcolor[red]{iN}
  2809. % \linebreak 'a`^g"\arbcolor[red]{.a}ba-ka}.
  2810. %
  2811. % |i^stara\arbcolor[red]{y"}otu-hu| |bi-_tama\arbcolor[red]{n"}iN|
  2812. % |'a`\arbcolor[red]|\allowbreak|{^g"}.aba-ka|
  2813. % \arb[fullvoc]{i^stara\arbcolor[red]{y"}otu-hu
  2814. % bi-_tama\arbcolor[red]{n"}iN 'a`\arbcolor[red]{^g"}.aba-ka}
  2815. % \arb[trans]{i^stara\arbcolor[red]{y"}otu-hu
  2816. % bi-_tama\arbcolor[red]{n"}iN 'a`\arbcolor[red]{^g"}.aba-ka}.
  2817. %
  2818. % |i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu|
  2819. % |bi-_tama\arb|\allowbreak|color[red]{n"}\arbcolor[blue]{iN}|
  2820. % |'a`\arbcolor[red]|\allowbreak|{^g"}\arb|\allowbreak%
  2821. % |color[blue]{.a}ba-ka|
  2822. % \arb[fullvoc]{i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu
  2823. % bi-_tama\arbcolor[red]{n"}\arbcolor[blue]{iN}
  2824. % 'a`\arbcolor[red]{^g"}\arbcolor[blue]{.a}ba-ka}
  2825. % \arb[trans]{i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu
  2826. % bi-_tama\arbcolor[red]{n"}\arbcolor[blue]{iN}
  2827. % 'a`\arbcolor[red]{^g"}\arbcolor[blue]{.a}ba-ka}.
  2828. % \end{quote}
  2829. %
  2830. % As can be seen, |fullvoc| required the letters |y|, |n| and |^g|
  2831. % before \cs{arbcolor} to be \enquote*{quoted}. Otherwise, unwanted
  2832. % \arb[trans]{sukUn}\txtrans{s} would have been generated because of
  2833. % the absence of a vowel after those consonants.
  2834. %
  2835. % \paragraph{\texorpdfstring{\arb[trans]{tanwIn}}{tanwīn}}
  2836. % \cs{arbnull} must be used with \arb[trans]{fat.haTAn} (\arb{BaN}) so
  2837. % as to put back on contextual analysis rules:---
  2838. % \begin{quote}
  2839. % |mu`allim\arbcolor[red]{\arbnull{m}aN}|
  2840. % \arb{mu`allim\arbcolor[red]{\arbnull{m}aN}}
  2841. % \arb[trans]{mu`allim\arbcolor[red]{\arbnull{m}aN}},\\
  2842. % |istisqA'\arbcolor[red]{\arbnull{A'}aN}|
  2843. % \arb{istisqA'\arbcolor[red]{\arbnull{A'}aN}}
  2844. % \arb[trans]{istisqA'\arbcolor[red]{\arbnull{A'}aN}},\\
  2845. % |^say'\arbcolor[red]{\arbnull{ay'}aN}|
  2846. % \arb{^say'\arbcolor[red]{\arbnull{ay'}aN}}
  2847. % \arb[trans]{^say'\arbcolor[red]{\arbnull{ay'}aN}},\\
  2848. % \verb+^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}+
  2849. % \arb{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}
  2850. % \arb[trans]{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}.
  2851. % \end{quote}
  2852. % \begin{quoting}
  2853. % \textsc{Rem.} Note that in the last example
  2854. % (\arb[trans]{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}), the
  2855. % \enquote*{pipe} character has been inserted before
  2856. % \cs{arbcolor}. Otherwise, the |dmg| mode of the transliteration
  2857. % rules would have interpreted the \arb[trans]{tA' marbU.taT} as
  2858. % \emph{final} (e.g. \txtrans{h} instead of the expected
  2859. % \txtrans{t}).\footnote{See also \vpageref{ref:ta-marbutah-pipe}
  2860. % \enquote{Discarding the \arb[trans]{'i`rAb}} for more
  2861. % information.}
  2862. % \end{quoting}
  2863. %
  2864. % The \arb[trans]{tanwIn} preceding a \arb[novoc]{_A} conveys even
  2865. % more intricate business to the rendering with the utmost accuracy in
  2866. % both romanized and non-romanized modes. First, a new Arabic mark
  2867. % needs to be defined. It should print \arb[novoc]{_A} in Arabic
  2868. % script and not a thing in transliteration. It is to be appended after
  2869. % \cs{arbcolor}, like so:---
  2870. % \iffalse
  2871. %<*example>
  2872. % \fi
  2873. \begin{arabluacode}
  2874. \newarbmark{Y}{^^^^0649}{}
  2875. \arb{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}}
  2876. \arb[trans]{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}}
  2877. \end{arabluacode}
  2878. % \iffalse
  2879. %</example>
  2880. % \fi%
  2881. %
  2882. % \paragraph{\texorpdfstring{\arb[trans]{wa.slaT} and
  2883. % \arb[trans]{maddaT}}{waṣlah and maddah}}
  2884. % Both can be generated with the help of \cs{arbnull}:---
  2885. % \begin{quote}
  2886. % |wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN|
  2887. % \arb[fullvoc]{wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN}
  2888. % \arb[trans]{wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN}\footnote{To
  2889. % the knowledge of the writer, the \arb[trans]{wa.slaT} alone is not
  2890. % part of the Arabic Unicode block.}.
  2891. %
  2892. % |fI| |"al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i|
  2893. % \arb[fullvoc]{fI "al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i}
  2894. % \linebreak
  2895. % \arb[trans]{fI "al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i}.
  2896. %
  2897. % |\arbcolor[red]{'a'\arbnull{k}}kulu|
  2898. % \arb{\arbcolor[red]{'a'\arbnull{k}}kulu}
  2899. % \arb[trans]{\arbcolor[red]{'a'\arbnull{k}}kulu},\\
  2900. % |\arbcolor[red]{'A\arbnull{k}}kiluN|
  2901. % \arb{\arbcolor[red]{'A\arbnull{k}}kiluN}
  2902. % \arb[trans]{\arbcolor[red]{'A\arbnull{k}}kiluN}.
  2903. % \end{quote}
  2904. %
  2905. % The Unicode codepoint of the \arb[trans]{maddaT} is 0653, while bare
  2906. % \arb[trans]{'alif} is 0627. So:--- %
  2907. % \iffalse
  2908. %<*example>
  2909. % \fi
  2910. \begin{arabluacode}
  2911. \newarbmark{alifmaddahred}{^^^^0627\arbcolor[red]{^^^^0653}}%
  2912. {\arb[trans]{\arbcolor[red]{'a'\arbnull{k}}}}
  2913. \arb{\arbmark{alifmaddahred}kulu}
  2914. \arb[trans]{\arbmark{alifmaddahred}kulu}.
  2915. \end{arabluacode}
  2916. % \iffalse
  2917. %</example>
  2918. % \fi%
  2919. %
  2920. % \begin{quoting}
  2921. % \textsc{Rem.} In the preceding example, any consonant could have
  2922. % been passed as argument to the \cs{arbnull} command.
  2923. % \end{quoting}
  2924. %
  2925. % \paragraph{\texorpdfstring{\arb[trans]{^sad\-daT}}{šaddah}}
  2926. % In the following example, it is assumed that the
  2927. % \arb[trans]{^saddaT} above the letter \arb[novoc]{l} in
  2928. % \arb[fullvoc]{al-mu`allimUna}, \arb[trans]{al-mu`allimUna}, is to be
  2929. % rendered in red. Thus the Arabic mark must generate the
  2930. % \arb[trans]{^saddaT} alone---of which the Unicode codepoint is
  2931. % 0651---in Arabic script and the letter \enquote*{l} in
  2932. % transliteration:--- %
  2933. %\iffalse
  2934. %<*example>
  2935. % \fi
  2936. \begin{arabluacode}
  2937. \newarbmark{lamshaddah}{^^^^0651}{l}
  2938. \arb[fullvoc]{al-mu`al"\arbcolor[red]{\arbmark{lamshaddah}}.imUna}
  2939. \arb[trans]{al-mu`al"\arbcolor[red]{\arbmark{lamshaddah}}.imUna}.
  2940. \end{arabluacode}
  2941. % \iffalse
  2942. %</example>
  2943. % \fi%
  2944. %
  2945. % \paragraph{\texorpdfstring{The definite article and the euphonic
  2946. % \arb[trans]{ta^sdId}}{The definite article and the euphonic tašdīd}}
  2947. % The intricate business of rendering in color the initial
  2948. % \arb[trans]{'alif al-wa.sl} of the definite article followed by a
  2949. % solar consonant must be unraveled.
  2950. %
  2951. % From the examples provided above, in |fI 'l-nAsi| \arb[fullvoc]{fI
  2952. % 'l-nAsi} \arb[trans]{fI 'l-nAsi}, the initial \arb[trans]{'alif-u
  2953. % 'l-wa.sl-i} can be rendered in red like so:
  2954. % |\arbcolor[red]{\arbnull{al-}a}|
  2955. % \arb[fullvoc]{\arbcolor[red]{\arbnull{al-}a}}. Then, the following
  2956. % two letters, namely |l-n|, must print the string \arb[trans]{lAm}
  2957. % $+$ \arb[trans]{nUn} $+$ \arb[trans]{^saddaT} in Arabic, and exactly
  2958. % \txtrans{n-n} in transliteration. Thus an Arabic mark is
  2959. % needed:--- %
  2960. % \iffalse
  2961. %<*example>
  2962. % \fi
  2963. \begin{arabluacode}
  2964. \newarbmark{lnn}{^^^^0644^^^^0646^^^^0651}{n-n}
  2965. \arb[fullvoc]{fI\arbnull{al-}
  2966. \arbcolor[red]{\arbnull{al-}a}\arbmark{lnn}Asi}
  2967. \arb[trans]{fI\arbnull{al-}
  2968. \arbcolor[red]{\arbnull{al-}a}\arbmark{lnn}Asi}.
  2969. \end{arabluacode}
  2970. % \iffalse
  2971. %</example>
  2972. % \fi%
  2973. %
  2974. % \paragraph{\texorpdfstring{\arb[trans]{hamzaT}}{hamzah}}
  2975. % The \enquote*{quoting} technique provides an easy way to determine
  2976. % the carrier of the \arb[trans]{hamzaT}, as shown in
  2977. % \vref{tab:quoted-hamza}---:
  2978. % \begin{quote}
  2979. % \verb+yatasA\arbnull{'a}\arbcolor[red]{|"'}.alUna+
  2980. % \arb{yatasA\arbnull{'a}\arbcolor[red]{|"'}.alUna}
  2981. % \arb[trans]{yatasA\arbnull{'a}\-\arbcolor[red]{|"'}.a\-lUna},
  2982. % \verb+^say\arbcolor[red]{|"'}\arbnull{'}aN+
  2983. % \arb{^say\arbcolor[red]{|"'}\arbnull{'}aN}
  2984. % \arb[trans]{^say\arbcolor[red]{|"'}\arbnull{'}aN},
  2985. % \verb+^say\ar+\allowbreak\verb+bcolor[red]{|"'}iN+
  2986. % \arb{^say\arbcolor[red]{|"'}iN}
  2987. % \arb[trans]{^say\arbcolor[red]{|"'}iN},
  2988. % |\arbcolor[red]{a"'}.as\arbcolor|\allowbreak|[red]{y"'}.ilaTuN|
  2989. % \arb{\arbcolor[red]{a"'}.as\arbcolor[red]{y"'}.ilaTuN}
  2990. % \arb[trans]{\arbcolor[red]{a"'}.as\arbcolor[red]{y"'}.ilaTuN}.
  2991. % \end{quote}
  2992. %
  2993. %
  2994. % \section{Transliteration}
  2995. % \label{sec:transliteration}
  2996. % It may be more appropriate to speak of \enquote{romanization} than
  2997. % \enquote{transliteration} of Arabic. As seen above in
  2998. % \cref{sec:options} \vpagerefrange{sec:options}{sec:local-options},
  2999. % the \enquote{transliteration mode} may be selected globally or locally.
  3000. %
  3001. % This mode transliterates the Arab\TeX\ input into one of the
  3002. % accepted standards. As said above \vpageref{ref:describe-trans},
  3003. % three standards are supported at present:
  3004. % \begin{description}
  3005. % \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which was
  3006. % adopted by the International Convention of Orientalist Scholars in
  3007. % Rome in 1935.\footnote{See \textcite{dmg}.} |dmg| transliteration
  3008. % convention is selected by default;
  3009. % \item[loc] \emph{Library of Congress}: this standard is part of a
  3010. % large set of standards for romanization of non-roman scripts
  3011. % adopted by the American Library Association and the Library of
  3012. % Congress;\footnote{See
  3013. % \url{http://www.loc.gov/catdir/cpso/roman.html} for the
  3014. % \href{http://www.loc.gov/catdir/cpso/romanization/arabic.pdf}{source
  3015. % document concerning Arabic language}.}
  3016. % \item[arabica] \NEWfeature{v1.8}
  3017. % \changes{v1.8}{2017/03/30}{\texttt{arabica} transliteration
  3018. % standard is now supported} \emph{Journal of Arabic and Islamic
  3019. % Studies}/\emph{Revue d'études arabes et islamiques}: this standard
  3020. % is most widely used by scholars in the field of Arabic
  3021. % studies.\footnote{See
  3022. % \url{http://www.brill.nl/files/brill.nl/specific/authors_instructions/ARAB.pdf}.}
  3023. % \end{description}
  3024. % More standards will be included in future releases of
  3025. % \package{arabluatex}.
  3026. %
  3027. % \paragraph{Convention} \DescribeMacro{\SetTranslitConvention} The
  3028. % transliteration mode, which is set to |dmg| by default, may be
  3029. % changed at any point of the document by the
  3030. % \cs{SetTranslitConvention}\marg{mode} command , where \meta{mode}
  3031. % may be either |dmg|, |loc| or |arabica|. This command is also
  3032. % accepted in the preamble should one wish to set the transliteration
  3033. % mode globally, e.g.:---%
  3034. % \iffalse
  3035. %<*example>
  3036. % \fi
  3037. \begin{arabluaverbatim}
  3038. \usepackage{arabluatex}
  3039. \SetTranslitConvention{loc}
  3040. \end{arabluaverbatim}
  3041. % \iffalse
  3042. %</example>
  3043. % \fi
  3044. %
  3045. % \paragraph{Style} \DescribeMacro{\SetTranslitStyle} Any
  3046. % transliterated Arabic text is printed in italics by default. This
  3047. % also can be changed either globally in the preamble or locally at
  3048. % any point of the document by the \cs{SetTranslitStyle}\marg{style}
  3049. % command, where \meta{style} may be any font shape selection
  3050. % command, e.g. \cs{upshape}, \cs{itshape}, \cs{slshape}, and so forth.
  3051. %
  3052. % \paragraph{Font} \NEWfeature{v1.4} \DescribeMacro{\SetTranslitFont}
  3053. % \cs{SetTranslitFont}\marg{font selection command} allows any
  3054. % specific font to be selected for rendering transliterated text with
  3055. % the font-selecting commands of the \package{fontspec} or
  3056. % \package{luaotfload} package. Of course, this font must have been
  3057. % defined properly. To take one example, here is how the \emph{Gentium
  3058. % Plus} font can be used for rendering transliterated text:---
  3059. % \iffalse
  3060. %<*example>
  3061. % \fi
  3062. \begin{arabluaverbatim}
  3063. \newfontfamily\translitfont{Gentium Plus}[Ligatures=TeX]
  3064. \SetTranslitFont{\translitfont}
  3065. \end{arabluaverbatim}
  3066. % \iffalse
  3067. %</example>
  3068. % \fi
  3069. %
  3070. % \paragraph{Proper names} \DescribeMacro{\uc} Proper names or book
  3071. % titles that must have their first letters uppercased may be passed
  3072. % as arguments to the \cs{uc}\marg{word} command. \cs{uc} is a
  3073. % clever command, for it will give the definite article
  3074. % \arb[trans]{al-} in lower case in all positions. Moreover, if the
  3075. % inital letter, apart from the article, cannot be uppercased,
  3076. % viz. \arb[trans]{|"'} or \arb[trans]{`}, the letter next to it will be
  3077. % uppercased:---
  3078. % \begin{quote}
  3079. % |\uc{.hunayn-u}| |bn-u| |\uc{'is.h_aq-a}|
  3080. % \arb[voc]{\uc{.hunayn-u} bn-u \uc{'is.h_aq-a}}
  3081. % \arb[trans]{\uc{.hunayn-u} bn-u \uc{'is.h_aq-a}},
  3082. % |\uc{`u_tm_an-u}| \arb[voc]{\uc{`u_tm_an-u}}
  3083. % \arb[trans]{\uc{`u_tm_an-u}}, |.daraba| |\uc{zayd-u}| |bn-u|
  3084. % |\uc{_h_alidiN}| |\uc{sa`d-a}| |bn-a| |\uc{`awf-i}| |bn-i|
  3085. % |\uc{|\allowbreak|`abd-i}| |\uc{'l-l_ah-i}|
  3086. % \arb[fullvoc]{.daraba \uc{zayd-u} bn-u \uc{_h_alidiN}
  3087. % \uc{sa`d-a} bn-a \uc{`awf-i} bn-i \uc{`abd-i} \uc{'l-l_ah-i}}
  3088. % \arb[trans]{.daraba \uc{zayd-u} bn-u \uc{_h_alidiN} \uc{sa`d-a}
  3089. % bn-a \uc{`awf-i} bn-i \uc{`abd-i} \uc{'l-l_ah-i}}.
  3090. % \end{quote}
  3091. % However, \cs{uc} must be used cautiously in some very particular
  3092. % cases, for the closing brace of its argument may prevent a rule from
  3093. % being applied. To take an example, as seen above
  3094. % \vpageref{ref:muhammaduni}, the transliteration of
  3095. % \arb[fullvoc]{\uc{m}u.hammaduN 'l-nabI} must be
  3096. % \arb[trans]{\uc{m}u.hammaduN 'l-nabI}, as nouns having the
  3097. % \arb[trans]{tanwIn} take a \arb[trans]{kasraT} in pronunciation
  3098. % before \arb[trans]{'alifu 'l-wa.sli}. In that case, encoding
  3099. % \arb[fullvoc]{mu.hammaduN} like so: |\uc{mu.hammaduN}| is wrong,
  3100. % because the closing brace would prevent \package{arabluatex} from
  3101. % detecting the sequence \meta{-uN} immediately followed by
  3102. % \meta{'l-}. Fortunately, this can be circumvented in a
  3103. % straightforward way by inserting only part of the noun in the
  3104. % argument of \cs{uc} vz. up to the first letter that is to be
  3105. % uppercased, like so: |\uc{m}u.hammaduN|.
  3106. %
  3107. % \paragraph{Hyphenation}
  3108. % In case transliterated Arabic words break the \TeX\ hyphenation
  3109. % algorithm, one may use the |\-| command to insert discretionary
  3110. % hyphens. This command will be discarded in all of the Arabic modes
  3111. % of \package{arabluatex}, but will be processed by any of the
  3112. % transliteration modes:---
  3113. % \begin{quote}
  3114. % |\uc{'abU}| |\uc{bakriN}| |\uc{mu\-.ham\-madu}| |bnu|
  3115. % |\uc{za\-ka| |\-riy\-yA'a}| |\uc{'l-rAziyyu}| \arb{\uc{'abU}
  3116. % \uc{bakriN} \uc{mu\-.ham\-mad-u} bnu \uc{za\-ka\-riy\-yA'a}
  3117. % \uc{'l-rAziyyu}} \arb[trans]{\uc{'abU} \uc{bakriN}
  3118. % \uc{mu\-.ham\-mad-u} bn-u \uc{za\-ka\-riy\-yA'-a}
  3119. % \uc{'l-rAziyyu}}.
  3120. % \end{quote}
  3121. %
  3122. % \paragraph{\enquote*{Long} pro\-per names}
  3123. % \NEWfeature{v1.10} \cs{uc} is also able to process proper names
  3124. % consisting of several subsequent words:---
  3125. % \begin{quote}
  3126. % |\arb[trans]{\uc{'abU| |zaydiN| |.hunaynu| |bnu| |'is.h_aqa|
  3127. % |'l-`ibAdiyyu}}| \arb[trans]{\uc{'abU zaydiN .hunaynu bnu
  3128. % 'is.h_aqa 'l-`ibAdiyyu}}.
  3129. % \end{quote}
  3130. %
  3131. % \paragraph{Proper names outside Arabic environments}
  3132. % \changes{v1.10}{2018/01/03}{\cs{uc} supersedes \cs{cap}}
  3133. % \DescribeMacro{\prname}\NEWfeature{v1.10} Transliterated proper
  3134. % names inserted in paragraphs of English text should be printed in
  3135. % the same typeface as the surrounding text. \cs{prname}\marg{Arabic
  3136. % proper name} is provided to that effect:\footnote{Just as \cs{uc},
  3137. % \cs{prname} is also able to process proper names consisting of
  3138. % several subsequent words.}---
  3139. %\iffalse
  3140. %<*example>
  3141. % \fi
  3142. \begin{arabluacode}
  3143. From \textcite[i. 23 C]{Wright}:--- If the name following
  3144. \arb[fullvoc]{ibnuN} be that of the mother or the grandfather, the
  3145. \arb[fullvoc]{"a} is retained; as \arb[fullvoc]{`Is_A ibnu maryama},
  3146. \enquote{Jesus the son of Mary}; \arb[fullvoc]{`ammAru ibnu
  3147. man.sUriN}, \enquote{\prname{`ammAr} the (grand)son of
  3148. \prname{man.sUr}}.
  3149. \end{arabluacode}
  3150. % \iffalse
  3151. %</example>
  3152. % \fi
  3153. %
  3154. % The following example shows how \cs{prname} can be used in
  3155. % conjunction with the \package{nameauth} package to have Arabic
  3156. % proper names printed first in full then in partial
  3157. % forms:\footnote{See the documentation of \package{nameauth} for more
  3158. % details: \url{https://ctan.org/pkg/nameauth}}--- %
  3159. %\iffalse
  3160. %<*example>
  3161. % \fi
  3162. \begin{arabluacode}
  3163. \begin{nameauth}
  3164. \< Hunayn & \prname{'abU zayd} & \prname{.hunayn}, \prname{{i}bn
  3165. 'is.h_aq al-`ibAdiyy} & > %
  3166. \< Razi & \prname{'abU bakr mu.hammad ibn zakariyyA'} &
  3167. \prname{al-rAziyy} & > %
  3168. \end{nameauth}
  3169. On first occurrence, proper names are printed as \Hunayn, \Razi.
  3170. Then as \Hunayn, \Razi.
  3171. \end{arabluacode}
  3172. % \iffalse
  3173. %</example>
  3174. % \fi
  3175. %
  3176. % \begin{quoting}\label{ref:prname-star}
  3177. % \textsc{Rem.} \DescribeMacro{\prname*} \package{arabluatex} also
  3178. % provides \cs{prname*} which only renders in upright roman style
  3179. % already transliterated proper names without applying any further
  3180. % processing. It is mostly used internally and applied to proper
  3181. % names exported in Unicode to an external selected
  3182. % file.\footnote{See below \vref{sec:arabtex2utf} for more details.}
  3183. % \end{quoting}
  3184. %
  3185. % \subsection{Additional note on \texttt{dmg} convention}
  3186. % \label{sec:additional-note-dmg}
  3187. % \NEWfeature{v1.3} According to \textcite[6]{dmg}, Arabic
  3188. % \arb[trans]{'i`rAb} may be rendered into |dmg| in three different
  3189. % ways:
  3190. % \begin{enumerate}
  3191. % \item \label{ref:dmg-full-rend}In full:
  3192. % \NoArbUp\arb[trans]{\uc{`amruNU}}\ArbUpDflt\,;
  3193. % \item \label{ref:dmg-up-rend}As superscript text:
  3194. % \arb[trans]{\uc{`amruNU}}\,;
  3195. % \item \label{ref:irab-discarded}Discarded: \arb[trans]{\uc{`amr}}.
  3196. % \end{enumerate}
  3197. % \DescribeMacro{\arbup} By default, \package{arabluatex} applies rule
  3198. % \ref{ref:dmg-up-rend}. Once delimited by a set of Lua functions,
  3199. % \arb[trans]{'i`rAb} is passed as an argument on to a \cs{arbup}
  3200. % command which is set to \cs{textsuperscript}.
  3201. %
  3202. % \DescribeMacro{\NoArbUp} \DescribeMacro{\ArbUpDflt} \cs{NoArbUp} may
  3203. % be used either in the preamble or at any point of the document in
  3204. % case one wishes to apply rule \ref{ref:dmg-full-rend}. The default
  3205. % rule \ref{ref:dmg-up-rend} can be set back with \cs{ArbUpDflt} at
  3206. % any point of the document.
  3207. %
  3208. % \DescribeMacro{\SetArbUp} Finally, \cs{SetArbUp}\marg{formatting
  3209. % directives} can be used to customize the way \arb[trans]{'i`rAb} is
  3210. % displayed. To take one example, here is how Arabic
  3211. % \arb[trans]{'i`rAb} may be rendered as subscript text:---
  3212. % \iffalse
  3213. %<*example>
  3214. % \fi
  3215. \begin{arabluacode}
  3216. \SetArbUp{\textsubscript{#1}}
  3217. Arabic |dmg| transliteration for \arb{ra'aytu ^gAmi`aN
  3218. muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu
  3219. ^gAmi`aN muhaddamaTaN mi'_danatu-hu.}
  3220. \end{arabluacode}
  3221. % \iffalse
  3222. %</example>
  3223. % \fi
  3224. %
  3225. % As shown in the above example, |#1| is the token that is replaced
  3226. % with the actual \arb[trans]{tanwIn} in the formatting directives of
  3227. % the \cs{SetArbUp} command.
  3228. %
  3229. % \paragraph{\texorpdfstring{\arb[trans]{'i`rAb} boundaries}{ʾiʿrāb
  3230. % boundaries}}
  3231. % Every declinable noun (\arb[trans]{mu`rab}) may be declined either
  3232. % with or without \arb[trans]{tanwIn}, viz. \arb[trans]{mun.sarifuN}
  3233. % or \arb[trans]{.gayr-u mun.sarifiN}. The former is automatically
  3234. % parsed by \package{arabluatex}, whereas the latter has to be
  3235. % delimited with an hyphen, like so:---
  3236. % \begin{quote}
  3237. % \arb[trans]{\textbf{mun.sarif}}: |mu`allimuN|
  3238. % \arb[voc]{mu`allimuN} \arb[trans]{mu`allimuN}, |kA'inuN|
  3239. % \arb[voc]{kA'inuN} \arb[trans]{kA'inuN}, |kA'inAtuN|
  3240. % \arb[voc]{kA'inAtuN} \arb[trans]{kA'inAtuN}, |\uc{`amraNU}|
  3241. % \arb[voc]{\uc{`amraNU}} \arb[trans]{\uc{`amraNU}}, |fataN_A|
  3242. % \arb[voc]{fataN_A} \arb[trans]{fataN_A}, |qA.diNI| \arb{qA.diNI}
  3243. % \arb[trans]{qA.diNI}.
  3244. %
  3245. % \arb[trans]{\textbf{.gayr mun.sarif}}: |al-mu`allim-u|
  3246. % \arb[voc]{al-mu`allim-u} \arb[trans]{al-mu`allim-u}, |kitAb-Ani|
  3247. % \arb[voc]{kitAb-Ani} \arb[trans]{kitAb-Ani}, |ra^sa'-Ani|
  3248. % \arb[voc]{ra^sa'-Ani} \arb[trans]{ra^sa'-Ani}, |sAriq-Una|
  3249. % \arb[voc]{sAriq-Una} \arb[trans]{sAriq-Una}, |qA.d-Una|
  3250. % \arb[voc]{qA.d-Una} \arb[trans]{qA.d-Una}, |al-.zulm-Atu|
  3251. % \arb[voc]{al-.zulm-Atu} \arb[trans]{al-.zulm-Atu}.
  3252. % \end{quote}
  3253. %
  3254. % \begin{quoting}
  3255. % \textsc{Rem.}~\emph{a.} As the \arb[trans]{tanwIn} is passed over
  3256. % in pronunciation when it is followed by the letters
  3257. % \arb[novoc]{r}, \arb[novoc]{l}, \arb[novoc]{m}, \arb[novoc]{w},
  3258. % \arb[novoc]{y} (see \vref{ref:assimilation}), it may be desirable
  3259. % to further distinguish it by putting it above the line, but not to
  3260. % do the same for \arb[trans]{.gayr mun.sarif} terminations. This
  3261. % can be achieved by simply omitting the hyphen before any
  3262. % \arb[trans]{.gayr mun.sarif} termination:---\\
  3263. % |kAna| |.ganiyyaN| |l_akinna-hu| |labisa| |^gubbaTaN| |mumazzaqaN|
  3264. % |'aydu-hA| \arb[voc]{kAna .ganiyyaN l_akinna-hu labisa ^gubbaTaN
  3265. % mumazzaqaN 'aydu-hA} \arb[trans]{kAna .ganiyyaN l_akinna-hu labisa
  3266. % ^gubbaTaN mumazzaqaN 'aydu-hA}.
  3267. %
  3268. % \textsc{Rem.}~\emph{b.} Although the hyphen before the
  3269. % \arb[trans]{tanwIn} is optional as \package{arabluatex} always
  3270. % parses nouns with such termination, it may also be used to mark
  3271. % better the inflectional endings:---\\
  3272. % |mana`a| |'l-nAs-a| |kAffaT-aN| |min| |mu_hA.tabati-hi|
  3273. % |'a.had-uN| |bi-sayyidi-nA| \arb[voc]{mana`a 'l-nAs-a kAffaT-aN
  3274. % min mu_hA.tabati-hi 'a.had-uN bi-sayyidi-nA} \arb[trans]{mana`a
  3275. % 'l-nAs-a kAffaT-aN min mu_hA.tabati-hi 'a.had-uN bi-sayyidi-nA}.
  3276. % \end{quoting}
  3277. %
  3278. % \paragraph{\texorpdfstring{Discar\-ding the
  3279. % \arb[trans]{'i`rAb}}{Discarding the ʾiʿrāb}}
  3280. % \label{ref:ta-marbutah-pipe}
  3281. % As said above (\vref{ref:irab-discarded}), the \arb[trans]{'i`rAb}
  3282. % may be discarded in some cases, as in transliterated proper names or
  3283. % book titles. \package{arabluatex} is able to render words ending
  3284. % with \arb[trans]{tA' marbU.taT} in different ways, depending on
  3285. % their function:---
  3286. % \begin{enumerate}
  3287. % \item Nouns followed by an adjective in apposition: |madInaT|
  3288. % |kabIraT| \arb[trans]{madInaT kabIraT}, |al-madInaT| |al-kabIraT|
  3289. % \arb[trans]{al-madInaT al-kabIraT}.
  3290. % \item Nouns followed by another noun in the genitive (contruct
  3291. % state): |.hikmaT| |al-l_ah| \arb[trans]{.hikmaT| \uc{al-l_ah}},
  3292. % |fi.d.daT| |al-darAhim| \arb[trans]{fi.d.daT al-darAhim}.
  3293. % \end{enumerate}
  3294. % \begin{quoting}
  3295. % \textsc{Rem.} It may so happen, as in the absence of the article
  3296. % before the annexed word, that \package{arabluatex} be unable to
  3297. % determine which of the above two cases the word ending with
  3298. % \arb[trans]{tA' marbU.taT} falls into. The \enquote*{pipe}
  3299. % character (see \vref{sec:pipe}) may be appended to that word to
  3300. % indicate that what follows is in the construct state:
  3301. % |\uc{r}isAlaT| |fI| |tartIb| \verb+qirA'aT|+ |kutub|
  3302. % |\uc{^g}AlInUs| \arb[trans]{\uc{r}isAlaT fI tartIb qirA'aT|
  3303. % kutub \uc{^g}AlInUs}.
  3304. % \end{quoting}
  3305. %
  3306. %
  3307. % \paragraph{Uncertain short vowels}
  3308. % In some printed books, it may happen that more than one short vowel
  3309. % be placed on a consonant in cases where the vocalization is
  3310. % uncertain or ambiguous, like so: \arb[voc]{fa`uaila}. In
  3311. % transliteration, the uncertain vowels go between slashes and are
  3312. % separated by commas: |fa`uaila| \arb[voc]{fa`uaila}
  3313. % \arb[trans]{fa`uaila}.
  3314. %
  3315. % \subsection{Examples}
  3316. % \label{sec:examples-translit}
  3317. % Here follows in transliteration the story of
  3318. % \arb[trans]{\uc{ju.hA}} and his donkey (\arb[voc]{\uc{ju.hA
  3319. % wa-.himAru-hu}}). See the code \vpageref{ref:juha-code}:---
  3320. %
  3321. % \SetTranslitConvention{dmg}
  3322. % \begin{arab}[trans]
  3323. % \LR{\textbf{\emph{\enquote*{dmg}} standard:}} 'at_A .sadIquN 'il_A
  3324. % \uc{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN
  3325. % qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI
  3326. % 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \uc{ju.hA}:
  3327. % \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa
  3328. % la-ka ra.gbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla
  3329. % 'an yutimma \uc{ju.hA} kalAma-hu bada'a 'l-.himAr-u yanhaqu fI
  3330. % 'i.s.tabli-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u
  3331. % .himAra-ka yA \uc{ju.hA} yanhaqu.} fa-qAla la-hu \uc{ju.hA}:
  3332. % \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a
  3333. % wa-tuka_d_diba-nI?}
  3334. % \end{arab}
  3335. %
  3336. % \SetTranslitConvention{loc}
  3337. % \begin{arab}[trans]
  3338. % \LR{\textbf{\emph{\enquote*{loc}} standard:}} 'at_A .sadIquN 'il_A
  3339. % \uc{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN
  3340. % qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI
  3341. % 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \uc{ju.hA}:
  3342. % \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa
  3343. % la-ka ra.gbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla
  3344. % 'an yutimma \uc{ju.hA} kalAma-hu bada'a 'l-.himAr-u yanhaqu fI
  3345. % 'i.s.tabli-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u
  3346. % .himAra-ka yA \uc{ju.hA} yanhaqu.} fa-qAla la-hu \uc{ju.hA}:
  3347. % \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a
  3348. % wa-tuka_d_diba-nI?}
  3349. % \end{arab}
  3350. % \SetTranslitConvention{dmg}
  3351. %
  3352. % \SetTranslitConvention{arabica}
  3353. % \begin{arab}[trans]
  3354. % \LR{\textbf{\emph{\enquote*{arabica}} standard:}} 'at_A .sadIquN
  3355. % 'il_A \uc{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI
  3356. % safraTiN qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu
  3357. % 'ilay-ka fI 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla
  3358. % \uc{ju.hA}: \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an
  3359. % 'u.haqqiqa la-ka ra.gbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.}
  3360. % wa-qabla 'an yutimma \uc{ju.hA} kalAma-hu bada'a 'l-.himAr-u
  3361. % yanhaqu fI 'i.s.tabli-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI
  3362. % 'asma`u .himAra-ka yA \uc{ju.hA} yanhaqu.} fa-qAla la-hu
  3363. % \uc{ju.hA}: \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu
  3364. % 'l-.himAr-a wa-tuka_d_diba-nI?}
  3365. % \end{arab}
  3366. % \SetTranslitConvention{dmg}
  3367. %
  3368. % \section{Buckwalter input scheme}
  3369. % \label{sec:buckwalter-scheme}
  3370. % \NEWfeature{v1.4} Even though \package{arabluatex} is primarily
  3371. % designed to process the Arab\TeX\ notation, it can also process the
  3372. % Buckwalter input scheme to a large extent.\footnote{See
  3373. % \url{http://www.qamus.org/transliteration.htm}} The Buckwalter
  3374. % scheme is actually processed in two steps, as it is first converted
  3375. % into Arab\TeX. Then, once this is accomplished, the Arab\TeX\ scheme
  3376. % is processed through the above described functions. In this way, the
  3377. % Buckwalter input scheme can make the most of the
  3378. % \package{arabluatex} special features that are presented in
  3379. % \vref{sec:options}.
  3380. %
  3381. % \DescribeMacro{\SetInputScheme} The input scheme, which is set to
  3382. % |arabtex| by default, may be changed at any point of the document by
  3383. % the \cs{SetInputScheme}\marg{scheme} command, where \meta{scheme}
  3384. % may be either |arabtex| or |buckwalter|. This command is also
  3385. % accepted in the preamble should one wish to set the input scheme
  3386. % globally, like so:---
  3387. % \iffalse
  3388. %<*example>
  3389. % \fi
  3390. \begin{arabluaverbatim}
  3391. \usepackage{arabluatex}
  3392. \SetInputScheme{buckwalter}
  3393. \end{arabluaverbatim}
  3394. % \iffalse
  3395. %</example>
  3396. % \fi
  3397. %
  3398. % \paragraph{\enquote*{base}, \enquote*{\texttt{xml}} and
  3399. % \enquote*{safe} schemes}
  3400. % \package{arabluatex} can use any of the so-called Buckwalter
  3401. % \enquote*{base}, \enquote*{\texttt{xml}} or \enquote*{safe} schemes
  3402. % as they are described in \textcite[25--26]{Habash}.\footnote{I am
  3403. % grateful to Graeme Andrews who suggested that the \enquote*{safe}
  3404. % scheme be included in \package{arabluatex}.} However, the following
  3405. % limitation apply to the \enquote*{base} and \enquote*{\texttt{xml}}
  3406. % schemes: the braces |{| and |}|, which are used to encode
  3407. % \arb[novoc]{"a} and \arb[novoc]{y"'}, must be replaced with square
  3408. % brackets viz. |[| and |]| respectively.
  3409. %
  3410. % It is therefore recommended to use the Buckwalter \enquote*{safe}
  3411. % scheme.
  3412. %
  3413. % \Cref{tab:buckwalter-scheme} gives the Buckwalter equivalents that
  3414. % are currently used by \package{arabluatex}. The additional
  3415. % characters that are defined in \vref{tab:additional-arabic-codings}
  3416. % are also available.
  3417. %
  3418. % \begin{longtable}{llllll}
  3419. % \bottomrule
  3420. % \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme}
  3421. % \endfoot
  3422. % \captionlistentry{Buckwalter scheme}\\[-1em]
  3423. % \toprule
  3424. % Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
  3425. % & \multicolumn{2}{l}{Buckwalter notation} \\
  3426. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & |base/xml| &
  3427. % |safe| \\ \midrule
  3428. % \endfirsthead
  3429. % \toprule
  3430. % Letter & \multicolumn{3}{l}{Transliteration}
  3431. % & \multicolumn{2}{l}{Buckwalter notation} \\
  3432. % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & |base/xml| &
  3433. % |safe| \\ \midrule
  3434. % \endhead \footnotetext{See \vref{sec:transliteration}.}
  3435. % \label{tab:buckwalter-scheme}
  3436. % \arb[novoc]{a} & \dmg{a} & \loc{a} & \brill{a} & |A| & |A| \\
  3437. % \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| & |b| \\
  3438. % \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| & |t| \\
  3439. % \pagebreak[1]
  3440. % \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & \brill{_t} & |v| & |v| \\
  3441. % \arb[novoc]{j} & \dmg{j} & \loc{j} & \brill{j} & |j| & |j| \\
  3442. % \arb[novoc]{.h} & \dmg{.h} & \loc{.h} & \brill{.h} & |H| & |H| \\
  3443. % \arb[novoc]{x} & \dmg{x} & \loc{x} & \brill{x} & |x| & |x| \\
  3444. % \arb[novoc]{d} & \dmg{d} & \loc{d} & \brill{d} & |d| & |d| \\
  3445. % \arb[novoc]{_d} & \dmg{_d} & \loc{_d} & \brill{_d} & |*| & |V| \\
  3446. % \arb[novoc]{r} & \dmg{r} & \loc{r} & \brill{r} & |r| & |r| \\
  3447. % \arb[novoc]{z} & \dmg{z} & \loc{z} & \brill{z} & |z| & |z| \\
  3448. % \pagebreak[1]
  3449. % \arb[novoc]{s} & \dmg{s} & \loc{s} & \brill{s} & |s| & |s| \\
  3450. % \arb[novoc]{^s} & \dmg{^s} & \loc{^s} & \brill{^s} & |$| & |c| \\
  3451. % \arb[novoc]{.s} & \dmg{.s} & \loc{.s} & \brill{.s} & |S| & |S| \\
  3452. % \arb[novoc]{.d} & \dmg{.d} & \loc{.d} & \brill{.d} & |D| & |D| \\
  3453. % \arb[novoc]{.t} & \dmg{.t} & \loc{.t} & \brill{.t} & |T| & |T| \\
  3454. % \arb[novoc]{.z} & \dmg{.z} & \loc{.z} & \brill{.z} & |Z| & |Z| \\
  3455. % \pagebreak[1]
  3456. % \arb[novoc]{`} & \dmg{`} & \loc{`} & \brill{`} & |E| & |E| \\
  3457. % \arb[novoc]{.g} & \dmg{.g} & \loc{.g} & \brill{.g} & |g| & |g| \\
  3458. % \arb[novoc]{f} & \dmg{f} & \loc{f} & \brill{f} & |f| & |f| \\
  3459. % \arb[novoc]{q} & \dmg{q} & \loc{q} & \brill{q} & |q| & |q| \\
  3460. % \arb[novoc]{k} & \dmg{k} & \loc{k} & \brill{k} & |k| & |k| \\
  3461. % \arb[novoc]{l} & \dmg{l} & \loc{l} & \brill{l} & |l| & |l| \\
  3462. % \arb[novoc]{m} & \dmg{m} & \loc{m} & \brill{m} & |m| & |m| \\
  3463. % \arb[novoc]{n} & \dmg{n} & \loc{n} & \brill{n} & |n| & |n| \\
  3464. % \arb[novoc]{h} & \dmg{h} & \loc{h} & \brill{h} & |h| & |h| \\
  3465. % \arb[novoc]{w} & \dmg{w} & \loc{w} & \brill{w} & |w| & |w| \\
  3466. % \arb[novoc]{y} & \dmg{y} & \loc{y} & \brill{y} & |y| & |y| \\
  3467. % \arb[novoc]{Y} & \dmg{Y} & \loc{Y} & \brill{Y} & |Y| & |Y| \\
  3468. % \arb[novoc]{T} & \dmg{aT} & \loc{aT} & \brill{aT} & |p| & |p| \\
  3469. % \midrule
  3470. % \arb[novoc]{|"'} & \dmg{|"'} & \loc{|"'} & \brill{|"'} & \verb|'| & |C| \\
  3471. % \arb[novoc]{A"'} & \dmg{A"'} & \loc{A"'} & \brill{A"'} & \verb+|+ & |M| \\
  3472. % \arb[novoc]{a"'} & \dmg{a"'} & \loc{a"'} & \brill{a"'} & \verb|>| & |O| \\
  3473. % \arb[novoc]{w"'} & \dmg{w"'} & \loc{w"'} & \brill{w"'} & \verb|&| & |W| \\
  3474. % \arb[novoc]{i"'} & \dmg{i"'} & \loc{i"'} & \brill{i"'} & \verb|<| & |I| \\
  3475. % \arb[novoc]{y"'} & \dmg{y"'} & \loc{y"'} & \brill{y"'} & \verb|]| & |Q| \\
  3476. % \midrule
  3477. % \arb[novoc]{BB} & --- & --- & --- & \verb|~| & |~| \\
  3478. % \arb[novoc]{"a} & ' & ' & --- & |[| & |L| \\
  3479. % \midrule
  3480. % \arb[voc]{Ba} & \dmg{Ba} & \loc{Ba} & \brill{Ba} & \verb|a| & |a| \\
  3481. % \arb[voc]{Bu} & \dmg{Bu} & \loc{Bu} & \brill{Bu} & \verb|u| & |u| \\
  3482. % \arb[voc]{Bi} & \dmg{Bi} & \loc{Bi} & \brill{Bi} & \verb|i| & |i| \\
  3483. % \arb[voc]{BaN} & \dmg{BaN} & \loc{BaN} & \brill{BaN} & \verb|F| & |F| \\
  3484. % \arb[voc]{BuN} & \dmg{BuN} & \loc{BuN} & \brill{BuN} & \verb|N| & |N| \\
  3485. % \arb[voc]{BiN} & \dmg{BiN} & \loc{BiN} & \brill{BiN} & \verb|K| & |K| \\
  3486. % \arb[voc]{B"} & --- & --- & --- & \verb|o| & |o| \\
  3487. % \midrule
  3488. % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & |`| & |e| \\
  3489. % \midrule
  3490. % \arb[novoc]{--} (\arb[trans]{ta.twIl}) & --- & --- & --- & |_| & |_| \\
  3491. % \end{longtable}
  3492. %
  3493. % \paragraph{Transliteration}
  3494. % The Buckwalter notation can also be transliterated into any accepted
  3495. % romanization standard of Arabic. See above
  3496. % \vref{sec:transliteration} for more information. However, it should
  3497. % be pointed out again that only accurate coding produces accurate
  3498. % transliteration. It is therefore at the very least highly advisable
  3499. % to use the hyphen for tying the definite article and the inseparable
  3500. % particles (viz. prepositions, adverbs and conjunctions) to words,
  3501. % like so:--- \SetInputScheme{buckwalter}
  3502. % \begin{quote}
  3503. % |Al-EaAlamu| \arb{Al-EaAlam-u} \arb[trans]{Al-EaAlam-u},
  3504. % |Al-camsu| \arb{Al-cams-u} \arb[trans]{Al-cams-u},
  3505. % |bi-SinaAEapi| |Al-T~ib~i|, \arb{bi-SinaAEap-i Al-T~ib~-i}
  3506. % \arb[trans]{bi-SinaAEap-i Al-T~ib~-i}.
  3507. %
  3508. % |wa-Al-l~ehi| \arb{wa-Al-l~eh-i} \arb[trans]{wa-Al-l~eh-i},
  3509. % |Al-Hamdu| |li-l~ehi| \arb{Al-Hamd-u li-l~eh-i}
  3510. % \arb[trans]{Al-Hamd-u li-l~eh-i}.
  3511. % \end{quote}
  3512. % \SetInputScheme{arabtex}
  3513. %
  3514. % Similary, it is not advisable to use \verb+|+ and |[|
  3515. % (\enquote*{base} and \enquote*{\texttt{xml}} schemes) or |M| and |L|
  3516. % (\enquote*{safe} scheme) to encode the \arb[trans]{'alif-u
  3517. % 'l-mamdUdaT-i} and the \arb[trans]{'alif-u 'l-wa.sl-i} for such
  3518. % signs are supposed to be generated by \package{arabluatex} internal
  3519. % functions. Besides, as they do not \emph{per se} convey any
  3520. % morphological information on what they are derived from, they cannot
  3521. % be transliterated accurately. To take one example, %
  3522. % \SetInputScheme{buckwalter}%
  3523. % |<ilY Al-LntiqaADi| gives \arb{>ilY Al-LntiqaADi} as expected, but
  3524. % only |<ilY Al-intiqADi| can be transliterated as \arb[trans]{<ilY
  3525. % Al-intiqaADi} with the correct vowel \meta{i} in place of the %
  3526. % \SetInputScheme{arabtex}%
  3527. % \arb[trans]{'alif-u 'l-wa.sl-i}.
  3528. %
  3529. % \section{Unicode Arabic input}
  3530. % \label{sec:unicode-input}
  3531. % \NEWfeature{v1.5} As said above in \vref{sec:buckwalter-scheme}
  3532. % about the Buckwalter input scheme, even though \package{arabluatex}
  3533. % is primarily designed to process the Arab\TeX\ notation, it also
  3534. % accepts Unicode Arabic input. It should be noted that
  3535. % \package{arabluatex} does in no way interfere with Unicode Arabic
  3536. % input: none of the |voc|, |fullvoc|, |novoc| or |trans| options will
  3537. % have any effect on plain Unicode Arabic for the time being.
  3538. %
  3539. % That said, there are two ways of inserting Unicode
  3540. % Arabic:
  3541. % \begin{enumerate}
  3542. % \item \DescribeMacro{\txarb} The \cs{txarb}\marg{Unicode Arabic}
  3543. % command for inserting Unicode Arabic text in paragraphs;
  3544. % \item The \DescribeEnv{txarab} |txarab| environment for inserting
  3545. % running paragraphs of Arabic text, like so:---\\%
  3546. % \iffalse
  3547. %<*example>
  3548. % \fi
  3549. \begin{arabluaverbatim}
  3550. \begin{txarab}
  3551. <Unicode Arabic text>
  3552. \end{txarab}
  3553. \end{arabluaverbatim}
  3554. % \iffalse
  3555. %</example>
  3556. % \fi
  3557. % \end{enumerate}
  3558. %
  3559. % \needspace{4\baselineskip}
  3560. % \section{\LaTeX\ Commands in Arabic environments}
  3561. % \label{sec:commands-in-arb}
  3562. % \paragraph{General principle} \label{ref:cmd-inside-arabic}\LaTeX\
  3563. % commands are accepted in Arabic environments. The general principle
  3564. % which applies is that any single-argument command with up to
  3565. % \emph{two optional arguments}---that is:
  3566. % \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg}---such as
  3567. % \cs{emph}\marg{text}, \cs{textbf}\marg{text} and the like, is
  3568. % assumed to have Arabic text in its mandatory argument:---
  3569. % \begin{quote}
  3570. % |\abjad{45}| |kitAbu-hu| |\emph{fI| |'l-\uc{`AdAt-i}}|
  3571. % \arb[voc]{\abjad{45} kitAbu-hu \emph{fI 'l-\uc{`AdAt-i}}}
  3572. % \arb[trans]{\abjad{45} kitAbu-hu \emph{fI
  3573. % 'l-\uc{`AdAt-i}}}.\footnote{This is odd in Arabic script, but
  3574. % using such features as \cs{emph} or \cs{textbf} is a matter of
  3575. % personal taste.}
  3576. % \NewDocumentCommand{\rlframebox}{o o m}{
  3577. % \IfNoValueTF{#2}{\IfNoValueTF{#1}{
  3578. % \framebox{\setRL#3}}{\framebox[#1]{\setRL#3}}
  3579. % }{\framebox[#1][#2]{\setRL#3}}}
  3580. %
  3581. % |\arb{\abjad{45} \rlframebox[1in][s]{kitAbu-hu fI 'l-`AdAti}}|\\
  3582. % \arb{\abjad{45} \rlframebox[1in][s]{kitAbu-hu fI
  3583. % 'l-`AdAti}}\,\footnote{\cs{rlframefox} has been adapted from
  3584. % \cs{framebox} for insertions of right-to-left text.}
  3585. % \end{quote}
  3586. %
  3587. % The same applies to footnotes:---
  3588. % \iffalse
  3589. %<*example>
  3590. % \fi
  3591. \begin{arabluacode}
  3592. \renewcommand{\footnoterule}%
  3593. {\hfill\noindent\rule[1mm]{.4\textwidth}{.15mm}}
  3594. \begin{arab}
  3595. 'inna 'abI kAna mina 'l-muqAtilaT-i\footnote{al-muqAtilaT-i:
  3596. al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i
  3597. 'l-zamAzimaT-i\footnote{al-zamAzimaT-u: .tA'ifaT-u mina
  3598. 'l-furs-i.}.
  3599. \end{arab}
  3600. \end{arabluacode}
  3601. % \iffalse
  3602. %</example>
  3603. % \fi
  3604. %
  3605. % Some commands, however, do not expect running text in their
  3606. % arguments, or one may wish to insert English text e.g. in footnotes
  3607. % or in marginal notes. \package{arabluatex} provides a set of
  3608. % commands to handle such cases.
  3609. %
  3610. % \DescribeMacro{\LR} \cs{LR}\marg{arg} is designed to typeset its
  3611. % argument from left to right. It may be used in an Arabic
  3612. % environment, either \cs{arb}\marg{Arabic text} or \cs{begin}|{arab}|
  3613. % \meta{Arabic text} \cs{end}|{arab}|, for short insertions of
  3614. % left-to-right text, or to insert any \LaTeX\ command that would
  3615. % otherwise be rejected by \package{arabluatex}, such as commands the
  3616. % argument of which is expected to be a dimension or a unit of
  3617. % measurement.
  3618. %
  3619. % \DescribeMacro{\RL} \cs{RL}\marg{arg} does the same as
  3620. % \cs{LR}\marg{arg}, but typesets its argument from right to left. Even
  3621. % in an Arabic environment, this command may be useful.
  3622. %
  3623. % \DescribeMacro{\LRfootnote} \DescribeMacro{\RLfootnote}
  3624. % \cs{LRfootnote}\marg{text} and \cs{RLfootnote}\marg{text} typeset
  3625. % left-to-right and right-to-left footnotes respectively in Arabic
  3626. % environments. Unlike \cs{footnote}\marg{text}, the arguments of both
  3627. % \cs{LRfootnote} and \cs{RLfootnote} are not expected to be Arabic
  3628. % text. For example, \cs{LRfootnote} can be used to insert English
  3629. % footnotes in running Arabic text:---
  3630. % \iffalse
  3631. %<*example>
  3632. % \fi
  3633. \begin{arabluacode}
  3634. \begin{arab}[fullvoc]
  3635. \uc{z}ayd-uN\arbnull{ibnu}\LRfootnote{%
  3636. \enquote{\arb[trans]{\uc{z}ayd} is the son of
  3637. \arb[trans]{\uc{`a}mr}}: the second noun is not in
  3638. apposition to the first, but forms part of the
  3639. predicate\ldots} \arbnull{zayduN}ibn-u \uc{`a}mr-iNU
  3640. \end{arab}
  3641. \end{arabluacode}
  3642. % \iffalse
  3643. %</example>
  3644. % \fi
  3645. %
  3646. % When footnotes are typeset from right to left, it may happen that
  3647. % the numbers of the footnotes that are at the bottom of the page be
  3648. % typeset in the wrong direction. For example, instead of an expected
  3649. % number 18, one may get 81. \package{arabluatex} is not responsible
  3650. % for that, but should it happen, it may be necessary to redefine in
  3651. % the preamble the \LaTeX\ macro \cs{thefootnote} like so:---\\
  3652. % \arabluaverb{\renewcommand*{\thefootnote}{\textsuperscript{\LR{\arabic{footnote}}}}}
  3653. % \DescribeMacro{\FixArbFtnmk} Another solution is to put in the
  3654. % preamble, below the line that loads \package{arabluatex}, the
  3655. % \cs{FixArbFtnmk} command. However, for more control over the layout
  3656. % of footnotes marks, it is advisable to use the \package{scrextend}
  3657. % package.\footnote{See \url{http://ctan.org/pkg/koma-script}; read
  3658. % the documentation of \package{KOMA-script} for details about the
  3659. % \cs{deffootnotemark} and \cs{deffootnote} commands.}
  3660. %
  3661. % \DescribeMacro{\LRmarginpar} The
  3662. % \cs{LRmarginpar}\oarg{left}\marg{right} command does for marginal
  3663. % notes the same as \cs{LRfootnote} does for footnotes. Of course, it
  3664. % is supposed to be used in Arabic environments. Note that
  3665. % \cs{marginpar} also works in Arabic environments, but it acts as any
  3666. % other single-argument command inserted in Arabic environments. The
  3667. % general principle laid \vpageref{ref:cmd-inside-arabic} applies.
  3668. %
  3669. % \label{ref:setrl-setlr}
  3670. % \DescribeMacro{\setRL} \DescribeMacro{\setLR} \cs{setRL} and
  3671. % \cs{setLR} can be used to change the direction of paragraphs, either
  3672. % form left to right or from right to left. As an example, an
  3673. % easy way to typeset a right-to-left sectional title follows:---
  3674. % \iffalse
  3675. %<*example>
  3676. % \fi
  3677. \begin{arabluacode}
  3678. \setRL
  3679. \section*{\arb{barzawayhi li-buzurjumihra bn-i 'l-buxtikAni}}
  3680. \setLR
  3681. \begin{arab}
  3682. qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
  3683. \end{arab}
  3684. \end{arabluacode}
  3685. % \iffalse
  3686. %</example>
  3687. % \fi
  3688. %
  3689. % \subsection{New commands}
  3690. % \label{sec:declare-new-commands}
  3691. % \NEWfeature{v1.9}%
  3692. % In some particular cases, it may be useful to define new commands to
  3693. % be inserted in Arabic environments. From the general principle laid
  3694. % \vpageref{ref:cmd-inside-arabic}, it follows that any command that
  3695. % is found inside an Arabic environment is assumed to have Arabic text
  3696. % in its argument which \package{arabluatex} will process as such
  3697. % before passing it on to the command itself for any further
  3698. % processing. As a result of this feature, such a command as:\\
  3699. % \arabluaverb{\newcommand{\fvarabic}[1]{\arb[fullvoc]{#1}}}\\
  3700. % will work as expected, but will always output non-vocalized Arabic
  3701. % if it is inserted in a |novoc| Arabic environment because its
  3702. % argument will have been processed by the |novoc| rules before the
  3703. % command |\fvarabic| itself can see it.
  3704. %
  3705. % \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of
  3706. % commands} command can be used in the preamble to give any
  3707. % command---either new or already existing---the precedence over
  3708. % \package{arabluatex} inside Arabic environments. It takes as
  3709. % argument a comma-separated list of commands each of which must be
  3710. % stripped of its leading character
  3711. % |\|, like so:---\\
  3712. % \arabluaverb{\MkArbBreak{onecmd, anothercmd, yetanothercmd, ...}}
  3713. %
  3714. % For example, here follows a way to define a new command |\fvred| to
  3715. % distinguish words with a different color and always print them in
  3716. % fully vocalized Arabic:--- %
  3717. % \iffalse
  3718. %<*example>
  3719. % \fi
  3720. \begin{arabluacode}
  3721. \MkArbBreak{fvred}
  3722. \newcommand{\fvred}[1]{\arbcolor[red]{\arb[fullvoc]{#1}}}
  3723. \begin{arab}[voc]
  3724. _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI
  3725. \fvred{((ma.tli`-i 'l-^sams-i))} wa-lA binA'-a la-hum
  3726. yu'amminu-hum mina 'l-^sams-i.
  3727. \end{arab}
  3728. \end{arabluacode}
  3729. % \iffalse
  3730. %</example>
  3731. % \fi
  3732. %
  3733. % It must be noted that the arguments, either optional or mandatory,
  3734. % of commands declared with \cs{MkArbBreak} are not to be processed by
  3735. % \package{arabluatex}. Therefore, as in the previous example, any of
  3736. % their argument to be rendered in Arabic must be inserted again in
  3737. % \cs{arb}. \NEWfeature{v1.12}These commands themselves may have up to
  3738. % two optional and/or mandatory arguments followed by one optional
  3739. % argument, like so:---
  3740. % \begin{enumerate}
  3741. % \item \cs{command} (no argument, lowermost combination)
  3742. % \item \cs{command}\oarg{opt1} (one optional argument)
  3743. % \item \cs{command}\marg{arg1} (one mandatory argument)
  3744. % \item \cs{command}\oarg{opt1}\marg{arg1} (one optional and one
  3745. % mandatory argument)
  3746. % \item{} [\ldots]
  3747. % \item \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg1}\marg{arg2}
  3748. % \item
  3749. % \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg1}\marg{arg2}\oarg{opt3}
  3750. % (uppermost combination)
  3751. % \end{enumerate}
  3752. %
  3753. % \DescribeMacro{\MkArbBreak*}\NEWfeature{v1.12} As said above,
  3754. % \cs{MkArbBreak} prevents \package{arabluatex} from processing the
  3755. % arguments of \enquote*{declared} commands as Arabic text. This
  3756. % technique proves sufficient in most cases. However, a
  3757. % \enquote*{starred} version of this
  3758. % command---\cs{MkArbBreak*}\marg{csv list of commands}---is also
  3759. % provided. It goes a step further, as it directs \package{arabluatex}
  3760. % to \emph{close} the current Arabic environment before any of the
  3761. % \enquote*{declared} commands, then \emph{resume} it just after.
  3762. %
  3763. % \iffalse
  3764. %<*example>
  3765. % \fi
  3766. \begin{arabluacode}[text only]
  3767. It must be noted that \cs{MkArbBreak*} must be used with the utmost
  3768. care and \emph{should never be used} if \cs{MkArbBreak} gives
  3769. satisfaction. At any rate, the latter must always be tested before
  3770. the former.
  3771. \end{arabluacode}
  3772. % \iffalse
  3773. %</example>
  3774. % \fi%
  3775. %
  3776. %
  3777. % \subsection{Environments}
  3778. % \label{sec:environments}
  3779. % \changes{v1.5}{2016/11/14}{Environments may be nested inside the
  3780. % \texttt{arab} environment}
  3781. % \NEWfeature{v1.5} Environments such as
  3782. % \arabluaverb{\begin{quote}... \end{quote}} may be nested inside the
  3783. % |arab| environment. Up to one optional argument may be passed to
  3784. % each nested environment, like so:---
  3785. % \iffalse
  3786. %<*example>
  3787. % \fi
  3788. \begin{arabluaverbatim}
  3789. \begin{arab}
  3790. \begin{<environment>}[<options>]
  3791. <Arabic text>
  3792. \end{<environment>}
  3793. \end{arab}
  3794. \end{arabluaverbatim}
  3795. % \iffalse
  3796. %</example>
  3797. % \fi
  3798. %
  3799. % In the following example, the \package{quoting} package is used:---
  3800. % \iffalse
  3801. %<*example>
  3802. % \fi
  3803. \begin{arabluacode}
  3804. \setquotestyle{arabic}
  3805. \begin{arab}[fullvoc]
  3806. kAna \uc{'abU} \uc{'l-hu_dayli} 'ahd_A 'il_A \uc{muwaysiN}
  3807. dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI 'ahdA-hA dUna mA kAna
  3808. yuttaxa_du li-\uc{muwaysiN}. wa-l_akinna-hu bi-karami-hi
  3809. wa-bi-.husni xuluqi-hi 'a.zhara 'l-ta`ajjuba min simani-hA
  3810. wa-.tIbi la.hmi-hA. wa-kAna <\uc{'abU} \uc{'l-hu_dayli}>
  3811. yu`rafu bi-'l-'imsAki 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa
  3812. ra'ayta yA \uc{'abA} \uc{`imrAna} tilka 'l-dajAjaTa?} qAla:
  3813. \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu:
  3814. \begin{quoting}[begintext=\textquotedblright,
  3815. endtext=\textquotedblleft]
  3816. wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? fa-'inna
  3817. 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi wa-'l-sinni.
  3818. wa-tadrI bi-'ayyi ^say'iN kunnA nusamminu-hA? wa-fI 'ayyi
  3819. makAniN kunnA na`lifu-hA?
  3820. \end{quoting}
  3821. fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN
  3822. na`rifu-hu na.hnu wa-lA ya`rifu-hu \uc{'abU} \uc{'l-hu_dayli}.
  3823. \end{arab}
  3824. \end{arabluacode}
  3825. % \iffalse
  3826. %</example>
  3827. % \fi
  3828. %
  3829. % \subsubsection{Lists}
  3830. % \label{sec:lists}
  3831. % Lists environments are also accepted inside the |arab|
  3832. % environment. One may either use any of the three standard list
  3833. % environments, viz. |itemize|, |enumerate| and |description| or use
  3834. % packages that provide additional refinements such as
  3835. % \package{paralist} or \package{enumitem}.
  3836. %
  3837. % To take a first example, should one wish to typeset a list of
  3838. % manuscripts, the |description| environment can be used like so:---
  3839. % \iffalse
  3840. %<*example>
  3841. % \fi
  3842. \begin{arabluacode}
  3843. \setRL\paragraph{\arb[novoc]{rumUzi 'l-kitAbi}}\setLR
  3844. \begin{arab}[novoc]
  3845. \begin{description}
  3846. \item[b] max.tU.tu 'l-maktabaTi 'l-'ahliyyaTi bi-\uc{bArIs} 2860
  3847. `arabiyyuN.
  3848. \item[s] max.tU.tu 'l-maktabaTi 'l-'ahliyyaTi bi-\uc{bArIs} 2859
  3849. `arabiyyuN.
  3850. \item[m] max.tU.tu majlisi \arb[novoc]{^sUrAY malY} .tahrAna 521.
  3851. \end{description}
  3852. \end{arab}
  3853. \end{arabluacode}
  3854. % \iffalse
  3855. %</example>
  3856. % \fi
  3857. %
  3858. % As a second example, the contents of a treatise may be typeset with
  3859. % the standard list environments, like so:---
  3860. % \iffalse
  3861. %<*example>
  3862. % \fi
  3863. \begin{arabluacode}
  3864. \setRL\centerline{\arb{\textbf{al-qAnUnu fI 'l-.tibbi}}}\setLR
  3865. \begin{arab}
  3866. \begin{itemize}
  3867. \item \textbf{al-fannu 'l-'awwalu} fI .haddi 'l-.tibbi
  3868. wa-maw.dU`Ati-hi mina 'l-'umUri 'l-.tabI`iyyaTi wa-ya^stamilu
  3869. `al_A sittaTi ta`AlImiN
  3870. \begin{itemize}
  3871. \item \textbf{al-ta`lImu 'l-'awwalu} [wa-huwa fa.slAni]
  3872. \begin{itemize}
  3873. \item \textbf{al-fa.slu 'l-'awwalu}
  3874. \end{itemize}
  3875. \end{itemize}
  3876. \end{itemize}
  3877. \end{arab}
  3878. \end{arabluacode}
  3879. % \iffalse
  3880. %</example>
  3881. % \fi
  3882. %
  3883. % \label{ref:abjad-list}
  3884. % As a third example, abjad-numbered lists can be typeset in
  3885. % conjunction with the \package{enumitem} package,\footnote{See the
  3886. % documentation of \package{enumitem} for more details:
  3887. % \url{https://ctan.org/pkg/enumitem}} like so:---
  3888. % \iffalse
  3889. %<*example>
  3890. % \fi
  3891. \begin{arabluaverbatim}
  3892. % preamble:---
  3893. \usepackage{enumitem}
  3894. \newlist{enumabjad}{enumerate}{10}
  3895. \setlist[enumabjad]{nosep, label={\abjad{\arabic*}}}
  3896. \usepackage{multicol}
  3897. \end{arabluaverbatim}
  3898. \begin{arabluacode}
  3899. From \textcite[i. 29 B--C]{Wright}:--- The derived forms of the
  3900. triliteral verb are usually reckoned fifteen in number, but the
  3901. learner may pass over the last four, because (with the exception
  3902. of the twelfth) they are of very rare occurrence.
  3903. \RLmulticolcolumns
  3904. \begin{multicols}{3}
  3905. \begin{arab}[fullvoc]
  3906. \begin{enumabjad}
  3907. \item fa`ala
  3908. \item fa``ala
  3909. \item fA`ala
  3910. \item 'af`ala
  3911. \item tafa``ala
  3912. \item tafA`ala
  3913. \item infa`ala
  3914. \item ifta`ala
  3915. \item if`alla
  3916. \item istaf`ala
  3917. \item if`Alla
  3918. \item if`aw`ala
  3919. \item if`awwala
  3920. \item if`anlala
  3921. \item if`anl_A
  3922. \end{enumabjad}
  3923. \end{arab}
  3924. \end{multicols}
  3925. \end{arabluacode}
  3926. % \iffalse
  3927. %</example>
  3928. % \fi
  3929. %
  3930. % \paragraph{Caveat}
  3931. % The various French definition files of the \package{babel} package
  3932. % viz. |acadian|, |canadien|, |francais|, |frenchb| or |french| all
  3933. % redefine the list environments, which breaks the standard definition
  3934. % file that is used by \package{arabluatex}. Therefore,
  3935. % \package{babel-french} must be loaded with the |StandardLists=true|
  3936. % option, like so:---%
  3937. % \iffalse
  3938. %<*example>
  3939. % \fi
  3940. \begin{arabluaverbatim}
  3941. \usepackage[french]{babel}
  3942. \frenchsetup{StandardLists=true}
  3943. \end{arabluaverbatim}
  3944. % \iffalse
  3945. %</example>
  3946. % \fi%
  3947. % This option will prevent \package{babel-french} from interfering
  3948. % with the layout of the document. Then the \package{paralist} or
  3949. % \package{enumitem} packages can be used to make the lists
  3950. % \enquote*{compact} as \package{babel-french} do.
  3951. %
  3952. % \subsection{\package{csquotes}}
  3953. % \label{sec:csquotes}
  3954. % The recommended way of inserting quotation marks in running Arabic
  3955. % text is to use \package{csquotes}. With the help of the
  3956. % \cs{DeclareQuoteStyle} command, one can define an Arabic style, like
  3957. % so:---
  3958. % \iffalse
  3959. %<*example>
  3960. % \fi
  3961. \begin{arabluaverbatim}
  3962. \usepackage{csquotes}
  3963. \DeclareQuoteStyle{arabic}
  3964. {\textquotedblright}{\textquotedblleft}
  3965. {\textquoteright}{\textquoteleft}
  3966. \end{arabluaverbatim}
  3967. % \iffalse
  3968. %</example>
  3969. % \fi
  3970. % Then, use this newly defined style with \cs{setquotestyle}, like so:---
  3971. % \iffalse
  3972. %<*example>
  3973. % \fi
  3974. \begin{arabluacode}
  3975. \setquotestyle{arabic}
  3976. \begin{arab}
  3977. fa-qAla la-hu ju.hA: \enquote{.garIb-uN 'amru-ka yA .sadIqI
  3978. 'a-tu.saddiqu 'l-.himAr-a wa-tuka_d_diba-nI?}
  3979. \end{arab}
  3980. \setquotestyle{english}
  3981. \end{arabluacode}
  3982. % \iffalse
  3983. %</example>
  3984. % \fi
  3985. % \begin{quoting}
  3986. % \textsc{Rem.} Do not forget to set back the quoting style to its
  3987. % initial state once the Arabic environment is closed. See the last
  3988. % line in the code above.
  3989. % \end{quoting}
  3990. %
  3991. % \subsection{Two-argument special commands}
  3992. % \label{sec:two-arg-cmds}
  3993. %
  3994. % \paragraph{textcolor}
  3995. % \label{sec:textcolor}
  3996. % The two-argument command \cs{textcolor}\marg{color}\marg{Ara\-bic
  3997. % text} is supported inside \cs{begin}|{arab}| \ldots\
  3998. % \cs{end}|{arab}|. One simple example
  3999. % follows:\footnote{\package{arabluatex} provides its own
  4000. % \cs{arbcolor} command which is able to render syllabes or diacritics
  4001. % in colors. See \vref{sec:color}.}--- %
  4002. % \iffalse
  4003. %<*example>
  4004. % \fi
  4005. \begin{arabluacode}
  4006. \begin{arab}
  4007. \textcolor{red}{\uc{m}uha_d_dabu \uc{'l-d}Ini \uc{`a}bdu
  4008. \uc{'l-r}a.hImi bnu \uc{`a}liyyiN} huwa ^say_hu-nA 'l-'imAmu
  4009. 'l-.sadru 'l-kabIru 'l-`Alimu 'l-fA.dilu \uc{m}uha_d_dabu
  4010. \uc{'l-d}Ini \uc{'a}bU \uc{m}u.hammadiN \uc{`a}bdu
  4011. \uc{'l-r}a.hImi bnu \uc{`a}liyyi bni \uc{.h}AmidiN wa-yu`rafu
  4012. bi-\uc{'l-d}a_hwari.
  4013. \end{arab}
  4014. \begin{arab}[trans]
  4015. \textcolor{red}{\uc{m}uha_d_dabu \uc{'l-d}Ini \uc{`a}bdu
  4016. \uc{'l-r}a.hImi bnu \uc{`a}liyyiN} huwa ^say_hu-nA 'l-'imAmu
  4017. 'l-.sadru 'l-kabIru 'l-`Alimu 'l-fA.dilu \uc{m}uha_d_dabu
  4018. \uc{'l-d}Ini \uc{'a}bU \uc{m}u.hammadiN \uc{`a}bdu
  4019. \uc{'l-r}a.hImi bnu \uc{`a}liyyi bni \uc{.h}AmidiN wa-yu`rafu
  4020. bi-\uc{'l-d}a_hwari.
  4021. \end{arab}
  4022. \end{arabluacode}
  4023. % \iffalse
  4024. %</example>
  4025. % \fi
  4026. %
  4027. % \paragraph{\package{reledmac}}
  4028. % \label{sec:reledmac}
  4029. % The two-argument command \cs{edtext}\marg{lemma}\marg{commands} is
  4030. % supported inside \cs{begin}|{arab}| \ldots\
  4031. % \cs{end}|{arab}|.\footnote{\cs{pstart} and \cs{pend} are also
  4032. % supported inside the |arab| environment.} As an example, one may get
  4033. % \package{arabluatex} and \package{reledmac} to work together like
  4034. % so:--- %
  4035. % \iffalse
  4036. %<*example>
  4037. % \fi
  4038. \begin{arabluaverbatim}
  4039. \beginnumbering
  4040. \pstart
  4041. \begin{arab}
  4042. wa-ya.sIru ta.hta 'l-jild-i
  4043. \edtext{\arb{.sadId-uN}}{\Afootnote{M: \arb{.sadId-aN} E1}}
  4044. \end{arab}
  4045. \pend
  4046. \endnumbering
  4047. \end{arabluaverbatim}
  4048. % \iffalse
  4049. %</example>
  4050. % \fi
  4051. %
  4052. % \subsection{\package{quran}}
  4053. % \label{sec:pkg-quran}
  4054. % \changes{v1.5}{2016/11/14}{Compatibility with the \textsf{quran}
  4055. % package} \package{arabluatex} is compatible with the \package{quran}
  4056. % package so that both can be used in conjunction with one another for
  4057. % typesetting the \arb[trans]{\uc{qur'An}}. As \package{quran} draws
  4058. % the text of the \arb[trans]{\uc{qur'An}} from a Unicode encoded
  4059. % database, its commands have to be passed as arguments to the
  4060. % \cs{txarb} command for short insertions in left-to-right paragraphs,
  4061. % or inserted inside the \index{txarab=txarab (environment)}|txarab|
  4062. % environment for typesetting running paragraphs of
  4063. % \arb[trans]{\uc{qur'An}}\emph{ic} text (see above
  4064. % \vref{sec:unicode-input} for more details). Please note that
  4065. % \package{arabluatex} takes care of formatting the Arabic: therefore,
  4066. % it is recommended to load the \package{quran} package with the
  4067. % |nopar| option, after \package{arabluatex} itself has been loaded,
  4068. % like so:--- %
  4069. % \iffalse
  4070. %<*example>
  4071. % \fi
  4072. \begin{arabluaverbatim}
  4073. \usepackage{arabluatex}
  4074. \usepackage[nopar]{quran}
  4075. \end{arabluaverbatim}
  4076. % \iffalse
  4077. %</example>
  4078. % \fi
  4079. %
  4080. % As an example, the following code will typeset the \arb[trans]{sUraT
  4081. % al-\uc{fAti.haT}}:---
  4082. % \iffalse
  4083. %<*example>
  4084. % \fi
  4085. \begin{arabluacode}
  4086. \begin{txarab}
  4087. \quransurah[1]
  4088. \end{txarab}
  4089. \end{arabluacode}
  4090. % \iffalse
  4091. %</example>
  4092. % \fi
  4093. %
  4094. % \section{Exporting Unicode Arabic to an external file}
  4095. % \label{sec:arabtex2utf}
  4096. % \NEWfeature{v.1.13}\package{arabluatex} is able to produce a
  4097. % duplicate of the original |.tex| source file in which all |arabtex|
  4098. % or |buckwalter| strings will have been replaced with Unicode
  4099. % equivalents, either in Arabic script or in any accepted standard of
  4100. % transliteration. Exporting \textsc{ascii} strings to Unicode while
  4101. % preserving the exact selected global or local options is a fairly
  4102. % complex operation which may require \hologo{LuaLaTeX} to be run
  4103. % several times as will be explained below.
  4104. %
  4105. % \subsection{Commands and environments}
  4106. % \paragraph{\texttt{export} global option}
  4107. % \DescribeOption{export} First, \package{arabluatex} must be loaded
  4108. % with the |export| global option enabled,\footnote{See above
  4109. % \vpageref{ref:export-global-opt} for more information.} like
  4110. % so:--- %
  4111. % \iffalse
  4112. %<*example>
  4113. % \fi
  4114. \begin{arabluaverbatim}
  4115. % preamble
  4116. \usepackage[export]{arabluatex}
  4117. % or:
  4118. \usepackage[export=true]{arabluatex}
  4119. \end{arabluaverbatim}
  4120. % \iffalse
  4121. %</example>
  4122. % \fi
  4123. %
  4124. % Once that is done, compiling the current file will produce a new
  4125. % empty external |.tex| file with the same preamble as the original
  4126. % file.
  4127. %
  4128. % \DescribeMacro{\SetArbOutSuffix} By default, |_out| is appended as a
  4129. % suffix to the external file name. Any other suffix may be set with
  4130. % the command \cs{SetArbOutSuffix}\marg{suffix}.
  4131. %
  4132. % \paragraph{Exporting running paragraphs}
  4133. % \DescribeEnv{arabexport} Then, the |arabexport| environment is
  4134. % provided to actually exporting running paragraphs with or without
  4135. % Arabic environments to the external selected file, like so:--- %
  4136. % \iffalse
  4137. %<*example>
  4138. % \fi
  4139. \begin{arabluaverbatim}
  4140. \begin{arabexport}
  4141. <Running paragraphs of either Arabic or non-Arabic text>
  4142. \end{arabexport}
  4143. \end{arabluaverbatim}
  4144. % \iffalse
  4145. %</example>
  4146. % \fi
  4147. %
  4148. % \package{arabluatex} converts to Unicode and writes to the external
  4149. % file what is found inside Arabic environments. As to non-Arabic
  4150. % text, it is appended untouched to this file, which is formatted as
  4151. % follows:---
  4152. % \begin{enumerate}
  4153. % \item Unicode Arabic text, either in Arabic script or in
  4154. % transliteration, is inserted as argument of
  4155. % \cs{txarb}\footnote{See above \vref{sec:unicode-input}.} or
  4156. % \cs{txtrans}\footnote{\cs{txtrans} is used internally by several
  4157. % Lua functions to format transliterated Arabic. Therefore, it is
  4158. % not documented.} accordingly.
  4159. % \item \DescribeMacro{\arbpardir}Additionally, Arabic paragraphs may
  4160. % receive \cs{arbpardir}, which \package{arabluatex} uses to
  4161. % determine the direction of Arabic paragraphs to be set by default,
  4162. % or either \cs{setRL} or \cs{setLR} depending on what may have been
  4163. % set locally.\footnote{See above \vpageref{ref:setrl-setlr}.}
  4164. % \item \DescribeMacro{\prname*}Proper names are inserted as arguments
  4165. % of \cs{prname*}.\footnote{See above \vpageref{ref:prname-star}.}
  4166. % \end{enumerate}
  4167. %
  4168. % \paragraph{Appending words or commands to the external file only}
  4169. % \DescribeMacro{\ArbOutFile}\DescribeMacro{\ArbOutFile*}
  4170. % \cs{ArbOutFile}\oarg{newline}\allowbreak\marg{argument} silently
  4171. % exports its argument to the external file. It may take the string
  4172. % |newline| as an optional argument, in which case a carriage return
  4173. % is appended to the contents of the
  4174. % argument. \cs{ArbOutFile*}\oarg{newline}\marg{argument} does the
  4175. % same as \cs{ArbOutFile}, but also inserts its argument into the
  4176. % current |.tex| source file.
  4177. %
  4178. % \paragraph{Exporting Arabic poetry}
  4179. % Lines of Arabic poetry are exported as described above
  4180. % \vpageref{ref:poetry-export} when the |export| option that is
  4181. % specific to the |arabverse| environment is set to |true|. As a
  4182. % result of this particular feature, |arabverse| environments must be
  4183. % left outside |\begin{arabexport}| \ldots\ |\end{arabexport}|.
  4184. %
  4185. % Please note that inside |arabverse| environments \cs{bayt} is
  4186. % replaced with \cs{bayt*}.\footnote{See above \vref{ref:bayt-star} for
  4187. % more information.}
  4188. %
  4189. % \subsection{Nested Arabic environments}
  4190. % The exporting mechanism described above converts only the outermost
  4191. % level of nested Arabic environments. This may be sufficient in some
  4192. % cases, but if nested Arabic environments be found in the original
  4193. % |.tex| source file, then the Unicode converted file must be opened
  4194. % and compiled in turn, and so on until the innermost Arabic
  4195. % environment be converted and exported. In such cases,
  4196. % \package{arabluatex} issues a warning, so that authors do not have
  4197. % to check the entire file that just has been exported:--- %
  4198. % \iffalse
  4199. %<*example>
  4200. % \fi
  4201. \begin{arabluaverbatim}
  4202. Package arabluatex Warning: There are still 'arabtex' strings
  4203. to be converted. Please open <jobname><suffix>.tex and compile
  4204. it one more time.
  4205. \end{arabluaverbatim}
  4206. % \iffalse
  4207. %</example>
  4208. % \fi
  4209. % Where \meta{jobname} is the name of the original |.tex| source file,
  4210. % and \meta{suffix} the suffix appended to the file that is to be
  4211. % opened and compiled again.
  4212. %
  4213. % \subsection{Further processing of Unicode converted files}
  4214. % \label{sec:further-processing-utf-files}
  4215. % Unicode files can be further processed by document converters such
  4216. % as John McFarlane's |pandoc|\footnote{See
  4217. % \url{http://pandoc.org/}}. To take here one simple example, here is
  4218. % how |file_out.tex| can be converted from \hologo{LuaLaTeX} into Open
  4219. % Document format (|.odt|):---%
  4220. % \iffalse
  4221. %<*example>
  4222. % \fi
  4223. \begin{arabluaverbatim}
  4224. pandoc file_out.tex -s -o file_out.odt
  4225. \end{arabluaverbatim}
  4226. % \iffalse
  4227. %</example>
  4228. % \fi
  4229. %
  4230. % However, specific commands such as \cs{txarb}, \cs{txtrans} or
  4231. % \cs{prname*}, which are not known to |pandoc|, must be redefined
  4232. % explicitly in the preamble to prevent the converter from gobbling
  4233. % their arguments, like so:---%
  4234. % \iffalse
  4235. %<*example>
  4236. % \fi
  4237. \begin{arabluaverbatim}
  4238. % preamble:
  4239. \usepackage{arabluatex} % note that 'export' has been removed
  4240. \renewcommand{\txarb}[1]{#1}
  4241. \renewcommand{\txtrans}[1]{\emph{#1}}
  4242. \renewcommand{\arbup}[1]{\textsuperscript{#1}}
  4243. % now that \prname{} has been replaced with \prname*{} it should
  4244. % be safe to say:
  4245. \renewcommand{\prname}[2]{#2}
  4246. % &c
  4247. \end{arabluaverbatim}
  4248. % \iffalse
  4249. %</example>
  4250. % \fi
  4251. %
  4252. % \section{Future work}
  4253. % \label{sec:future-work}
  4254. % A short, uncommented, list of what is planned in the versions of
  4255. % \package{arabluatex} to come follows:
  4256. % \begin{enumerate}
  4257. % \item Short-term:
  4258. % \begin{enumerate}
  4259. % \item \texttt{TEI xml} support: \package{arabluatex} will
  4260. % interoperate with \texttt{TEI xml} through new global and local
  4261. % options that will output Arabic in a \texttt{TEI xml} compliant
  4262. % file in addition to the usual PDF output: see
  4263. % \vpageref{ref:tei-to-come}.
  4264. % \end{enumerate}
  4265. % \item Medium-term:
  4266. % \begin{enumerate}
  4267. % \item More languages: the list of supported languages will
  4268. % eventually be the same as \package{arabtex}: see
  4269. % \vref{fn:arabtex-languages}.
  4270. % \item Formulate propositions for extending the Arab\TeX\ notation
  4271. % and the transliteration tables. Include them in
  4272. % \package{arabluatex}. See \vref{sec:additional-characters}.
  4273. % \end{enumerate}
  4274. % \end{enumerate}
  4275. %
  4276. % \StopEventually{}
  4277. %
  4278. % \section{Implementation}
  4279. %
  4280. % \iffalse
  4281. %<*package>
  4282. % \fi
  4283. %
  4284. % The most important part of \package{arabluatex} relies on Lua
  4285. % functions and tables. Read the |.lua| files that accompany
  4286. % \package{arabluatex} for more information.
  4287. % \begin{macrocode}
  4288. \NeedsTeXFormat{LaTeX2e}
  4289. \ProvidesPackage{arabluatex}%
  4290. [2018/10/09 v1.15 An ArabTeX-like interface for LuaLaTeX]
  4291. \RequirePackage{ifluatex}
  4292. % \end{macrocode}
  4293. % \package{arabluatex} requires \hologo{LuaLaTeX} of course. Issue a
  4294. % warning if the document is processed with another engine.
  4295. % \begin{macrocode}
  4296. \ifluatex\else
  4297. \PackageError{arabluatex}{lualatex needed}{%
  4298. Package `arabluatex' needs LuaTeX.\MessageBreak
  4299. So you should use `lualatex' to process your document.\MessageBreak
  4300. See documentation of `arabluatex' for further information.}%
  4301. \expandafter\expandafter\expandafter\csname endinput\endcsname
  4302. \fi
  4303. % \end{macrocode}
  4304. % Declare the global options, and define them:
  4305. % \begin{macrocode}
  4306. \RequirePackage{xkeyval}
  4307. \DeclareOptionX{voc}{\def\al@mode{voc}}
  4308. \DeclareOptionX{fullvoc}{\def\al@mode{fullvoc}}
  4309. \DeclareOptionX{novoc}{\def\al@mode{novoc}}
  4310. \DeclareOptionX{trans}{\def\al@mode{trans}}
  4311. \define@boolkey{arabluatex.sty}[@pkg@]{export}[true]{%
  4312. \if@pkg@export%
  4313. \AtBeginDocument{\luadirect{al_openstream()}%
  4314. \MkArbBreak{@al@ob,@al@cb,@al@cb@sp}}
  4315. \AtEndDocument{\luadirect{al_closestream()}}
  4316. \else\fi}
  4317. \ExecuteOptionsX{voc}
  4318. \ProcessOptionsX\relax
  4319. \def\al@mode@voc{voc}
  4320. \def\al@mode@fullvoc{fullvoc}
  4321. \def\al@mode@novoc{novoc}
  4322. \def\al@mode@trans{trans}
  4323. % \end{macrocode}
  4324. % Packages that are required by \package{arabluatex}:
  4325. % \begin{macrocode}
  4326. \RequirePackage{xcolor}
  4327. \RequirePackage{luacolor}
  4328. \RequirePackage{etoolbox}
  4329. \RequirePackage{arabluatex-patch}
  4330. \RequirePackage{fontspec}
  4331. \RequirePackage{amsmath}
  4332. \RequirePackage{luacode}
  4333. \RequirePackage{xparse}
  4334. \RequirePackage{environ}
  4335. \RequirePackage{adjustbox}
  4336. \RequirePackage{xstring}
  4337. % \end{macrocode}
  4338. % The following boolean will be set to |true| in |RL| mode:
  4339. % \begin{macrocode}
  4340. \newbool{al@rlmode}
  4341. % \end{macrocode}
  4342. % Here begins the real work: load |arabluatex.lua|:
  4343. % \begin{macrocode}
  4344. \luadirect{dofile(kpse.find_file("arabluatex.lua"))}
  4345. % \end{macrocode}
  4346. % Font setup. If no Arabic font is selected, issue a warning message
  4347. % and attempt to load the Amiri font which is included in \TeX{}live:
  4348. % \begin{macrocode}
  4349. \AtBeginDocument{\ifdefined\arabicfont\relax\else
  4350. \PackageWarning{arabluatex}{\string\arabicfont\ is not defined.^^J
  4351. I will try to load Amiri}%
  4352. \newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}%
  4353. % \end{macrocode}
  4354. % \begin{macro}{\setRL}
  4355. % This neutralizes what may be defined by other packages:
  4356. % \begin{macrocode}
  4357. \AtBeginDocument{\def\setRL{\booltrue{al@rlmode}\pardir TRT\textdir TRT}}
  4358. % \end{macrocode}
  4359. % \end{macro}
  4360. % \begin{macro}{\setLR}
  4361. % The same applies to \cs{setLR}:
  4362. % \begin{macrocode}
  4363. \AtBeginDocument{\def\setLR{\boolfalse{al@rlmode}\pardir TLT\textdir TLT}}
  4364. % \end{macrocode}
  4365. % \end{macro}
  4366. % \begin{macro}{\LR} This command typesets its argument from left to
  4367. % right. As \cs{LR} may be already defined, we need to redefine for
  4368. % it to suit our purpose:
  4369. % \begin{macrocode}
  4370. \AtBeginDocument{\ifdef{\LR}%
  4371. {\RenewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\rmfamily#1\egroup}}
  4372. {\NewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\rmfamily#1\egroup}}}
  4373. % \end{macrocode}
  4374. % \end{macro}
  4375. % \begin{macro}{\RL} This one typesets its argument from right to
  4376. % left. Same remark as above regarding the need of redefinition.
  4377. % \begin{macrocode}
  4378. \AtBeginDocument{\ifdef{\RL}%
  4379. {\RenewDocumentCommand{\RL}{m}{\bgroup\textdir TRT\rmfamily#1\egroup}}
  4380. {\NewDocumentCommand{\RL}{m}{\bgroup\textdir TRT#1\rmfamily\egroup}}}
  4381. % \end{macrocode}
  4382. % \end{macro}
  4383. % \begin{macro}{\MkArbBreak}
  4384. % \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for
  4385. % inserting user-defined macros in Arabic environments} The
  4386. % \cs{MkArbBreak}\marg{csv list of commands} command can be used to
  4387. % give any command---either new or already existing---the precedence
  4388. % over \package{arabluatex} inside Arabic environments. It is
  4389. % actually coded in Lua.
  4390. % \begin{macro}{\MkArbBreak*}
  4391. % \changes{v1.12}{2018/06/24}{\enquote*{starred} version which
  4392. % closes Arabic environments before processing declared commands.}
  4393. % \cs{MkArbBreak*} goes a step further as it directs
  4394. % \package{arabluatex} to close the current Arabic environment before
  4395. % processing any \enquote*{declared} command then resume it just
  4396. % after.
  4397. % \begin{macrocode}
  4398. \NewDocumentCommand{\MkArbBreak}{s m}{%
  4399. \IfBooleanTF{#1}
  4400. {\luadirect{mkarbbreak(\luastringN{#2}, "out")}}
  4401. {\luadirect{mkarbbreak(\luastringN{#2}, "dflt")}}
  4402. }
  4403. % \end{macrocode}
  4404. % \end{macro}
  4405. % \end{macro}
  4406. % \begin{macro}{\aemph} Arabic emphasis. Needs to be redefined as
  4407. % well. The function is actually coded in Lua.
  4408. % \begin{macro}{\aemph*} The \enquote*{starred} version of this
  4409. % command alway puts the stroke over its argument.
  4410. % \changes{v1.9.2}{2017/10/24}{Starred version which always puts the
  4411. % stroke over its argument}
  4412. % \begin{macrocode}
  4413. \AtBeginDocument{\ifdef{\aemph}%
  4414. {\RenewDocumentCommand{\aemph}{s m}{%
  4415. \IfBooleanTF{#1}{%
  4416. \luadirect{tex.sprint(aemph(\luastringN{#2}, "over"))}}
  4417. {\luadirect{tex.sprint(aemph(\luastringN{#2}, "dflt"))}}}}
  4418. {\NewDocumentCommand{\aemph}{s m}{%
  4419. \IfBooleanTF{#1}{%
  4420. \luadirect{tex.sprint(aemph(\luastringN{#2}, "over"))}}
  4421. {\luadirect{tex.sprint(aemph(\luastringN{#2}, "dflt"))}}}}}
  4422. % \end{macrocode}
  4423. % \end{macro}
  4424. % \end{macro}
  4425. % \begin{macro}{\arbcolor}\changes{v1.12}{2018/06/24}{Standard color
  4426. % command for Arabic environments}
  4427. % \cs{arbcolor}\oarg{color}\marg{Arabic text} takes the Arabic text to
  4428. % be colored as argument.
  4429. % \begin{macrocode}
  4430. \NewDocumentCommand{\arbcolor}{o m}{%
  4431. \IfNoValueTF{#1}{#2}{\textcolor{#1}{#2}}}
  4432. % \end{macrocode}
  4433. %
  4434. % \end{macro}
  4435. % \begin{macro}{\SetInputScheme}
  4436. % \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} can be used to
  4437. % process other input schemes such as \enquote*{Buckwalter}}
  4438. % \package{arabluatex} is designed for processing Arab\TeX\ input
  4439. % notation. \cs{SetInputScheme} may be used in the preamble or at
  4440. % any point of the document should the user wish to use a different
  4441. % notation such as the \enquote*{Buckwalter scheme}.
  4442. % \begin{macrocode}
  4443. \def\al@input@scheme{arabtex}
  4444. \NewDocumentCommand{\SetInputScheme}{m}{\def\al@input@scheme{#1}}
  4445. % \end{macrocode}
  4446. % \end{macro}
  4447. % \begin{macro}{\SetArbEasy}
  4448. % \changes{v1.2}{2016/05/09}{New \cs{SetArbEasy}/\cs{SetArbDflt} for
  4449. % \enquote*{modern} or \enquote*{classic} Arabic styles.}
  4450. % \begin{macro}{\SetArbEasy*}
  4451. % \changes{v1.4.4}{2016/09/28}{this starred version discards the
  4452. % \arb[trans]{sukUn} in addition to what is already discarded by
  4453. % \cs{SetArbEasy}.}
  4454. % \begin{macro}{\SetArbDflt}
  4455. % By default, \package{arabluatex} applies complex rules to generate
  4456. % euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT} and
  4457. % \arb[trans]{sukUn} depending on the modes which are selected,
  4458. % either |voc|, |fullvoc| or |trans|. Such refinements can be
  4459. % discarded with \cs{SetArbEasy}, either globally in the preamble or
  4460. % at any point of the document. Note that \cs{SetArbEasy} keeps the
  4461. % \arb[trans]{sukUn} that is generated, while the starred version
  4462. % \cs{SetArbEasy*} takes it away. Default complex rules can be set
  4463. % back at any point of the document with \cs{SetArbDflt}.
  4464. % \begin{macro}{\SetArbDflt*}
  4465. % \changes{v1.6}{2016/12/17}{This starred version applies the
  4466. % assimilation rules in addition to what \cs{SetArbDflt} already
  4467. % does.} As of v1.6, \package{arabluatex} does not applies any more
  4468. % the assimilation rules that are laid on \vref{ref:assimilation}; a
  4469. % new starred version \cs{SetArbDflt*} is now available to the user
  4470. % should he wish to apply them.
  4471. % \begin{macrocode}
  4472. \def\al@arb@rules{dflt}
  4473. \NewDocumentCommand{\SetArbEasy}{s}{%
  4474. \IfBooleanTF{#1}
  4475. {\def\al@arb@rules{easynosukun}}
  4476. {\def\al@arb@rules{easy}}}
  4477. \NewDocumentCommand{\SetArbDflt}{s}{%
  4478. \IfBooleanTF{#1}
  4479. {\def\al@arb@rules{idgham}}
  4480. {\def\al@arb@rules{dflt}}}
  4481. % \end{macrocode}
  4482. % \end{macro}
  4483. % \end{macro}
  4484. % \end{macro}
  4485. % \end{macro}
  4486. % \begin{macro}{\SetTranslitFont}
  4487. % \changes{v1.4}{2016/07/05}{For selecting a specific font for
  4488. % transliterated texts} By default, the font that is used for
  4489. % transliterated text is the main font of the document. Any other
  4490. % font may also be selected with the font-selecting commands of the
  4491. % \package{fontspec} package.
  4492. % \begin{macrocode}
  4493. \def\al@trans@font{\rmfamily}%
  4494. \NewDocumentCommand{\SetTranslitFont}{m}{\def\al@trans@font{#1}}
  4495. % \end{macrocode}
  4496. % \end{macro}
  4497. % \begin{macro}{\SetTranslitStyle} By default any transliterated
  4498. % Arabic text is printed in italics. This can be changed either
  4499. % globally in the preamble or at any point of the document:
  4500. % \begin{macrocode}
  4501. \def\al@trans@style{\itshape}%
  4502. \NewDocumentCommand{\SetTranslitStyle}{m}{\def\al@trans@style{#1}}
  4503. % \end{macrocode}
  4504. % \end{macro}
  4505. % \begin{macro}{\SetTranslitConvention}
  4506. % \cs{SetTranslitConvention}\marg{convention} can be used to change
  4507. % the transliteration convention, which is |dmg| by default:
  4508. % \begin{macrocode}
  4509. \def\al@trans@convention{dmg}
  4510. \NewDocumentCommand{\SetTranslitConvention}{m}{\def\al@trans@convention{#1}}
  4511. % \end{macrocode}
  4512. % \end{macro}
  4513. % \begin{macro}{\arbup}
  4514. % \changes{v1.3}{2016/05/28}{\arb[trans]{'i`rAb} is now written as
  4515. % superscript text in \texttt{dmg} mode by default.}
  4516. % \begin{macro}{\NoArbUp}
  4517. % \begin{macro}{\ArbUpDflt}
  4518. % \begin{macro}{\SetArbUp}
  4519. % By default, \cs{arbup} is set to \cs{textsuperscript}. This is how
  4520. % the \arb[trans]{tanwIn} that takes place at the end of a word
  4521. % should be displayed in |dmg| mode. \cs{NoArbUp} may be used
  4522. % either in the preamble or at any point of the document in case one
  4523. % wishes to have the \arb[trans]{tanwIn} on the line. The default
  4524. % rule can be set back with \cs{ArbUpDflt} at any point of the
  4525. % document. Finally \cs{SetArbUp} can be used to customize the way
  4526. % \arb[trans]{tanwIn} is displayed: this command takes the
  4527. % formatting directives as argument, like so:
  4528. % \cs{SetArbUp}\marg{code}.
  4529. % \begin{macrocode}
  4530. \NewDocumentCommand{\al@arbup@dflt}{m}{\textsuperscript{\thinspace#1}}%
  4531. \NewDocumentCommand{\al@arbup}{m}{\al@arbup@dflt{#1}}
  4532. \NewDocumentCommand{\arbup}{m}{\al@arbup{#1}}
  4533. \NewDocumentCommand{\ArbUpDflt}{}{\let\al@arbup=\al@arbup@dflt}
  4534. \NewDocumentCommand{\NoArbUp}{}{\RenewDocumentCommand{\al@arbup}{m}{##1}}
  4535. \NewDocumentCommand{\SetArbUp}{m}{\RenewDocumentCommand{\al@arbup}{m}{#1}}
  4536. % \end{macrocode}
  4537. % \end{macro}
  4538. % \end{macro}
  4539. % \end{macro}
  4540. % \end{macro}
  4541. % \begin{macro}{\uc} Proper Arabic names or book titles should be
  4542. % passed to the \cs{uc} command so that they have their first letters
  4543. % uppercased. \cs{uc} is actually coded in Lua.
  4544. % \begin{macrocode}
  4545. \NewDocumentCommand{\uc}{m}%
  4546. {\luadirect{tex.sprint(uc(\luastringN{#1}))}}
  4547. % \end{macrocode}
  4548. % \end{macro}
  4549. % \begin{macro}{\Uc} \cs{uc} can be used safely in all of the modes
  4550. % that are provided by \package{arabluatex} as any of the |voc|,
  4551. % |fullvoc| and |novoc| modes discard it on top of any other
  4552. % functions to be run. \cs{Uc} does the same as \cs{uc} except
  4553. % that \emph{it is never discarded}. For that reason, \cs{Uc}
  4554. % \emph{should never be used outside the} |trans|
  4555. % \emph{mode}. \package{arabluatex} uses \cs{Uc} internally so as
  4556. % to prevent \cs{uc} from being discarded in case words that are to
  4557. % be transliterated are inserted into Arabic commands or
  4558. % environments where transliteration is not required. Therefore, it
  4559. % is not documented.
  4560. % \begin{macrocode}
  4561. \let\Uc\uc
  4562. % \end{macrocode}
  4563. % \end{macro}
  4564. % \begin{macro}{\prname}\changes{v1.10}{2018/01/03}{New command for
  4565. % typesetting Arabic proper names in transliteration} \cs{prname} is
  4566. % to be used outside Arabic environments for proper names. It takes as
  4567. % argument one or more Arabic words, each of which will be rendered in
  4568. % upright roman style with its first letter uppercased.
  4569. % \begin{macro}{\prname*}\changes{v1.13}{2018/08/27}{Renders proper
  4570. % names already converted to Unicode in upright roman style}
  4571. % Unlike \cs{prname}, \cs{prname*} does not take |arabtex| or
  4572. % |buckwalter| input as argument, but already Unicode converted
  4573. % names and renders them in upright roman style.
  4574. % \begin{macrocode}
  4575. \NewDocumentCommand{\prname}{s m}{%
  4576. \bgroup\SetTranslitStyle{\relax}%
  4577. \IfBooleanTF{#1}{\txtrans{#2}}{\arb[trans]{\uc{#2}}}\egroup}
  4578. % \end{macrocode}
  4579. % \end{macro}
  4580. % \end{macro}
  4581. % \begin{macro}{\txarb} \cs{txarb} sets the direction to right-to-left
  4582. % and selects the Arabic font. It is used internally by several Lua
  4583. % functions, but available to the user should he wish to insert
  4584. % |utf8| Arabic text in his document.
  4585. % \begin{macro}{\txtrans} \cs{txtrans} is used internally by several
  4586. % Lua functions to insert transliterated Arabic text. Therefore, it is
  4587. % not documented.
  4588. % \begin{macrocode}
  4589. \NewDocumentCommand{\txarb}{+m}{%
  4590. \bgroup\textdir TRT\arabicfont#1\egroup}
  4591. \NewDocumentCommand{\txtrans}{+m}{%
  4592. \bgroup\textdir TLT\al@trans@font\al@trans@style#1\egroup}
  4593. % \end{macrocode}
  4594. % \end{macro}
  4595. % \end{macro}
  4596. % \begin{environment}{txarab}
  4597. % \changes{v1.5}{2016/11/14}{New \texttt{txarab} environment for
  4598. % typesetting running paragraphs in Unicode Arabic} The |txarab|
  4599. % environment does for paragraphs the same as \cs{txarb} does for
  4600. % short insertions of |utf8| Arabic text.
  4601. % \begin{macrocode}
  4602. \NewDocumentEnvironment{txarab}{}{%
  4603. \par%
  4604. \booltrue{al@rlmode}%
  4605. \pardir TRT\textdir TRT\arabicfont}{\par}
  4606. % \end{macrocode}
  4607. % \end{environment}
  4608. % \begin{macro}{\arb}
  4609. % The \cs{arb} command detects which Arabic mode is to be used,
  4610. % either globally if no option is set, or locally, then passes its
  4611. % argument to the appropriate Lua function.
  4612. % \begin{macrocode}
  4613. \NewDocumentCommand{\arb}{O{\al@mode} +m}%
  4614. {\edef\@tempa{#1}%
  4615. \ifx\@tempa\al@mode@voc%
  4616. \bgroup\booltrue{al@rlmode}\textdir TRT\arabicfont%
  4617. \luadirect{tex.sprint(processvoc(\luastringN{#2},
  4618. \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
  4619. \else%
  4620. \ifx\@tempa\al@mode@fullvoc%
  4621. \bgroup\booltrue{al@rlmode}\textdir TRT\arabicfont%
  4622. \luadirect{tex.sprint(processfullvoc(\luastringN{#2},
  4623. \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
  4624. \else%
  4625. \ifx\@tempa\al@mode@novoc%
  4626. \bgroup\booltrue{al@rlmode}\textdir TRT\arabicfont%
  4627. \luadirect{tex.sprint(processnovoc(\luastringN{#2},
  4628. \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
  4629. \else%
  4630. \ifx\@tempa\al@mode@trans%
  4631. \bgroup\textdir TLT\al@trans@style%
  4632. \luadirect{tex.sprint(processtrans(\luastringN{#2},
  4633. \luastringO{\al@trans@convention},
  4634. \luastringO{\al@arb@rules},
  4635. \luastringO{\al@input@scheme}))}\egroup%
  4636. \else%
  4637. \fi\fi\fi\fi}
  4638. % \end{macrocode}
  4639. % \end{macro}
  4640. % \begin{macro}{\arbmark}
  4641. % \changes{v1.11}{2018/03/31}{New command for inserting additional
  4642. % marks in Arabic environments}
  4643. % \cs{arbmark}\oarg{rl\textbar{}lr}\marg{shorthand} takes one
  4644. % argument from a list of defined elements.
  4645. % \changes{v1.13}{2018/08/27}{New optional argument: either
  4646. % \texttt{rl} or \texttt{lr}} The mark to be inserted is determined
  4647. % by contextual analysis or by an optional argument, either |rl| or
  4648. % |lr|. This command is coded in Lua.
  4649. % \begin{macrocode}
  4650. \NewDocumentCommand{\arbmark}{O{} m}{%
  4651. \bgroup%
  4652. \SetInputScheme{arabtex}%
  4653. \luadirect{tex.sprint(processarbmarks(\luastringN{#2},
  4654. \luastringN{#1}))}%
  4655. \egroup}
  4656. % \end{macrocode}
  4657. % \end{macro}
  4658. % \begin{macro}{\newarbmark}
  4659. % \changes{v1.11}{2018/03/31}{Allows defining additional sets of Arabic
  4660. % marks} \cs{newarbmark} lets the user define additional Arabic
  4661. % marks. As \cs{arbmark}, this command is coded in Lua. It takes
  4662. % three arguments: the abbreviated form to be used as argument of
  4663. % \cs{arbmark}, the rendition in Arabic script and the rendition in
  4664. % romanized Arabic.
  4665. % \begin{macrocode}
  4666. \NewDocumentCommand{\newarbmark}{m m m}{%
  4667. \luadirect{newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}}
  4668. % \end{macrocode}
  4669. % \end{macro}
  4670. % \begin{environment}{arab}
  4671. % The |arab| environment does for paragraphs the same as \cs{arb} does
  4672. % for short insertions of Arabic text.
  4673. % \begin{macrocode}
  4674. \NewEnviron{arab}[1][\al@mode]%
  4675. {\par\edef\@tempa{#1}%
  4676. \ifx\@tempa\al@mode@voc%
  4677. \booltrue{al@rlmode}%
  4678. \bgroup\pardir TRT\textdir TRT\arabicfont%
  4679. \luadirect{tex.sprint(processvoc(\luastringO{\BODY},
  4680. \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
  4681. \else%
  4682. \ifx\@tempa\al@mode@fullvoc%
  4683. \booltrue{al@rlmode}%
  4684. \bgroup\pardir TRT\textdir TRT\arabicfont%
  4685. \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY},
  4686. \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
  4687. \else%
  4688. \ifx\@tempa\al@mode@novoc%
  4689. \booltrue{al@rlmode}%
  4690. \bgroup\pardir TRT\textdir TRT\arabicfont%
  4691. \luadirect{tex.sprint(processnovoc(\luastringO{\BODY},
  4692. \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
  4693. \else%
  4694. \ifx\@tempa\al@mode@trans%
  4695. \bgroup\pardir TLT\textdir TLT\al@trans@style%
  4696. \luadirect{tex.sprint(processtrans(\luastringO{\BODY},
  4697. \luastringO{\al@trans@convention},
  4698. \luastringO{\al@arb@rules},
  4699. \luastringO{\al@input@scheme}))}\egroup%
  4700. \else \fi\fi\fi\fi}[\par]
  4701. % \end{macrocode}
  4702. % \end{environment}
  4703. % \begin{environment}{arabverse}
  4704. % \changes{v1.6}{2016/12/17}{New environment \texttt{arabverse} for
  4705. % typesetting Arabic poetry} The |arabverse| environment may receive
  4706. % different options: |mode|, |width|, |gutter|, |metre|, |color|,
  4707. % |utf|, |delim| and |export|; all of them are defined here just
  4708. % before the |arabverse|
  4709. % environment. \changes{v1.13}{2018/08/27}{New options
  4710. % \texttt{color} and \texttt{export} to \texttt{arabverse}
  4711. % environment.}
  4712. % \begin{macrocode}
  4713. \newlength{\al@bayt@width}
  4714. \newlength{\al@gutter@width}
  4715. \setlength{\al@bayt@width}{.3\textwidth}
  4716. \setlength{\al@gutter@width}{.15\al@bayt@width}
  4717. \define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}}
  4718. \define@key[al]{verse}{gutter}{\setlength{\al@gutter@width}{#1}}
  4719. \define@key[al]{verse}{metre}{\arb{#1}}
  4720. \define@key[al]{verse}{color}[]{\color{#1}}
  4721. \define@boolkey[al]{verse}{utf}[true]{}
  4722. \define@boolkey[al]{verse}{delim}[true]{}
  4723. \define@boolkey[al]{verse}{export}[true]{}
  4724. \define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc,
  4725. trans}{\def\al@mode{#1}}
  4726. \presetkeys[al]{verse}{metre={}, utf=false,
  4727. delim=false}{}
  4728. % \end{macrocode}
  4729. % Then follows the environment itself:
  4730. % \begin{macrocode}
  4731. \NewDocumentEnvironment{arabverse}{O{}}%
  4732. {\bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim,
  4733. metre]{#1}%
  4734. \if@pkg@export\ifal@verse@export%
  4735. \ArbOutFile{\begin{arabverse}}%
  4736. \ifx\al@mode\al@mode@trans%
  4737. \luadirect{tooutfile(\luastringN{[#1]})}%
  4738. \else%
  4739. \IfSubStr[1]{#1}{utf}%
  4740. {\luadirect{tooutfile(\luastringN{[#1]})}}%
  4741. {\luadirect{tooutfile(\luastringN{[#1, utf]})}}%
  4742. \fi
  4743. \else\fi\else\fi\egroup%
  4744. \par\centering\noindent\bgroup\setkeys[al]{verse}[metre]{#1}%
  4745. \ifx\al@mode\al@mode@trans%
  4746. \ifal@verse@utf\setRL\else\setLR\fi%
  4747. \else\setRL\fi%
  4748. \arab@v@export{#1}
  4749. }%
  4750. {\endarab@v@export
  4751. \hfill\setkeys[al]{verse}[width, gutter, color, utf, delim, mode,
  4752. export]{#1}%
  4753. \egroup\par%
  4754. \bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, mode,
  4755. metre]{#1}%
  4756. \if@pkg@export\ifal@verse@export%
  4757. \ArbOutFile{\end{arabverse}}
  4758. \else\fi\else\fi\egroup}
  4759. % \end{macrocode}
  4760. % \begin{macro}{\bayt}
  4761. % \changes{v1.6}{2016/12/17}{New macro \cs{bayt} for typesetting
  4762. % each verse inside the \texttt{arabverse} environment} Each verse
  4763. % consists of two hemistichs; therefore the \cs{bayt} command takes
  4764. % two arguments, the first receives the \arb[trans]{.sadr} and the
  4765. % second the \arb[trans]{`ajuz}. That two subsequent hemistichs
  4766. % should be connected with one another is technically named
  4767. % \arb[trans]{tadwIr}. In some of these cases, the hemistichs may be
  4768. % connected by a prominent horizontal flexible stroke which is drawn
  4769. % by the \cs{al@verse@stroke} command.
  4770. % \begin{macro}{\SetHemistichDelim}
  4771. % \changes{v1.6}{2016/12/17}{New \cs{SetHemistichDelim} command for
  4772. % changing the default delimiter between hemistichs} A hemistich
  4773. % delimiter also may be defined. By default, it is set to the
  4774. % \enquote*{star} character: |*|. The
  4775. % \cs{SetHemistichDelim}\marg{delimiter} command can be used at any
  4776. % point of the document to change this default setting.
  4777. % \end{macro}
  4778. % \begin{macrocode}
  4779. \NewDocumentCommand{\arb@utf}{m}{%
  4780. \ifal@verse@utf\txarb{#1}\else\arb{#1}\fi}
  4781. \def\al@hemistich@delim{*}
  4782. \NewDocumentCommand{\SetHemistichDelim}{m}{\def\al@hemistich@delim{#1}}
  4783. \def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt}
  4784. \NewDocumentCommand{\bayt}{s m o m}{%
  4785. \IfBooleanTF{#1}{\relax}{\relax}%
  4786. {^^^^200b}% quick fix to a bug (or a missing feature) in either
  4787. % luacolor or adjustbox
  4788. \ifdefined\savenotes\savenotes\else\fi%
  4789. \edef\al@tatweel{--}%
  4790. \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#2}}%
  4791. \IfNoValueTF{#3}{%
  4792. \ifal@verse@delim\makebox[\al@gutter@width][c]{\al@hemistich@delim}%
  4793. \else%
  4794. \hspace{\al@gutter@width}%
  4795. \fi
  4796. }{%
  4797. \edef\@tempa{#3}%
  4798. \ifx\@tempa\al@tatweel%
  4799. \ifx\al@mode\al@mode@trans%
  4800. \hspace{\al@gutter@width}%
  4801. \else%
  4802. \makebox[\al@gutter@width][s]{\al@verse@stroke}%
  4803. \fi%
  4804. \else%
  4805. \ifx\al@mode\al@mode@trans%
  4806. \adjustbox{width=\al@gutter@width, height=\Height}{\arb@utf{#3}}%
  4807. \else%
  4808. \makebox[\al@gutter@width][s]{\arb@utf{#3}}%
  4809. \fi\fi}%
  4810. \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#4}}%
  4811. \ifdefined\spewnotes\spewnotes\else\fi%
  4812. }
  4813. % \end{macrocode}
  4814. % \end{macro}
  4815. % \end{environment}
  4816. % \begin{macro}{\abjad} \cs{abjad}\marg{number} expresses its argument
  4817. % in Arabic letters in accordance with the \arb[trans]{'abjad}
  4818. % arrangement of the alphabet. \meta{number} must be between 1 and
  4819. % 1999. It is now coded in Lua so that \package{polyglossia} is no
  4820. % longer needed. See |arabluatex.lua| for more information.
  4821. % \changes{v1.1}{2016/04/26}{New and more flexible \protect\cs{abjad}
  4822. % command.}
  4823. % \begin{macrocode}
  4824. \AtBeginDocument{%
  4825. \ifdefined\abjad%
  4826. \RenewDocumentCommand{\abjad}{m}%
  4827. {\ifbool{al@rlmode}%
  4828. {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}}
  4829. {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}}
  4830. \else%
  4831. \NewDocumentCommand{\abjad}{m}%
  4832. {\ifbool{al@rlmode}%
  4833. {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}}
  4834. {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}}
  4835. \fi}
  4836. % \end{macrocode}
  4837. % \end{macro}
  4838. % \begin{macro}{\ayah}\changes{v1.15}{2018/10/09}{Prints End of Ayah
  4839. % sign}\cs{ayah}\marg{number} prints up to 3-digit numbers inside
  4840. % \enquote*{end of Ayah} sign (|U+06DD|) or inside parentheses
  4841. % depending on the mode which is selected.
  4842. % \begin{macrocode}
  4843. \NewDocumentCommand{\ayah}{m}{%
  4844. \luadirect{tex.sprint(ayah(\luastringN{#1}))}}
  4845. % \end{macrocode}
  4846. % \end{macro}
  4847. %
  4848. % \begin{macro}{\arbnull}
  4849. % \changes{v1.7}{2016/12/24}{New \cs{arbnull} command for putting
  4850. % back on any contextual analysis rule broken by other commands.}
  4851. % The \cs{arbnull} command does nothing by itself. It is processed
  4852. % only if it is found in Arabic context so as to put back on
  4853. % contextual analysis in case it has been broken by other commands.
  4854. % \begin{macrocode}
  4855. \NewDocumentCommand{\arbnull}{m}{\relax}
  4856. % \end{macrocode}
  4857. % \end{macro}
  4858. % \begin{macro}{\abraces}
  4859. % \cs{abraces}\marg{Arabic text} puts its argument between
  4860. % braces. This macro is written in Lua and is dependent on the
  4861. % current value of |tex.textdir|.
  4862. % \changes{v1.4.3}{2016/09/14}{New \cs{abraces} command which
  4863. % expresses its argument between braces.}
  4864. % \begin{macrocode}
  4865. \NewDocumentCommand{\abraces}{+m}{%
  4866. \luadirect{tex.sprint(abraces(\luastringN{#1}))}}
  4867. % \end{macrocode}
  4868. % \end{macro}
  4869. % \begin{macro}{\LRmarginpar} \cs{LRmarginpar} is supposed to be
  4870. % inserted in an Arabic environment. It typsets his argument in a
  4871. % marginal note from left to right.
  4872. % \begin{macrocode}
  4873. \DeclareDocumentCommand{\LRmarginpar}{o m}{%
  4874. \IfNoValueTF{#1}
  4875. {\marginpar{\textdir TLT #2}}
  4876. {\marginpar[\textdir TLT #1]{\textdir TLT #2}}}
  4877. % \end{macrocode}
  4878. % \end{macro}
  4879. % \begin{macro}{\LRfootnote} \cs{LRfootnote} and \cs{RLfootnote} are
  4880. % supposed to be used in Arabic environments for insertions of non
  4881. % Arabic text. \cs{LRfootnote} typesets its argument left-to-right\ldots
  4882. % \begin{macro}{\RLfootnote} while \cs{RLfootnote} typesets its
  4883. % argument left-to-right.
  4884. % \begin{macrocode}
  4885. \DeclareDocumentCommand{\LRfootnote}{m}{\bgroup\pardir
  4886. TLT\textdir TLT\footnote{#1}\egroup}
  4887. \DeclareDocumentCommand{\RLfootnote}{m}{\bgroup\pardir
  4888. TRT\textdir TRT\footnote{#1}\egroup}
  4889. % \end{macrocode}
  4890. % \end{macro}
  4891. % \end{macro}
  4892. % \begin{macro}{\FixArbFtnmk} In the preamble, just below
  4893. % \cs{usepackage}|{arabluatex}|, \cs{FixArbFtnmk} may be of some
  4894. % help in case the footnote numbers at the bottom of the page are
  4895. % printed in the wrong direction. This quick fix uses and loads
  4896. % \package{scrextend} if it is not already loaded.
  4897. % \begin{macrocode}
  4898. \NewDocumentCommand{\FixArbFtnmk}{}{%
  4899. \@ifpackageloaded{scrextend}%
  4900. {\AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}%
  4901. {\RequirePackage{scrextend}
  4902. \AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}}
  4903. % \end{macrocode}
  4904. % \end{macro}
  4905. %
  4906. % \paragraph*{Exporting Unicode Arabic to external file}
  4907. % \begin{macro}{\SetArbOutSuffix}
  4908. % \changes{v1.13}{2018/08/27}{Sets a suffix to be appended to the
  4909. % filename of the external Unicode file.}By default, |_out| is the
  4910. % suffix to be appended to the external file in which
  4911. % \package{arabluatex} exports Unicode in place of
  4912. % |arabtex| or |buckwalter| strings. Any other suffix may be
  4913. % set with \cs{SetArbOutSuffix}\marg{suffix}.
  4914. % \begin{macrocode}
  4915. \NewDocumentCommand{\SetArbOutSuffix}{m}{
  4916. \luadirect{al_utffilesuffix(\luastringN{#1})}}
  4917. % \end{macrocode}
  4918. % \end{macro}
  4919. % \begin{macro}{\ArbOutFile}
  4920. % \changes{v1.13}{2018/08/27}{Silently exports its argument in the
  4921. % selected external file.}
  4922. % \cs{ArbOutFile}\oarg{newline}\marg{string} silently exports
  4923. % \meta{string} to the external selected file. It may take |newline|
  4924. % as an optional argument in which case a carriage return is
  4925. % appended to |string|.
  4926. % \begin{macro}{\ArbOutFile*}
  4927. % \cs{ArbOutFile*}\oarg{newline}\marg{string} does the same as
  4928. % \cs{ArbOutFile} but also inserts \meta{string} in the current
  4929. % |.tex| source file.
  4930. % \begin{macrocode}
  4931. \NewDocumentCommand{\ArbOutFile}{s O{no} +m}{%
  4932. \if@pkg@export%
  4933. \IfBooleanTF{#1}{%
  4934. #3\luadirect{tooutfile(\luastringN{#3}, "#2")}}{%
  4935. \luadirect{tooutfile(\luastringN{#3}, "#2")}}%
  4936. \else\IfBooleanTF{#1}{#3}{}\fi}
  4937. % \end{macrocode}
  4938. % \end{macro}
  4939. % \end{macro}
  4940. % \begin{environment}{arabexport}
  4941. % \changes{v1.13}{2018/08/27}{Processes and print its argument in
  4942. % the current file and exports it in full Unicode in the external
  4943. % selected \texttt{.tex} file.} The |arabexport| environment
  4944. % processes and prints its argument unchanged to the current |.pdf|
  4945. % file. Additionally, if \package{arabluatex} is loaded with the
  4946. % |export| option, this argument is exported to the external
  4947. % selected |.tex| file with Unicode in place of the original
  4948. % |arabtex| or |buckwalter| strings.
  4949. % \begin{macrocode}
  4950. \NewEnviron{arabexport}{%
  4951. \if@pkg@export%
  4952. \par
  4953. \BODY
  4954. \luadirect{al_doexport("yes")}
  4955. \luadirect{tex.sprint(arbtoutf(\luastringO{\BODY}))}
  4956. \luadirect{al_doexport("no")}
  4957. \else\par\BODY\fi
  4958. }[\par]
  4959. % \end{macrocode}
  4960. % \end{environment}
  4961. % \begin{environment}{arab@v@export} The |arab@v@export| environment
  4962. % does for |arabverse| the same as |arabexport|. It is used
  4963. % internally by |arabverse|.
  4964. % \begin{macrocode}
  4965. \NewEnviron{arab@v@export}[1]{%
  4966. \setkeys[al]{verse}[width, gutter, color, utf, delim, mode,
  4967. metre]{#1}
  4968. \if@pkg@export\ifal@verse@export%
  4969. \par
  4970. \BODY
  4971. \luadirect{al_doexport("arabverse")}
  4972. \luadirect{tex.sprint(arbtoutf(\luastringO{\BODY}))}
  4973. \luadirect{al_doexport("no")}
  4974. \else\par\BODY\fi\else\par\BODY\fi
  4975. }[\par]
  4976. % \end{macrocode}
  4977. % \end{environment}
  4978. % \begin{macro}{\arbpardir}
  4979. % \changes{v1.13}{2018/08/27}{Sets the direction of Arabic paragraphs
  4980. % once they are converted to Unicode.} \cs{arbpardir} is automatically
  4981. % inserted by \package{arabluatex} at the beginning of Arabic
  4982. % paragraphs converted to Unicode so that they are printed in the
  4983. % right direction.
  4984. % \begin{macrocode}
  4985. \NewDocumentCommand{\arbpardir}{}{%
  4986. \ifx\al@mode\al@mode@trans\setLR\else\setRL\fi}
  4987. % \end{macrocode}
  4988. % \end{macro}
  4989. %
  4990. % \subsection*{Errors and Warnings}
  4991. % \begin{macrocode}
  4992. \newcommand{\al@warning}[1]{\PackageWarning{arabluatex}{#1}}
  4993. \newcommand{\al@error}[2]{\PackageError{arabluatex}{#1}{#2}}
  4994. \newcommand{\al@wrong@nesting}{\al@error{%
  4995. (RL/LR)\string\footnote\space is not allowed\MessageBreak inside
  4996. \string\RL{} and \string\RL{} commands}{%
  4997. Get rid of the surrounding \string\RL{} or \string\LR{} command.}}
  4998. \newcommand{\al@wrong@mark}{\al@warning{%
  4999. Unknown Arabic mark in \string\arbmark{}. Replaced
  5000. with\MessageBreak <??>. Please check your code}}
  5001. % \end{macrocode}
  5002. %
  5003. % That is it. Say goodbye before leaving.
  5004. %
  5005. % \iffalse
  5006. %</package>
  5007. % \fi
  5008. %
  5009. % \subsection*{Patches}
  5010. % \label{sec:patches}
  5011. %
  5012. % \iffalse
  5013. %<*patch>
  5014. % \fi
  5015. % \begin{macrocode}
  5016. \NeedsTeXFormat{LaTeX2e}
  5017. \ProvidesPackage{arabluatex-patch}%
  5018. [2016/11/14 v1.0 patches for arabluatex]
  5019. % \end{macrocode}
  5020. % I have put in a separate |.sty| file external lines of code that
  5021. % I had to patch for a good reason. I hate doing this, and hopefully,
  5022. % most of these lines will disappear as soon as they are not required
  5023. % anymore.
  5024. %
  5025. % The following is taken from |latex.ltx|. I had to make this patch
  5026. % for I could not find a way to process the list environments in
  5027. % right-to-left mode. The \hologo{LuaTeX} primitives \cs{bodydir} and
  5028. % \cs{pagedir} will eventually allow us to get rid of this:
  5029. % \begin{macrocode}
  5030. \def\list#1#2{%
  5031. \ifnum \@listdepth >5\relax
  5032. \@toodeep
  5033. \else
  5034. \global\advance\@listdepth\@ne
  5035. \fi
  5036. \rightmargin\z@
  5037. \listparindent\z@
  5038. \itemindent\z@
  5039. \csname @list\romannumeral\the\@listdepth\endcsname
  5040. \def\@itemlabel{#1}%
  5041. \let\makelabel\@mklab
  5042. \@nmbrlistfalse
  5043. #2\relax
  5044. \@trivlist
  5045. \parskip\parsep
  5046. \parindent\listparindent
  5047. \advance\linewidth -\rightmargin
  5048. \advance\linewidth -\leftmargin
  5049. % \end{macrocode}
  5050. % patch begins:
  5051. % \begin{macrocode}
  5052. \ifbool{al@rlmode}{\advance\@totalleftmargin \rightmargin}%
  5053. {\advance\@totalleftmargin \leftmargin}
  5054. % \end{macrocode}
  5055. % patch ends.
  5056. % \begin{macrocode}
  5057. \parshape \@ne \@totalleftmargin \linewidth
  5058. \ignorespaces}
  5059. \def\@item[#1]{%
  5060. \if@noparitem
  5061. \@donoparitem
  5062. \else
  5063. \if@inlabel
  5064. \indent \par
  5065. \fi
  5066. \ifhmode
  5067. \unskip\unskip \par
  5068. \fi
  5069. \if@newlist
  5070. \if@nobreak
  5071. \@nbitem
  5072. \else
  5073. \addpenalty\@beginparpenalty
  5074. \addvspace\@topsep
  5075. \addvspace{-\parskip}%
  5076. \fi
  5077. \else
  5078. \addpenalty\@itempenalty
  5079. \addvspace\itemsep
  5080. \fi
  5081. \global\@inlabeltrue
  5082. \fi
  5083. \everypar{%
  5084. \@minipagefalse
  5085. \global\@newlistfalse
  5086. \if@inlabel
  5087. \global\@inlabelfalse
  5088. {\setbox\z@\lastbox
  5089. \ifvoid\z@
  5090. \kern-\itemindent
  5091. \fi}%
  5092. \box\@labels
  5093. \penalty\z@
  5094. \fi
  5095. \if@nobreak
  5096. \@nobreakfalse
  5097. \clubpenalty \@M
  5098. \else
  5099. \clubpenalty \@clubpenalty
  5100. \everypar{}%
  5101. \fi}%
  5102. \if@noitemarg
  5103. \@noitemargfalse
  5104. \if@nmbrlist
  5105. \refstepcounter\@listctr
  5106. \fi
  5107. \fi
  5108. % \end{macrocode}
  5109. % patch begins:
  5110. % \begin{macrocode}
  5111. \ifbool{al@rlmode}{\sRLbox\@tempboxa{\makelabel{#1}}}{%
  5112. \sbox\@tempboxa{\makelabel{#1}}}%
  5113. \ifbool{al@rlmode}{\global\setbox\@labels\hbox dir TRT}%
  5114. {\global\setbox\@labels\hbox}{%
  5115. % \end{macrocode}
  5116. % patch ends.
  5117. % \begin{macrocode}
  5118. \unhbox\@labels
  5119. \hskip \itemindent
  5120. \hskip -\labelwidth
  5121. \hskip -\labelsep
  5122. \ifdim \wd\@tempboxa >\labelwidth
  5123. \box\@tempboxa
  5124. \else
  5125. \hbox to\labelwidth {\unhbox\@tempboxa}%
  5126. \fi
  5127. \hskip \labelsep}%
  5128. \ignorespaces}
  5129. % \end{macrocode}
  5130. % This is adapted from Vafa Khalighi's \package{bidi} package. Thanks
  5131. % to him.
  5132. % \begin{macrocode}
  5133. \long\def\sRLbox#1#2{\setbox#1\hbox dir TRT{%
  5134. \color@setgroup#2\color@endgroup}}
  5135. % \end{macrocode}
  5136. %
  5137. % \iffalse
  5138. %</patch>
  5139. % \fi
  5140. %
  5141. % \Finale
  5142. \endinput