arabluatex.dtx 219 KB

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