summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/quran/quran-doc.tex
blob: afaebfa8f76260c06e47da6ea2d58fc0390967ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
%% This is file `quran-doc.tex',
%%
%% Copyright © 2015-2024
%% Seiied-Mohammad-Javad Razavian <javadr@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% This work is “author-maintained” (as per LPPL maintenance status).
%%
%% The Current Maintainer of this work is Seiied-Mohammad-Javad Razavian.
%%
%% To one who has devoted his life to Quran
%%
\documentclass{ltxdoc}

\usepackage{forloop}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{holtxdoc}
\usepackage{fancyvrb}
\usepackage{url}
\usepackage{listings}
\usepackage{tikz}
\usepackage[hang,flushmargin]{footmisc}
\usepackage{fontspec}
\usepackage[toc]{multitoc}
\usepackage{manfnt}

\usepackage[trans={lt, de, en, fa, fr}, wordwise, uthmani]{quran}
\newfontfamily\quran[Script=Arabic]{Scheherazade}
\newfontfamily\amiri[Script=Arabic]{Amiri}
\hypersetup{%
      plainpages=false,%
      bookmarksnumbered,%
      pdftitle={The quran Package},%
      pdfkeywords={quran, surah, ayah, juz, hizb, ruku, manzil},%
      pdfauthor={Seiied-Mohammad-Javad Razavian},%
      baseurl={http://mirrors.ctan.org/macros/unicodetex/latex/quran/doc/quran-doc.pdf},%
}
\makeatletter
% because of definition of \XeTeX and \XeLaTeX symbols in bidi, I should undef these macro that are also defined in holtxdoc package.
\bidi@undef\XeTeX
\bidi@undef\XeLaTeX
% set fonr for quran text.
\bidi@preto\qurantext{\quran}
\makeatother
\usepackage{bidi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\tt#1{\LRE{\texttt{#1}}}
\lstdefinestyle{BashInputStyle}{
  basicstyle=\footnotesize\sffamily,
  frame=tb,
  columns=fullflexible,
  backgroundcolor=\color{gray!10},
}
% Define box and box title style
\tikzstyle{mybox} = [draw=black, fill=gray!20, very thick,
    rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} = [fill=gray, text=white]

\def\mx#1#2{\mybox{#1}{#2}[.46\textwidth]}
\def\mxf#1#2{\mybox{#1}{#2}}
\DeclareDocumentCommand{\mybox}{ s m m O{\textwidth} t{+} }{%
    \begin{tikzpicture}
    \IfBooleanTF{#5}{}{\setRTL}
    \node [mybox] (box){%
        \begin{minipage}[t]{#4}
            #3
        \end{minipage}
    };
    \node (hole) [anchor=north east, left=5pt ] at (box.north east) { \tikz\fill[very thick,white] (0,0) circle (12pt); };
    \node[ ] at (hole.center) {\includegraphics[width=.05\textwidth]{quran.png}};
    \node[fancytitle, anchor=west, right=7pt, rounded corners=2pt] at (box.north west) {\small \IfBooleanTF{#1}{#2}{\cs{#2}}};
    \end{tikzpicture}%
}
\renewenvironment{declcs}[1]{%
%    \par
    \addvspace{1.5ex plus 1ex}%
    \vskip -\parskip
    \noindent
    \hspace{1\leftmargini}%
    \def\M##1{\texttt{\{}\meta{##1}\texttt{\}}}%
    \def\*{\unskip\,\texttt{*}}%
    \begin{tabular}{@{}l@{}}%
        \toprule
%        \expandafter\SpecialUsageIndex\csname #1\endcsname
        \cs{#1}%
}{%
        \\%
        \bottomrule
    \end{tabular}%
    \nobreak
    \par
    \nobreak
    \vspace{1ex}%
    \vskip -\parskip
    \noindent
    \ignorespacesafterend
}
\def\none{\meta{number$_1$}}
\def\ntwo{\meta{number$_2$}}
\def\mgpar#1{\marginpar{\cs{#1}}}
\def\xmgpar#1{\xoption{#1}\marginpar{\xoption{#1}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{\includegraphics[scale=.3]{quran.png}\\
The \xpackage{quran} Package\thanks{To one who has devoted his life to the Holy Quran}}
\author{Seiied Mohammad Javad Razavian\\\xemail{javadr@gmail.com}}

\date{\qurandate,\space version \quranversion\footnote{Initial release: June 1st, 2015}}

\parindent=0pt

\begin{document}

\maketitle{
\centerline{\large\bfseries Abstract}
\bigskip

The \xpackage{quran} package\footnote{This work has been inspired by \xpackage{lipsum} and
\xpackage{ptext} packages and was initially released in June 2015 (Sha'ban 1436 AH).} 
has been developed for typesetting the Holy Quran. 
It offers several macros for typesetting not only the entire text or 
specific sections of the Holy Quran based on its traditional divisions, 
but also individual segments of an ayah. Additionally, 
the package supports four translations of the Holy Quran in 
German, English, French, and Persian, as well as its transliteration.%
\footnote{There are six companion packages, \xpackage{quran-de},
\xpackage{quran-ur}, \xpackage{quran-bn}, \xpackage{quran-id}, \xpackage{quran-en}, and \xpackage{quran-es}.
These packages provide additional translations of the Holy Quran in German, 
Urdu, Bengali, Indonesian, English, and Spanish, respectively.}

Please report any issues, including bugs or typos in the documentation, 
or submit feature requests at \url{https://github.com/javadr/quran/issues}.
}

\null\vfill
\pagebreak

\setlength{\columnseprule}{0.5pt}
\tableofcontents
\pagebreak


\thispagestyle{empty}
\null\vfil
\section*{Acknowledgments}
I would like to express my utmost gratitude to:
\begin{enumerate}
    \parskip=0pt
    \item \emph{Vafa Khaligi}, who pioneered typesetting right-to-left in \XeTeX.
    \item \emph{Hamid Zarrabi-Zadeh}, the creator of the invaluable \href{https://tanzil.net}{Tanzil} website, 
    for providing the text of the Holy Quran and some of its translations.
    \item The Parsi\LaTeX\ group, which tested and provided feedback on the package.
    \item Those who have \textbf{donated} to the \xpackage{quran} package, listed in chronological order:
    \begin{enumerate}
        \item \emph{Atiyah Elsheikh}, Feburary 2020.
    \end{enumerate}
\end{enumerate}

\newpage

\section{Loading the Package}

The package can be loaded using the standard command:\\
\cs{usepackage[option]\{quran\}}\\
All available \texttt{option}s are explained in Section \ref{sec:options}. 
Once the package is loaded, it will log some information about itself. 
The log entries will look something like this:

\begin{quote}
\begin{lstlisting}[style=BashInputStyle, escapechar={|},]
Package: quran |\qurandate| v|\quranversion|
An easy way to typeset the whole or any parts of the Holy Quran
\end{lstlisting}
\end{quote}

\section{Typesetting the Holy Quran}\label{sec:qurantypesetting}

To typeset any part or the entirety of the Holy Quran, 
the package provides several macros. 
These commands support typesetting various traditional divisions 
of the Holy Quran based on the Uthmani script, 
including Surah, Ayah, Page, Juz, Hizb, Quarter, Ruku, and Manzil, as well as specific segments of an Ayah.


\subsection{Surah/Sovar}
\begin{declcs}{quransurah}\oarg{surah range}\\
\cs{quransurah*}\oarg{surah range}
\end{declcs}

This macro can typeset any Surah of the Quran. 
A \meta{range} can be either a single \meta{number} or two numbers separated by a dash 
(e.g., \none-\ntwo). In \cs{quransurah} and similar commands, 
if \meta{range} does not satisfy \none~<~\ntwo{} within the valid domain, 
it may result in an error or produce undesired results. 
As there are a total of 114 Surahs, \meta{range} should be an integer between 1 and 114.

The macro \cs{quransurah} terminates the typesetting of each Ayah with \cs{par} 
(depending on the package option), whereas \cs{quransurah*} uses a blank space between Ayahs. 
As a rule of thumb, \cs{quransurah} prints Ayahs as multiple paragraphs, 
while \cs{quransurah*} prints them as a single paragraph. 
All starred macros in the package function similarly. 
For further details, please refer to page~\pageref{starred}.

The macro also accepts the anglicized title of a Surah. 
For instance, both \cs{quransurah[19]} and \cs{quransurah[Maryam]} produce the same result:
\mgpar{quransurah[19]}\mgpar{quransurah[Maryam]}
Refer to Table~\ref{tab1} for instructions on using the anglicized title of a Surah 
instead of its numerical order. As some anglicized titles include a dash (-), 
the \meta{range} should be separated by two dashes (\tt{--}), 
for example, \cs{quransurah[An-Nasr--An-Naas]}.

The macro \cs{quransurah} without an optional argument outputs the default Surah of the package, 
Al-Ikhlaas, provided that this default has not been changed (see below).


\centerline{\mx{quransurah[94]}{\quransurah[94]} \hfill
    \mx{quransurah[At-Tin]}{\quransurah[At-Tin]}}

\centerline{\mxf{quransurah*[113-114]}{\quransurah*[113-114]}}

\centerline{\mx{quransurah[109-110]}{\quransurah[109-110]} \hfill
    \mx{quransurah[Al-Masad--Al-Ikhlaas]}{\quransurah[Al-Masad--Al-Ikhlaas]}}

\centerline{\mx{quransurah*}{\quransurah*} \hfill\mx{quransurah}{\quransurah}}

To change the default Surah, use \cs{setsurahdefault\{m\}}. 
By default, the package sets Surah 112. \mgpar{setsurahdefault}
For example, after changing the default Surah to 107 with \cs{setsurahdefault\{107\}}, 
the output will be as shown below:

\setsurahdefault{107}
\centerline{\mxf{quransurah*}{\quransurah*}}

\newcounter{ct}
\def\mycell#1{%
    \texttt{\surahname[\value{#1}]}%
    \addtocounter{ct}{38}%
}
\begin{table}[!htb]
    \centering
    \fontsize{8}{10}\selectfont
    \begin{tabular}{|*{3}{c|l|}}
    \hline
     Order & Anglicized Title & Order  & Anglicized Title  & Order  & Anglicized Title  \\
    \hline\hline%
    \forloop{ct}{1}{\value{ct} < 38}{%
        \ifnum\thect=1\phantom{.}\fi\thect & \mycell{ct} & \thect & \mycell{ct} & \thect & \mycell{ct}\\
        \addtocounter{ct}{-114}
    }%
    \thect & \mycell{ct} & \thect & \mycell{ct} & \thect & \mycell{ct}\\%
    \hline
    \end{tabular}
    \protect\caption{\scshape Anglicized Titles of Surahs' Names}\label{tab1}
\end{table}

\subsection{Ayah/Ayat}
\begin{declcs}{quranayah}\oarg{surah range}\oarg{ayah range}\\
\cs{quranayah*}\oarg{surah range}\oarg{ayah range}
\end{declcs}

The \meta{range} used here is similar to the one explained for \cs{quransurah}, 
and this pattern applies to all commands defined in the package. Therefore, 
this command typesets the \textit{n}$^{th}$ Ayah of a Surah, 
or the range from the \textit{m}$^{th}$ to the \textit{n}$^{th}$ Ayahs of a Surah.

\centerline{\mx{quranayah[33][33]}{\quranayah[33][33]} \hfill
    \mx{quranayah[Al-Ahzaab][33]}{\quranayah[Al-Ahzaab][33]}}

The Basmalah will not be printed automatically when typesetting the first Ayah of any Surah. 
To include the Basmalah, use the \cs{basmalah} macro before the Ayah. 
For further details, please refer to page~\pageref{sec:basmalah}.

\marginpar{\cs{basmalah}}


\centerline{\mx{quranayah[Ibrahim][1]}{\quranayah[Ibrahim][1]} \hfill
    \mx{basmalah\textbackslash{}quranayah[14][1]}{\quran\basmalah\quranayah[14][1]}}

\centerline{\mx{quranayah*[Ash-Shura][22-26]}{\quranayah*[Ash-Shura][22-26]} \hfill
    \mx{quranayah*[42][22-26]}{\quranayah*[42][22-26]}}

Both \cs{quransurah} and \cs{quranayah} are \emph{case-insensitive} with respect to the anglicized titles of Surahs. 
In other words, there is no distinction between `Al-Fatiha', `al-fatiha', 
or any other combination of uppercase and lowercase letters.

\centerline{\mx{quransurah*[Al-Faatiha]}{\quransurah*[Al-Faatiha]} \hfill
    \mx{quransurah*[aL-fAatIhA]}{\quransurah*[aL-fAatIhA]}}

\subsection{Page/Pages}
\begin{declcs}{quranpage}\oarg{page range}\\
\cs{quranpage*}\oarg{page range}
\end{declcs}

Typesets the specified \meta{range} of pages of the Holy Quran. 
The page numbers in \meta{range} should be between $1$ and $604$, based on the Medina Mushaf.


    \centerline{\hboxR{\mx{quranpage*[249]}{\quranpage*[249]}
    \hfill
    \mx{quranpage*[250]}{\quranpage*[250]}}}

    \centerline{\mxf{quranpage*[603-604]}{\quranpage*[603-604]}}

\subsection{Juz/Ajza}
\begin{declcs}{quranjuz}\oarg{juz range}\\
\cs{quranjuz*}\oarg{juz range}
\end{declcs}

This macro typesets the specified \meta{range} of Juz(zes) of the Holy Quran, ranging from $1$ to $30$.

\subsection{Hizb/Ahzab}

Each Juz of the Holy Quran is divided into two Hizbs/Ahzab (groups), 
resulting in a total of 60 Hizbs. 
The following macro typesets the specified Hizb(s) of the Holy Quran.

\begin{declcs}{quranhizb}\oarg{hizb range}\\
\cs{quranhizb*}\oarg{hizb range}
\end{declcs}


\centerline{\mxf{quranquarter*[110]}{\quranquarter*[110]}}

\subsection{Quarter/Quarters}

Each Hizb of the Holy Quran is divided into four quarters, known as Maqras, 
resulting in eight Maqras per Juz. 
There are a total of 240 Maqras in the Holy Quran.
These Maqras are often used as sections for revision 
during memorization of the Holy Quran.\footnote{\url{https://en.wikipedia.org/wiki/Juz'}}

\begin{declcs}{quranquarter}\oarg{quarter range}\\
\cs{quranquarter*}\oarg{quarter range}
\end{declcs}



\subsection{Ruku/Rukus}
``The term ruk\=u --- roughly translated to ``passage", ``pericope" or ``stanza" --- 
is also used to denote a group of thematically related verses in the Qur'an. 
Longer suras (chapters) in the Qur'an are usually divided into several ruk\= us, 
so that the reciters could identify when to make ruk\= u in Salat
without breaking an ongoing topic in the Quranic 
text."\footnote{\url{https://en.wikipedia.org/wiki/Ruku}} There are a total of $556$ Rukus.

\begin{declcs}{quranruku}\oarg{ruku range}\\
\cs{quranruku*}\oarg{ruku range}
\end{declcs}

    \centerline{\mxf{quranruku*[363]}{\quranruku*[363]}}

    \centerline{\mxf{quranruku*[58-59]}{\quranruku*[58-59]}}


\subsection{Manzil/Manazil}

``For those who wish to complete reading the Qur'an within a week, 
the text may be divided into 7 portions, each known as a Manzil.

``The following division into 7 equal portions is attributed to Hamza Al-Zayyat (d. 156/772):

\begin{enumerate}
    \item Al-Fatiha (Surah 1) through An-Nisa (Surah 4) -- 4 Surahs.
    \item Al-Maida (Surah 5) through At-Tawba (Surah 9) -- 5 Surahs.
    \item Yunus (Surah 10) through An-Nahl (Surah 16) -- 7 Surahs.
    \item Al-Isra (Surah 17) through Al-Furqan (Surah 25) -- 9 Surahs.
    \item Ash-Shuara (Surah 26) through Ya-Sin (Surah 36) -- 11 Surahs.
    \item As-Saffat (Surah 37) through Al-Hujurat (Surah 49) -- 13 Surahs.
    \item Qaf (Surah 50) through An-Nas (Surah 114) — 65 Surahs.''\footnote{\url{https://en.wikipedia.org/wiki/Manzil}}
\end{enumerate}

\begin{declcs}{quranmanzil}\oarg{manzil range}\\
\cs{quranmanzil*}\oarg{manzil range}
\end{declcs}

The above macro typesets the Manzil(s)/Manazil of the Holy Quran.

\subsection{Text of the Quran}

The following macro is central to all macros in the package, 
enabling the typesetting of any range of Quranic verses. The Holy Quran contains 6,236 Ayahs. 
This macro allows for the typesetting of a specific Ayah or any range of Ayahs.

\begin{declcs}{qurantext}\oarg{index range}\\
\cs{qurantext*}\oarg{index range}
\end{declcs}

\centerline{\mxf{qurantext[1023]}{\begingroup\qurantext[1023]\endgroup}}

\centerline{\mxf{qurantext*[4111-4117]}{\begingroup\qurantext*[4111-4117]\endgroup}}

Using \cs{qurantext} without its optional argument defaults to \texttt{[1-7]}, 
which corresponds to Surah Al-Fatiha. To change the default text, use \cs{setqurantextdefault\{m-n\}}.
\marginpar{\cs{qurantext}}


    \centerline{\mxf{qurantext*}{\qurantext*}}

    \noindent In the following example, \cs{setqurantextdefault\{4128-4137\}} has changed the default to index $4128$ to $4137$.
    \mgpar{setqurantextdefault\{m-n\}}

    \setqurantextdefault{4128-4137}
    \centerline{\mxf{qurantext*}{\qurantext*}}

\subsection{Whole of the Holy Quran}

The following macros, when provided with the appropriate parameters, can be used to typeset the entire Holy Quran.

\begin{multicols}{2}
\begin{itemize}
    \item \cs{quransurah[1-114]}
    \item \cs{quranjuz[1-30]}
    \item \cs{quranpage[1-604]}
    \item \cs{qurantext[1-6236]}
    \item \cs{quranhizb[1-60]}
    \item \cs{quranquarter[1-240]}
    \item \cs{quranruku[1-556]}
    \item \cs{quranmanzil[1-7]}
    \item \cs{quransurah*[1-114]}
    \item \cs{quranjuz*[1-30]}
    \item \cs{quranpage*[1-604]}
    \item \cs{qurantext*[1-6236]}
    \item \cs{quranhizb*[1-60]}
    \item \cs{quranquarter*[1-240]}
    \item \cs{quranruku*[1-556]}
    \item \cs{quranmanzil*[1-7]}
\end{itemize}
\end{multicols}

\subsection{Chunks of an Ayah}\label{chunk}

Starting from version 1.6, the package can typeset not only entire Ayahs but also specific segments of an Ayah, 
provided the \xmgpar{wordwise} option is enabled.\footnote{This practical feature was suggested and 
financially supported by \emph{Atiyah Elsheikh} in February 2020.} 
In this case, the \cs{quranayah} and \cs{qurantext} macros include additional optional parameters 
to enable this functionality.

\begin{declcs}{quranayah}\oarg{surah range}\oarg{ayah range}\oarg{chunk range}\\
\cs{quranayah}\oarg{surah range}\oarg{ayah range}\oarg{chunk range}\tt{+}
\end{declcs}

\begin{declcs}{qurantext}\oarg{index range}\oarg{chunk range}\\
\cs{qurantext}\oarg{index range}\oarg{chunk range}\tt{+}
\end{declcs}

These commands separate the words within the \meta{ayah range}/\meta{index range} 
by white spaces and then output the specified \meta{chunk range}. 
If the \meta{chunk range} includes only one number, 
the output will start from the \meta{number}\textsuperscript{th} word to the end of the \meta{ayah range}.

\centerline{\mx{quranayah[2][156][6]}{\quranayah[2][156][6]} \hfill
                \mx{quranayah[2][286][31-43]}{\quranayah[2][286][31-43]}}

The package enumerates the words in a specified \meta{ayah/index range}, 
which can be displayed in the footnote if the commands are followed by \tt{+}.


\centerline{\mxf{quranayah[Ar-Ra'd][23-24][10]+}{\quranayah[Ar-Ra'd][23-24][10]+}}

% \pagebreak[4]
Fetching just one word from
an ayah requires the \meta{chunck range} to have both \meta{number}s as the same.

To fetch a single word from an Ayah, the \meta{chunk range} 
must have both \meta{numbers} set to the same value.

\centerline{\mx{quranayah[18][19][34-34]}{\quranayah[18][19][34-34]} }

\section{Miscellaneous}

\subsection{Name of Surah}
\begin{declcs}{surahname}\oarg{index}\\
\cs{surahname*}\oarg{index}
\end{declcs}

These commands return the Anglicized or Arabic title of the \textit{index}\textsuperscript{th} 
surah of the Holy Quran, as shown in Table~\ref{tab1} and Table~\ref{tab2}.

    \centerline{\mx{surahname[19]}{\surahname[19]}
    \hfill
    \mx{surahname*[19]}{\quran\surahname*[19]}}

\def\mycell#1#2{%
    \hboxR{\amiri\phantom{آح}\surahname*[\value{#1}]}%
    \addtocounter{ct}{#2}%
}
\begin{table}[!hbtp]
    \centering
%    \fontsize{12}{14}\selectfont
    \begin{RTL}
    \begin{tabular}{|*{4}{@{\hspace{1mm}}c@{\hspace{1mm}}|r|}}
    \hline
     Order & \multicolumn{1}{c|@{\hspace{1mm}}}{Title} & Order  & \multicolumn{1}{c|@{\hspace{1mm}}}{Title}
     & Order  & \multicolumn{1}{c|@{\hspace{1mm}}}{Title}  & Order  & \multicolumn{1}{c|}{Title}  \\
    \hline\hline%
    \forloop{ct}{1}{\value{ct} < 29}{%
        \ifnum\thect=1\phantom{..}\fi\thect & \mycell{ct}{29} & \thect & \mycell{ct}{29} & \thect & \mycell{ct}{28} & \thect & \mycell{ct}{28}\\
        \addtocounter{ct}{-114}
    }%
    \thect & \mycell{ct}{29} & \thect & \mycell{ct}{29} &  &  &  & \\%
    \hline
    \end{tabular}
    \end{RTL}
    \protect\caption{\scshape Arabic Titles of Surahs}\label{tab2}
\end{table}

\subsection{Basmalah}\label{sec:basmalah}
\begin{declcs}{basmalah}\\
\cs{Basmalah}
\end{declcs}
It provides the Basmalah (\RLE{\quran\Basmalah}) in Arabic text. 
There is a subtle difference between \cs{Basmalah} and \cs{basmalah} -- 
the latter may be followed by a \cs{par} depending on the package option.

    \centerline{\mx{basmalah\textbackslash{}quranayah*[14][1]}{\quran\basmalah\quranayah*[14][1]} \hfill
    \mx{Basmalah\textbackslash{}space\textbackslash{}quranayah*[14][1}{\quran\Basmalah\ \quranayah*[14][1]}}

\subsection{Index Converting}
\begin{declcs}{indexconvert}\marg{index}\marg{surah macro}\marg{ayah macro}
\end{declcs}

It converts an index number between $1$ and $6236$ to its corresponding surah and ayah indices. 
The index can be either a number or a \TeX{} counter. 
If the surah and ayah macros are not already defined, 
they will be automatically set as \TeX{} counters, 
representing the surah and ayah of the given index in the text of the Holy Quran.

\begin{SaveVerbatim}{VerbEnv}
\newcount\index \index=5678

\indexconvert{\index}{\surahcount}{\ayahcount}

Index \the\index\ belongs to ayah number \the\ayahcount\
of surah number \the\surahcount\ (=\surahname[\the\surahcount]).

\end{SaveVerbatim}

\centerline{\mybox*{\ttfamily\textbackslash{}indexconvert}{
\UseVerbatim{VerbEnv}
\newcount\index \index=5678
\indexconvert{\index}{\surahcount}{\ayahcount}
Index \the\index\ belongs to ayah number \the\ayahcount\ of surah number \the\surahcount\ (=\surahname[\the\surahcount]).
}+}

\section{Options for the Package}\label{sec:options}

By default, all macros in the package separate Ayahs with \cs{par}. 
To modify this behavior, use the \xmgpar{nopar} option, 
which changes the separation from \cs{par} to spaces. \marginpar{starred macros}
Alternatively, you can use the starred versions of macros to achieve the same effect. 
Starred macros omit \cs{par} when typesetting Ayahs of the Holy Quran. \label{starred} 
With the \xmgpar{nopar} option, starred macros will function as if this option were not loaded.


\medskip

All surahs of the Holy Quran are divided into ayahs, each of which has its own index. 
By default, these numbers are typeset alongside the text of each ayah. To suppress these numbers, 
use the \xmgpar{nonumber} option, which prevents the ayah numbers from being printed.


\begin{declcs}{ToggleAyahNumber}{}
\end{declcs}
This macro modifies the package's default behavior concerning the typesetting of ayah indices 
wherever it is invoked. In other words, the macro can toggle the display of ayah indices in the output text, 
enabling or disabling them as needed.

    \centerline{\mxf{ToggleAyahNumber\textbackslash{}quransurah*[89]}
    {\ToggleAyahNumber\quransurah*[89]}}

\medskip

Version 1.9 introduces a new option, \xmgpar{ornbraces}, 
which allows users to add ornamental braces around the Quranic text, 
similar to those surrounding the Ayah numbers. 
To customize these ornamental braces, the \cs{SetOrnamentalBraces} macro can be employed. 
This command accepts two arguments: the opening brace and the closing brace. 
By utilizing the flexibility of the \cs{SetOrnamentalBraces} macro, 
users can tailor the appearance of the ornamental braces to suit their preferences.

\begin{declcs}{SetOrnamentalBraces}\marg{starting brace}\marg{ending brace}
\end{declcs}

The \xmgpar{wordwise} option enables the package to output specific portions of an ayah. 
For further details, please refer to Section~\ref{chunk}.

    \centerline{\mx{quranayah[9][111][1-23]}{\quranayah[9][111][1-23]}}
    \centerline{\mxf{ToggleAyahNumber\textbackslash{}quranayah[An-Nisaa][171-172][14-64]}
                    {\ToggleAyahNumber\quranayah[An-Nisaa][171-172][14-64]}}


\medskip

By default, the package typesets the text of the Holy Quran in a simple script. 
However, the options \xmgpar{uthmani} and \xmgpar{uthmani-min} modify this default to the Uthmani script. 
You can compare the following texts to discern the differences between the 
``default'', ``uthmani,'' and ``uthmani-min'' scripts.

    \makeatletter\let\qt@newcmd\renewcommand
    \input{qurantext-simple.def}%
    \makeatother
    \centerline{\mxf{quranayah*[Al-A'raaf][54-56] (default)}{\quranayah*[al-a'raaf][54-56]}}
    \makeatletter\let\qt@newcmd\renewcommand
    \input{qurantext-uthmani.def}%
    \makeatother
    \centerline{\mxf{quranayah*[Al-A'raaf][54-56] (uthmani)}{\quranayah*[al-a'raaf][54-56]}}
    \makeatletter\let\qt@newcmd\renewcommand
    \input{qurantext-uthmani-min.def}%
    \makeatother
    \centerline{\mxf{quranayah*[Al-A'raaf][54-56] (uthmani-min)}{\quranayah*[al-a'raaf][54-56]}}
    \makeatletter\let\qt@newcmd\renewcommand
    \input{qurantext-simple.def}%
    \makeatother
\medskip


Starting from version 1.3, the package is capable of typesetting the transliteration of the Holy Quran. 
This feature is particularly useful for those unfamiliar with reading Arabic script. 
By enabling the \xmgpar{translt} option, all macros defined in Section~\ref{sec:qurantypesetting}
will also have a corresponding ``\texttt{lt}" version. 
In other words, the following macros are introduced through this option:

\begin{multicols}{3}
\begin{itemize}
    \item \cs{quransurahlt}
    \item \cs{quranayahlt}
    \item \cs{quranpagelt}
    \item \cs{quranjuzlt}
    \item \cs{quranhizblt}
    \item \cs{quranquarterlt}
    \item \cs{quranrukult}
    \item \cs{quranmanzillt}
    \item \cs{qurantextlt}
\end{itemize}
\end{multicols}

    \centerline{\mx{quransurahlt[108]}{\setLTR\quransurahlt[108]}
    \hfill
    \mx{quransurah[108]}{\quransurah[108]}}

\medskip

The package supports typesetting translations of the Holy Quran in various languages. 
These options were introduced in response to user requests for translations in their respective languages. 
By loading \xmgpar{transde}, \xmgpar{transen}, \xmgpar{transfr}, or \xmgpar{transfa}, 
additional macros are provided for typesetting translations in German, English, French, and Persian, respectively.

By loading each of these options, all macros defined in section~\ref{sec:qurantypesetting} will have
a ``\texttt{de}"/``\texttt{en}"/``\texttt{fr}"/``\texttt{fa}" version. In other words,
these options will add the following macros:

\begin{multicols}{2}
\texttt{transde} option:
\begin{itemize}
    \item \cs{quransurahde}
    \item \cs{quranayahde}
    \item \cs{quranpagede}
    \item \cs{quranjuzde}
    \item \cs{quranhizbde}
    \item \cs{quranquarterde}
    \item \cs{quranrukude}
    \item \cs{quranmanzilde}
    \item \cs{qurantextde}
\end{itemize}

\texttt{transen} option:
\begin{itemize}
    \item \cs{quransurahen}
    \item \cs{quranayahen}
    \item \cs{quranpageen}
    \item \cs{quranjuzen}
    \item \cs{quranhizben}
    \item \cs{quranquarteren}
    \item \cs{quranrukuen}
    \item \cs{quranmanzilen}
    \item \cs{qurantexten}
\end{itemize}

\texttt{transfr} option:
\begin{itemize}
    \item \cs{quransurahfr}
    \item \cs{quranayahfr}
    \item \cs{quranpagefr}
    \item \cs{quranjuzfr}
    \item \cs{quranhizbfr}
    \item \cs{quranquarterfr}
    \item \cs{quranrukufr}
    \item \cs{quranmanzilfr}
    \item \cs{qurantextfr}
\end{itemize}

\texttt{transfa} option:
\begin{itemize}
    \item \cs{quransurahfa}
    \item \cs{quranayahfa}
    \item \cs{quranpagefa}
    \item \cs{quranjuzfa}
    \item \cs{quranhizbfa}
    \item \cs{quranquarterfa}
    \item \cs{quranrukufa}
    \item \cs{quranmanzilfa}
    \item \cs{qurantextfa}
\end{itemize}

\end{multicols}

    All translations are sourced from \url{tanzil.net}. 
    For the German, English, French, and Persian languages, 
    the following translators have been selected based on user suggestions: 
    ``Abu Rida Muhammad ibn Ahmad ibn Rassoul'' for German, 
    ``Ahmed Ali'' for English, 
    ``Muhammad Hamidullah'' for French, and 
    ``Mohammad Mahdi Fooladvand'' for Persian.    

\medskip

    The \xmgpar{trans} option is designed to facilitate the simultaneous use of multiple translations. 
    This option accepts any combination of ``\texttt{lt}", ``\texttt{de}'', ``\texttt{en}'', 
    ``\texttt{fr}'' and ``\texttt{fa}''. 
    For example, you can specify multiple translations using \xoption{trans=\{de, en, lt\}}.    

    \marginpar{\dbend} Typically, loading all translations simultaneously is not feasible due to 
    \TeX{} memory limitations. For more details and potential solutions to overcome this restriction, 
    refer to \emph{Why do I get the ``! TeX capacity exceeded'' error?} on page \pageref{sec:texcapacity}.

    \centerline{\mxf{quransurah*[108]}{\quransurah*[108]}}

    \centerline{\mx{quransurahen[108]}{\setLTR\small\quransurahen[108]}
    \hfill
    \mx{quransurahde[108]}{\setLTR\small\quransurahde[108]}}

    \centerline{\mx{quransurahfr[108]}{\setLTR\quran\small\quransurahfr[108]}
    \hfill
    \mx{quransurahfa[108]}{\quransurahfa[108]}}

\section{Frequently Asked Questions}
    \subsection{What is the most suitable font for typesetting Quranic text?}
    ``Scheherazade"%
    \footnote{\url{http://software.sil.org/scheherazade/}}
    or ``Amiri"%
    \footnote{\url{http://www.amirifont.org/}} fonts
    are strongly recommend.
    \begin{quote}
    \emph{Scheherazade} is released under the SIL Open Font License (OFL), version 1.1. Copyright (c) 2004-2015,
    SIL International (http://scripts.sil.org/) with Reserved Font Names ``Scheherazade'' and ``SIL''.
    As a result, you are free to download it
    All examples in this document use this font.
    \end{quote}
    \begin{quote}
    \emph{Amiri} is a classical Arabic typeface in Naskh style
    designed for typesetting books and other running text.
    It is a revival of the beautiful typeface pioneered in early 20$^{th}$ century by Bulaq Press in Cairo,
    also known as Amiria Press, after which the font is named.
    Amiri is a free, open source project that everyone is encouraged to use and modify.
    \end{quote}

    \subsection{How to use the \xpackage{quran} package?}

    To typeset Quranic text, you need a package that supports right-to-left (RTL) text and utilizes UTF-8 fonts, 
    as the \xpackage{quran} package relies on a Unicode database.
    The recommended packages for this purpose are \xpackage{polyglossia}, \xpackage{fontspec}, and \xpackage{bidi}, 
    which together provide the necessary functionality. Alternatively, you can use \xpackage{xepersian}, 
    which also relies on \xpackage{bidi} and \xpackage{fontspec}.
    Another option is to use \xpackage{arabxetex} or \xpackage{arabluatex}. 
    Note that \xpackage{arabxetex} works with \XeLaTeX, 
    while \xpackage{arabluatex} is compatible only with \LuaLaTeX. 
    Both \xpackage{arabxetex} and \xpackage{arabluatex} use the Amiri font by default. 
    Below are examples demonstrating all four approaches:

\begin{quote}

\begin{lstlisting}[style=BashInputStyle, title=``example: with polyglossia{,}
fontspec{,} and bidi"]
\documentclass{article}

\usepackage{quran}

%%% for typesetting arabic text
\usepackage{polyglossia}
\setotherlanguage{arabic}

\usepackage{fontspec}
\setmainfont{Scheherazade}

%%% for typesetting in Rigth-To-Left direction
\usepackage{bidi}

\begin{document}

\setRTL % tell bidi to typeset the text in Rigth-To-Left direction
\textarabic{\quransurah}

\end{document}
\end{lstlisting}


\begin{lstlisting}[style=BashInputStyle, title=``example: with xepersian"]
\documentclass{article}

\usepackage{quran}

%%% for typesetting Persian/Arabic text in Rigth-To-Left direction
\usepackage{xepersian}
\settextfont{Scheherazade}

\begin{document}

\quransurah

\end{document}
\end{lstlisting}

\begin{lstlisting}[style=BashInputStyle, title=``example: with arabxetex"]
\documentclass{article}

\usepackage{arabxetex} % for typesetting Arabic text in Rigth-To-Left direction
\usepackage{quran}

\begin{document}

\begin{arab}[utf]
    \quransurah
\end{arab}

\end{document}
\end{lstlisting}

\begin{lstlisting}[style=BashInputStyle, title=``example: with arabluatex"]
\documentclass{article}

\usepackage{arabluatex} % for typesetting Arabic text in Rigth-To-Left direction
\usepackage{quran}

\begin{document}

\begin{txarab}
    \quransurah
\end{txarab}

\end{document}
\end{lstlisting}

\end{quote}

    \subsection{How to set a default font for Quranic text?}
    To automatically change the font of Quranic text in your document, 
    you can simply precede the \cs{qurantext} macro with the desired font. For example:

    \begin{quote}

    With \xpackage{fontspec}, put the commands below in the preamble:
\begin{lstlisting}[style=BashInputStyle]
\newfontfamily\quran{Scheherazade}
\makeatletter
\bidi@preto\qurantext{\quran}
\makeatother
\end{lstlisting}

     With \xpackage{xepersian}, put the following commands in the preamble:

\begin{lstlisting}[style=BashInputStyle]
\defpersianfont\quran{Scheherazade}
\makeatletter
\bidi@preto\qurantext{\quran}
\makeatother
\end{lstlisting}


\end{quote}

    By setting the default font as described above, if you want to use \cs{qurantext}, 
    you must enclose it in curly braces. Otherwise, 
    the font change will affect the subsequent text as well.

\begin{quote}
\begin{lstlisting}[style=BashInputStyle]
{\qurantext[x-y]}
\end{lstlisting}
\end{quote}

    \subsection{How to Typeset a Portion of the Holy Quran in One Paragraph 
    without Ayah Numbers, without Using the \xoption{nopar} Option}

    Just place the code described on page~\pageref{starred} within a group, as shown below:
\begin{quote}
\begin{lstlisting}[style=BashInputStyle]
{\ToggleAyahNumber\quransurah*}
\end{lstlisting}
\end{quote}

\setsurahdefault{112}
\mxf{quransurah* «\{\textbackslash{}ToggleAyahNumber\textbackslash{}quransurah*\}» \textbackslash{}quransurah*}
{\quransurah* »{\ToggleAyahNumber\quransurah*}« \quransurah*}

    \subsection{Why Do I Get the ``\tt{! TeX capacity exceeded}'' Error?}
   \label{sec:texcapacity}

    The invention of \TeX{} dates back several decades. Despite the advancements in modern hardware, 
    \TeX{} was originally designed to operate efficiently on the relatively limited computer 
    resources available at the time of its creation. The \xpackage{quran} package includes 
    numerous macros that can potentially exhaust \TeX's memory, occasionally resulting in compilation errors.
    To address this issue, one approach is to increase \TeX's memory allocation. 
    Detailed instructions on how to do this can be found in the section titled ``Memory Limitations'' 
    in the \xpackage{pgfplots} manual. However, simply expanding \TeX's memory 
    may not always be the most effective solution.
    A more practical approach might be to reconsider the design of your document. 
    For instance, when using the \xoption{wordwise} option, you might encounter 
    ``\texttt{! TeX capacity exceeded}'' errors, particularly when employing the starred versions 
    of macros that output large portions of Quranic text.


    In such cases, you can achieve a similar output by processing smaller chunks. 
    For example, if you encounter errors when attempting to typeset the first ten juzes 
    with the \cs{quranjuz*[1-10]} command, consider breaking the task into smaller segments.

    \begin{quote}
    \tt{! TeX capacity exceeded, sorry [main memory size=5000000]} \\or \\
    \tt{! TeX capacity exceeded, sorry [parameter stack size=10000]}
    \end{quote}

    It would be more effective to typeset each Juz separately or even each page within the desired range. 
    For instance, you can use the commands \cs{quranjuz*[1]} \cs{quranjuz*[2]} $\cdots$ \cs{quranjuz*[10]} 
    or \cs{quranpage*[1]} \cs{quranpage*[2]} $\cdots$ \cs{quranpage*[201]} to accomplish this.


\makeatletter
\bidi@patchcmd{\History}{\raggedright}{}{}{}
\makeatother

\begin{History}

    \begin{Version}{2015/06/01 v0.1}
        \item Initial release in Parsi\LaTeX\ group under the name \xpackage{qurantext}.
        \item Added \cs{qurantext} macro.
    \end{Version}

    \begin{Version}{2015/06/02 v0.2}
        \item Redefined \cs{do@qt} in a non-recursive style to prevent \TeX\ stack overflow issues. 
        The previous recursive version occasionally caused stack overflows. 
        Thanks to \emph{Masoud Yazdani} for suggesting the solution.
    \end{Version}

    \begin{Version}{2015/06/02 v0.3}
        \item Added Ayah numbers at the end of each verse in the output. 
        Thanks to \emph{Mahmood AminToosi} for suggesting this feature.
    \end{Version}

    \begin{Version}{2015/06/04 v0.4} %reluctant about date
        \item Added \cs{surahname} macro to output the Arabic or Anglicized title of a surah, based on text direction.
        \item Renamed the package from \xpackage{qurantext} to \xpackage{quran}.
    \end{Version}

    \begin{Version}{2015/06/24 v0.5}
         \item Added \cs{quranayah} macro to output a \meta{range} of ayahs from a surah.
         \item Added \cs{quransurah} macro to output a \meta{range} of surahs.
         \item Special thanks to \emph{Mahmood AminToosi} for suggesting these new features.
    \end{Version}

    \begin{Version}{2015/06/28 v0.6}
        \item Added \cs{quranjuz} macro to output a juz's range of the Holy Quran.
    \end{Version}

    \begin{Version}{2015/06/30 v0.7}
        \item Added \cs{quranpage} macro to output one or more pages of the Holy Quran.
    \end{Version}

    \begin{Version}{2015/07/02 v0.71}
        \item Added a \cs{par} command after the Basmalah, following the suggestion of \emph{Mahmood AminToosi}.
    \end{Version}

    \begin{Version}{2015/07/02 v0.72}
        \item Introduced the \cs{basmalah} macro to typeset the Basmalah: \hboxR{\Basmalah}.
    \end{Version}

    \begin{Version}{2015/07/04 v0.8}
        \item Added the \cs{quranquarter} and \cs{quranruku} macros.
    \end{Version}

    \begin{Version}{2015/07/07 v0.9}
        \item Added the \cs{quranhizb} and \cs{quranmanzil} macros.
        \item The package was uploaded to CTAN.
    \end{Version}

    \begin{Version}{2015/07/10 v0.91}
        \item The default option for \cs{quransurah} was set to ``Al-Ikhlaas''.
    \end{Version}

    \begin{Version}{2015/07/11 v0.94}
        \item Added two new macros, \cs{ChangeAyahNumber} and \cs{ChangeBasmalah}, to customize the appearance of ayah numbers and basmalah.
        \item Fixed a minor bug related to extra white spaces around one ayah, with thanks to \emph{Masoud Yazdani} for reporting the issue.
    \end{Version}

    \begin{Version}{2015/07/11 v0.941}
        \item Reduced the size of the ``quran script'' file by moving \cs{qt@par} into the \cs{qurantext} macro.
    \end{Version}

    \begin{Version}{2016/02/05 v1.0}
        \item Added support for using anglicized titles of surahs, as well as their indexes, in \cs{quransurah} and \cs{quranayah}.
    \end{Version}


    \begin{Version}{2016/02/09 v1.05}
        \item Renamed \cs{ChangeBasmalah} and \cs{ChangeAyahNumber} to \cs{ToggleBasmalah} and \cs{ToggleAyahNumber}, respectively.
        \item Fixed a minor bug in \cs{quransurah*} that caused unwanted extra spaces in the output.
        Thanks to \emph{Hosein Behboody} for reporting this issue.
    \end{Version}

    \begin{Version}{2016/04/21 v1.1}
        \item Introduced \cs{indexconvert} macro, which converts a number between $1$ to $6236$
        to its exact surah and ayah number in the entire text of the Quran.
    \end{Version}

    \begin{Version}{2016/05/15 v1.14}
        \item Documentation updates.
    \end{Version}

    \begin{Version}{2016/10/05 v1.2}
        \item Added support for Uthmani script via \xoption{uthmani} option,
        as requested by one of the package's users.
    \end{Version}

    \begin{Version}{2016/11/07 v1.21}
        \item Fixed some minor bugs related to uploading to CTAN
    \end{Version}

    \begin{Version}{2016/11/08 v1.22}
        \item The sources of two PDF files used in the documentation were appended to the bundle.
    \end{Version}

    \begin{Version}{2016/11/12 v1.24}
        \item Documentation updates.
        \item Pause marks (waqf symbols) were missed from the penultimate version of uthmani script.
    \end{Version}

    \begin{Version}{2016/11/15 v1.241}
        \item Documentation updates.
    \end{Version}

    \begin{Version}{2016/12/25 v1.25}
        \item Documentation updates.
    \end{Version}
    \begin{Version}{2016/12/25 v1.251}
        \item Documentation updates.
    \end{Version}

    \begin{Version}{2017/02/28 v1.252}
        \item Minor improvements.
    \end{Version}

    \begin{Version}{2017/08/22 v1.26}
        \item Minor improvements
        \item Fixed a bug in \cs{quranayah[x][y]} by enclosing it in a group. Thanks to \emph{Sayyed Saieed Mosavi Nadooshani} for reporting this issue.
        \item Documentation updates.
    \end{Version}

    \begin{Version}{2016/08/22 v1.261}
        \item Documentation updates--corrected a typo in version number.
    \end{Version}

    \begin{Version}{2017/10/22 v1.3}
        \item Added support for transliteration. Now all macros include an ``lt" version 
        for typesetting transliteration of the original macros. Thanks to \emph{Hamidreza Ahmadian} 
        for suggesting this feature.
    \end{Version}

    \begin{Version}{2017/10/28 v1.4}
        \item Added Persian, English, and Deutsch translations with the 
        inclusion of the ``fa", ``en", and ``de" versions of macros. Three new options, 
        \xoption{transfa}, \xoption{transen}, and \xoption{transde}, 
        have been introduced to enable these translations.
        \item Introduced a new option, \xoption{trans}, which can accept values `lt', `en', `de', and `fa' 
        separated by commas, allowing for the simultaneous use of multiple translations.
    \end{Version}

    \begin{Version}{2017/12/22 v1.41}
        \item In previous versions, the \cs{quransurah} and \cs{quranayah} macros were case-sensitive 
        with regard to surah names. From this version onward, both macros are case-insensitive. 
        This change allows for any combination of uppercase and lowercase letters when specifying surah names, 
        so ``Al-Fatihda", ``al-fatiha", and ``al-Fatiha" are treated equivalently.
    \end{Version}

    \begin{Version}{2017/12/22 v1.42}
        \item Starting from this version, the \cs{quransurahX} and \cs{quranayahX} macros also 
        support case-insensitivity for the anglicized titles of surahs. 
        Here, `X' represents the language codes `en' (English), `de' (Deutsch), `fa' (Persian), or `lt' (Latin). 
        This ensures that variations in capitalization do not affect the macro's functionality.
    \end{Version}

    \begin{Version}{2017/12/22 v1.42a}
        \item Documentation update--A typo has been corrected.
        \item Some files were missed in the last CTAN update.
    \end{Version}

    \begin{Version}{2018/11/29 v1.42b}
        \item A typo in quran-transde.def has been corrected.
    \end{Version}

    \begin{Version}{2018/12/01}
        \item \href{https://github.com/javadr/quran-de}{\xpackage{quran-de}} 
        package is released, adding support for three more translations in German.
    \end{Version}

    \begin{Version}{2018/12/31 v1.5}
        \item Minor bugs in \cs{ToggleBasmalah} and \cs{quransurah} have been fixed.
    \end{Version}

    \begin{Version}{2019/05/03}
        \item \href{https://github.com/javadr/quran-ur}{\xpackage{quran-ur}} 
        package is released, adding eight translations in Urdu.
    \end{Version}

    \begin{Version}{2019/05/04 v1.51}
        \item A typo in quran-transde.def has been corrected.
    \end{Version}

    \begin{Version}{2020/03/07 v1.6}
        \item Added support for getting any chunks of an ayah with two extra optional arguments 
        for \cs{qurantext} and \cs{quranayah}. This feature was suggested and 
        financially supported by \emph{Atiyah Elsheikh}. May God bless him.
        \item \cs{Basmalah} now outputs basmalah without any surrounding whitespaces.
        \item Documentation has been revised.
    \end{Version}

    \begin{Version}{2020/03/09 v1.61}
        \item The current font of the text is now applied to footnotes when \cs{quranayah} or \cs{qurantext} 
        is called with its \texttt{+} optional argument. Previously, footnotes used the Amiri font.
    \end{Version}

    \begin{Version}{2020/03/12 v1.62}
        \item The license has been updated from LPPL Version 1.3 to LPPL Version 1.3c.
    \end{Version}

    \begin{Version}{2020/03/14 v1.63}
        \item Pause marks (waqf symbols) have been removed from \cs{quranayah} and \cs{qurantext} 
        when the optional parameter \oarg{chunk range} is used.
    \end{Version}

    \begin{Version}{2020/06/10 v1.7}
        \item French translation added with the introduction of the ``fr'' version of macros. 
        The new option \xoption{transfr} is defined for this translation.
        \item A new value \xoption{fr} has been added to the \xoption{trans} option.
        \item Documentation updates.
    \end{Version}

    \begin{Version}{2020/06/12 v1.7a}
        \item Some of the missed files related to the French translation were uploaded to CTAN.
    \end{Version}

    \begin{Version}{2020/10/14 v1.8}
        \item Added a new option `\xoption{uthmani-min}'; it behaves the same as 
        the `\xoption{uthmani}' option prior to this release.
        \item The `\xoption{uthmani}' option now typesets the text of the Holy Quran with more diacritical marks, 
        as requested on \href{https://github.com/javadr/quran/issues/4}{this issue}..
    \end{Version}

    \begin{Version}{2021/02/01}
        \item \href{https://github.com/javadr/quran-bn}{\xpackage{quran-bn}} 
        package is released, adding two translations in Bengali,
        as requested on \href{https://github.com/javadr/quran/issues/2}{this issue}.
    \end{Version}

    \begin{Version}{2021/02/02 v1.81}
        \item Documentation update in compliance with the first release of the \xpackage{quran-bn} package.
    \end{Version}

    \begin{Version}{2023/06/28 v1.9; Eid al-Adha 1444 AH}
        \item The new option `\xoption{ornbraces}' adds ornamental braces around the Quran text.
        \item The \cs{SetOrnamentalBraces} command allows for 
        the personalization of the ornamental braces surrounding the Quran text.
    \end{Version}

    \begin{Version}{2023/07/10 v2.0}
        \item The text of the Holy Quran in the package has been updated to comply with \href{https://tanzil.net/updates/}{Tanzil text version 1.1}.
    \end{Version}

    \begin{Version}{2023/07/27 v2.1}
        \item Anglicized names of Quran surahs revised using \href{http://tanzil.net/res/text/metadata/quran-data.xml}{Quran Metadata}.
        See Table~\ref{tab:newnames}
        \item Fixed the issue with dropping \cs{par} introduced in version 1.9.
    \end{Version}

    \begin{Version}{2023/08/01 v2.2}
        \item Added support for old Anglicized names of Quran surahs, 
        ensuring backward compatibility with previous versions of the package.
    \end{Version}

    \begin{Version}{2023/11/01}
        \item \href{https://github.com/javadr/quran-id}{\xpackage{quran-id}} 
        package is released, adding three translations in Indonesian
        as requested on \href{https://github.com/javadr/quran/issues/11}{this issue}.
    \end{Version}

    \begin{Version}{2023/11/04}
        \item \href{https://github.com/javadr/quran-en}{\xpackage{quran-en}} 
        package is released, adding three translations in English
        as requested on \href{https://github.com/javadr/quran/issues/7}{this issue}.
    \end{Version}

    \begin{Version}{2024/09/05}
        \item \href{https://github.com/javadr/quran-es}{\xpackage{quran-es}} 
        package is released, adding three translations in Spanish
        as requested on \href{https://github.com/javadr/quran/issues/12}{this issue}.
    \end{Version}

    \begin{Version}{2024/09/07 v2.3}
        \item Documentation update with the release of \href{https://github.com/javadr/quran-es}{\xpackage{quran-es}}.
    \end{Version}


    \begin{table}[!htbp]
        \ttfamily\small
        \begin{tabular}{|c|l|l||c|l|l|}
            \hline
            Order & \multicolumn{1}{c|}{Ver.$\leq 2.0$} & \multicolumn{1}{c||}{Ver.$\geq 2.1$} &
            Order & \multicolumn{1}{c|}{Ver.$\leq 2.0$} & \multicolumn{1}{c|}{Ver.$\geq 2.1$} \\
            \hline
            1 & Al-Fatiha 	 & 	Al-Faatiha & 3 & Aal-e-Imran 	 & 	Aal-i-Imraan \\
            4 & An-Nisa 	 & 	An-Nisaa & 5 & Al-Maeda 	 & 	Al-Maaida \\
            6 & Al-Anaam 	 & 	Al-An'aam & 7 & Al-Araf 	 & 	Al-A'raaf \\
            8 & Al-Anfal 	 & 	Al-Anfaal & 9 & At-Taubah 	 & 	At-Tawba \\
            13 & Ar-Rad 	 & 	Ar-Ra'd & 14 & Ibrahim & Ibraahim \\
            17 & Al-Isra 	 & 	Al-Israa & 20 & Taha 	 & 	Taa-Haa \\
            21 & Al-Anbiya 	 & 	Al-Anbiyaa & 23 & Al-Mumenoon 	 & 	Al-Muminoon \\
            25 & Al-Furqan 	 & 	Al-Furqaan & 26 & Ash-Shuara 	 & 	Ash-Shu'araa \\
            33 & Al-Ahzab 	 & 	Al-Ahzaab & 35 & Fatir 	 & 	Faatir \\
            36 & Ya-Seen 	 & 	Yaseen & 37 & As-Saaffat 	 & 	As-Saaffaat \\
            38 & Sad 	 & 	Saad & 40 & Ghafir 	 & 	Ghaafir \\
            44 & Ad-Dukhan 	 & 	Ad-Dukhaan & 45 & Al-Jathiya 	 & 	Al-Jaathiya \\
            46 & Al-Ahqaf & Al-Al-Ahqaaf & 49 & Al-Hujraat 	 & 	Al-Hujuraat \\
            50 & Qaf 	 & 	Qaaf & 51 & Adh-Dhariyat 	 & 	Adh-Dhaariyat \\
            52 & At-tur 	 & 	At-Tur & 55 & Al-Rahman 	 & 	Ar-Rahmaan \\
            56 & Al-Waqia 	 & 	Al-Waaqia & 58 & Al-Mujadila 	 & 	Al-Mujaadila \\
            60 & Al-Mumtahina 	 & 	Al-Mumtahana & 62 & Al-Jumua 	 & 	Al-Jumu'a \\
            63 & Al-Munafiqoon 	 & 	Al-Munaafiqoon & 64 & At-Taghabun 	 & 	At-Taghaabun \\
            65 & At-Talaq 	 & 	At-Talaaq & 70 & Al-Maarij 	 & 	Al-Ma'aarij \\
            74 & Al-Muddathir 	 & 	Al-Muddaththir & 75 & Al-Qiyama & 	Al-Qiyaama \\
            76 & Al-Insan 	 & 	Al-Insaan & 77 & Al-Mursalat 	 & 	Al-Mursalaat \\
            79 & An-Naziat 	 & 	An-Naazi'aat & 82 & AL-Infitar 	 & 	Al-Infitaar \\
            84 & Al-Inshiqaq 	 & 	Al-Inshiqaaq & 86 & At-Tariq 	 & 	At-Taariq \\
            87 & Al-Ala 	 & 	Al-A'laa & 88 & Al-Ghashiya 	 & 	Al-Ghaashiya \\
            93 & Ad-Dhuha 	 & 	Ad-Dhuhaa & 94 & Al-Inshirah 	 & 	Ash-Sharh \\
            99 & Al-Zalzala 	 & 	Az-Zalzala &  100 & Al-Adiyat 	 & 	Al-Aadiyaat \\
            101 & Al-Qaria 	 & 	Al-Qaari'a & 102 & At-Takathur 	 & 	At-Takaathur \\
            107 & Al-Maun 	 & 	Al-Maa'un & 108 & Al-Kauther 	 & 	Al-Kawthar \\
            109 & Al-Kafiroon 	 & 	Al-Kaafiroon & 111 & Al-Masadd 	 & 	Al-Masad \\
            112 & Al-Ikhlas 	 & 	Al-Ikhlaas & 114 & An-Nas 	 & 	An-Naas \\
            \hline
        \end{tabular}
        \caption{Revision of Anglicized Names of Quran Surahs in ver. 2.1}\label{tab:newnames}
        \end{table}


    \def\cb{{\tiny$\bullet$\space}}
    \def\mrule{\leaders\vrule height 2.5pt depth -1.5pt \hfill}
    \begin{small}
    \begin{longtable}{|c|l|p{9cm}|}
        \toprule
        Date & Ver. & \multicolumn{1}{c|}{Feature} \\
        \midrule
        \endhead
        \bottomrule
        \multicolumn{3}{r}{\scriptsize continued on next page}\\
        \endfoot
        \multicolumn{3}{c}{}\\
        \caption{Brief History of the \xpackage{quran} Development}
        \endlastfoot
        2015/06/01 & 0.1 &  \cb Initial release in Parsi\LaTeX, named \xpackage{qurantext} \par
                            \cb \cs{qurantext}         \\
        2015/06/02 & 0.2 &  \cb Implementation of \cs{do@qt} in a non-recursive style  \\
        2015/06/02 & 0.3 &  \cb Ayah's number has been appended to each verse.\\
        2015/06/04 & 0.4 &  \cb \cs{surahname}  outputs the Arabic/Anglicized title of a surah\par
                            \cb The package renamed to \xpackage{quran}\\
        2015/06/24 & 0.5 &  \cb \cs{quranayah} and \cs{quransurah} \\
        2015/06/28 & 0.6 &   \cb \cs{quranjuz} \\
        2015/06/30 & 0.7 &   \cb \cs{quranpage} \\
        2015/07/02 & 0.71 &  \cb Basmalah was followed by a \cs{par}\\
        2015/07/02 & 0.72 & \cb \cs{basmalah} -- \hboxR{\Basmalah} \\
        2015/07/04 & 0.8 &  \cb \cs{quranquarter} and \cs{quranruku} \\
        2015/07/07 & 0.9 &  \cb \cs{quranhizb} and \cs{quranmanzil}\par
                            \cb Initial release of the package in CTAN. \\
        2015/07/10 & 0.91 & \cb ``Al-Ikhlaas'' as a default parameter for \cs{quransurah}  \\
        2015/07/11 & 0.94 &   \cb \cs{ChangeAyahNumber} and\cs{ChangeBasmalah} \par
                            \cb Resolved a minor bug  \\
        2015/07/11 & 0.941 &  \cb Improvement in \cs{qurantext} \\
        2016/02/05 & 1.0 &   \cb \cs{quransurah} and \cs{quranayah} support anglicized title of surahs \\
        2016/02/09 & 1.05 &   \cb \cs{ChangeBasmalah} and \cs{ChangeAyahNumber} renamed to
                                \cs{ToggleBasmalah} and \cs{ToggleAyahNumber}\par
                                \cb Fixed a minor bug in \cs{quransurah*}\\
        2016/04/21 & 1.1 &   \cb \cs{indexconvert} \\
        2016/05/15 & 1.14 &  \cb Documentation updates \\
        2016/10/05 & 1.2 &  \cb Added \xoption{uthmani} option supporting Uthmani script  \\
        2016/11/07 & 1.21 &  \cb Fixed some minor bugs \\
        2016/11/08 & 1.22 &  \cb Documentation updates \\
        2016/11/12 & 1.24 &  \cb Documentation updates\par
                            \cb Pause marks (waqf symbols) were missed from uthmani script\\
        2016/11/15 & 1.241 &  \cb Documentation updates \\
        2016/12/25 & 1.25 &  \cb Documentation updates \\
        2016/12/25 & 1.251 &  \cb Documentation updates \\
        2017/02/28 & 1.252 &  \cb Minor improvements   \\
        2017/08/22 & 1.26 &   \cb Minor improvements\par
                            \cb Bug fix in \cs{quranayah[x][y]}\par
                            \cb Documentation updates \\
        2016/08/22 & 1.261 &  \cb Documentation updates \\
        2017/10/22 & 1.3 &  \cb Added support for transliteration via \xoption{translt} option \\
        2017/10/28 & 1.4 &  \cb Persian, English, and Deutsch translations via \xoption{transfa}, \xoption{transen}, and \xoption{transde} options\par
                            \cb \xoption{trans} option with `lt', `en', `de', and `fa' values \\
        2017/12/22 & 1.41 &  \cb Case-insensitive  \cs{quransurah} and \cs{quranayah} \\
        2017/12/22 & 1.42 &  \cb Case-insensitive  \cs{quransurahX} and \cs{quranayahX} \par\tt{X} $\in$ \{`en', `de', `fa',  `lt'\}  \\
        2017/12/22 & 1.42a &  \cb Documentation updates \\
        2018/11/29 & 1.42b &  \cb Fixed a typo in \tt{quran-transde.def}\\
        2018/12/01 & \multicolumn{2}{c|}{ \null \mrule {\space}Initial release of the 
        \href{https://github.com/javadr/quran-de}{\xpackage{quran-de}} package \mrule \space\null}\\
        2018/12/31 & 1.5 &  \cb Bug fix in \cs{ToggleBasmalah} and \cs{quransurah}  \\
        2019/05/03 & \multicolumn{2}{c|}{ \null \mrule {\space}Initial release of the 
            \href{https://github.com/javadr/quran-ur}{\xpackage{quran-ur}} package \mrule \space\null}\\
        2019/05/04 & 1.51 &  \cb Fixed a typo in \tt{quran-transde.def}\\
        2020/03/07 & 1.6 &  \cb \cs{qurantext} and \cs{quranayah} support any chunks of an ayah\par
                            \cb \cs{Basmalah} \hfil \cb Documentation revision\\
        2020/03/09 & 1.61 &  \cb Minor update in \cs{quranayah} and \cs{qurantext} \\
        2020/03/12 & 1.62 &  \cb License updated to LPPL Version 1.3c \\
        2020/03/14 & 1.63 &  \cb Removed pause marks with \meta{chunk range} optional parameter\\
        2020/06/10 & 1.7 &  \cb French translation available via
                            \xoption{transfr} option, or
                            \xoption{trans} option with ‘\xoption{fr}’ value\\
        2020/06/12 & 1.7a &  \cb CTAN upload correction. \\
        2020/10/14 & 1.8 &  \cb Renamed `\xoption{uthmani}' to `\xoption{uthmani-min}' \par
                            \cb `\xoption{uthmani}' now typesets text of the Holy Quran with more diacritical marks.\\
        2021/02/01 & \multicolumn{2}{c|}{ \null \mrule {\space}Initial release of the 
            \href{https://github.com/javadr/quran-bn}{\xpackage{quran-bn}} package \mrule \space\null}\\
        2021/02/02 & 1.81 &  \cb  Documentation updates \\
        2023/06/28 & 1.9 &  \cb  Added `\xoption{ornbraces}' option \par\cb \cs{SetOrnamentalBraces} to customize the ornamental braces. \\
        2023/07/10 & 2.0 &  \cb  Quran text update in compliance with tanzil version 1.1. \\
        2023/07/27 & 2.1 &  \cb  Revised Anglicized names of Quran surahs \\
        2023/08/01 & 2.2 &  \cb  Added support for old Anglicized names of Quran surahs \\
        2023/11/01 & \multicolumn{2}{c|}{ \null \mrule {\space}Initial release of the 
            \href{https://github.com/javadr/quran-id}{\xpackage{quran-id}} package \mrule \space\null}\\
        2023/11/04 & \multicolumn{2}{c|}{ \null \mrule {\space}Initial release of the 
            \href{https://github.com/javadr/quran-en}{\xpackage{quran-en}} package \mrule \space\null}\\
        2024/09/05 & \multicolumn{2}{c|}{ \null \mrule {\space}Initial release of the 
            \href{https://github.com/javadr/quran-es}{\xpackage{quran-es}} package \mrule \space\null}\\
        2024/09/07 & 2.3 &  \cb  Documentation retouching \\
        \bottomrule
    \end{longtable}
    \end{small}

\end{History}


\end{document}