arabluatex.dtx 169 KB

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