arabluatex.dtx 212 KB

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