summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/quran-de/tex/quran-de.sty
blob: 9ed2814778f3f4e14ab353ef128fede9edf0d062 (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
%% This is file `quran-de.sty', and it's completely relies on the quran package.
%% 
%% Copyright © 2018-2020 by 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.3
%% 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.3 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)
%% by Seiied-Mohammad-Javad Razavian..
%% The Current Maintainer of this work is Seiied-Mohammad-Javad Razavian.
%% 
%% This work consists of the files quran-de.sty, qurantext-deii.translation.def, qurantext-deiii.translation.def, 
%% qurantext-deiv.translation.def, quran-de-doc.tex, quran-de-doc.pdf, and quran.png. 
%%
%% To one having devoted his life to the Holy Quran
%%
\NeedsTeXFormat{LaTeX2e}
\def\qurandedate{2020/03/07}
\def\qurandeversion{0.2}
\ProvidesPackage{quran-de}[%
\qurandedate\space v\qurandeversion\space^^J 
German translations extension to the quran package.%
]
\RequirePackage{xstring}
\RequirePackage{xkeyval}
\define@boolkeys{quran-de.sty}[de@]{aburida,bubenheim,khoury,zaidan,all}[true]
\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{quran}}
\DeclareOption*{\PackageWarning{quran-de}{Unknown option ‘\CurrentOption’}}
\ProcessOptionsX\relax
\ifde@all
    \ExecuteOptionsX{aburida,bubenheim,khoury,zaidan}
\else
    \ExecuteOptionsX{aburida}
\fi
\RequirePackage[transde]{quran}[2020/03/03]
%
\ifde@aburida%
    \PackageInfo{quran-de}{aburida's translation is chosen.}%
\fi%
\ifde@bubenheim%
    \PackageInfo{quran-de}{bubenheim's translation is chosen.}%
\fi%
\ifde@khoury%
    \PackageInfo{quran-de}{khoury's translation is chosen.}%
\fi%
\ifde@zaidan%
    \PackageInfo{quran-de}{zaidan's translation is chosen.}%
\fi%
\newcount\trans@de%
\trans@de=\z@%
\define@choicekey*+{quran-de}{trans}[\val\nr]{aburida,bubenheim,khoury,zaidan}{%
    \ifcase\nr\relax
        \global\trans@de=\z@\relax%
    \or
        \global\trans@de=\@ne\relax%
    \or
        \global\trans@de=\tw@\relax%
    \or
        \global\trans@de=\thr@@\relax%
 \fi}{%
    \PackageWarning{quran-de}{\string \deSetTrans' paramenter should be one of  `aburida', `bubenheim', `khoury', or `zaidan'. The package sets to `aburida' by default.}{}%
    \global\trans@de=\z@\relax%
}%
\newcommand*{\deGetTrans}{%
    \ifcase\trans@de
        aburida%
    \or
        bubenheim%
    \or
        khoury%
    \or
        zaidan%
    \fi%
}
%
\newcommand{\deSetTrans}[1]{%
\IfInteger{#1}%
{%Yes
\count255=#1%
\advance\count255 by -1\relax%
\trans@de=\count255%
}{%NO
\setkeys{quran-de}{trans=#1}%
}%
%
%\let\bidi@newrobustcmd\bidi@renewrobustcmd
\ifqt@wordwise%
    \makeatother\let\qt@newcmd\renewcommand\makeatletter%
\else%
    \makeatother\let\qt@newcmd\bidi@renewrobustcmd\makeatletter%
\fi%
\ifcase\trans@de%
    \ifde@aburida%
        \ifx\basmalahde\relax\else%
            \def\basmalahde{Im Namen Allahs, des Allerbarmers, des Barmherzigen! \qt@par}%
        \fi%
        \bidi@renewrobustcmd\ToggleBasmalahde{%
            \ifx\basmalahde\relax%
                \def\basmalahde{Im Namen Allahs, des Allerbarmers, des Barmherzigen! \qt@par}%
            \else%
                \let\basmalahde\relax%
            \fi%
        }%        
        \input{qurantext-de.translation.def}%
    \else%
        \PackageError{quran-de}{Aburida's translation has not been loaded}{}%
    \fi%
\or%
    \ifde@bubenheim
        \ifx\basmalahde\relax\else%
            \def\basmalahde{Im Namen Allahs, des Allerbarmers, des Barmherzigen. \qt@par}%
        \fi
        \bidi@renewrobustcmd\ToggleBasmalahde{%
            \ifx\basmalahde\relax%
                \def\basmalahde{Im Namen Allahs, des Allerbarmers, des Barmherzigen. \qt@par}%
            \else%
                \let\basmalahde\relax%
            \fi%
        }%      
        \input{qurantext-deii.translation.def}%
    \else%
        \PackageError{quran-de}{Bubenheim's translation has not been loaded}{}%
    \fi
\or%
    \ifde@khoury
        \ifx\basmalahde\relax\else%
            \def\basmalahde{Im Namen Gottes, des Erbarmers, des Barmherzigen. \qt@par}%
        \fi    
        \bidi@renewrobustcmd\ToggleBasmalahde{%
            \ifx\basmalahde\relax%
                \def\basmalahde{Im Namen Gottes, des Erbarmers, des Barmherzigen. \qt@par}%
            \else%
                \let\basmalahde\relax%
            \fi%
        }%          
        \input{qurantext-deiii.translation.def}%
    \else%
        \PackageError{quran-de}{Khoury's translation has not been loaded}{}%
    \fi
\or%
    \ifde@zaidan
        \ifx\basmalahde\relax\else%
            \def\basmalahde{Bismil-lahir-rahmanir-rahim: Mit dem Namen ALLAHs, Des Allgnade Erweisenden, Des Allgnädigen (rezitiere ich). \qt@par}%
        \fi            
        \bidi@renewrobustcmd\ToggleBasmalahde{%
            \ifx\basmalahde\relax%
                \def\basmalahde{Bismil-lahir-rahmanir-rahim: Mit dem Namen ALLAHs, Des Allgnade Erweisenden, Des Allgnädigen (rezitiere ich). \qt@par}%
            \else%
                \let\basmalahde\relax%
            \fi%
        }%         
        \input{qurantext-deiv.translation.def}%
    \else%
        \PackageError{quran-de}{Zaidan's translation has not been loaded}{}%
    \fi
\else%
    \PackageError{quran-de}{\string \deSetTrans{} paramenter should be between 1 to 4 }{}%
\fi
}%
\bidi@renewrobustcmd\ToggleBasmalahde{%
    \ifx\basmalahde\relax%
        \ifcase\trans@de% aburida
            \def\basmalahde{Im Namen Allahs, des Allerbarmers, des Barmherzigen! \qt@par}%
        \or% bubenheim
            \def\basmalahde{Im Namen Allahs, des Allerbarmers, des Barmherzigen. \qt@par}%
        \or% khoury
            \def\basmalahde{Im Namen Gottes, des Erbarmers, des Barmherzigen. \qt@par}%
        \or% zaidan
            \def\basmalahde{Bismil-lahir-rahmanir-rahim: Mit dem Namen ALLAHs, Des Allgnade Erweisenden, Des Allgnädigen (rezitiere ich). \qt@par}%
        \fi%
    \else%
        \let\basmalahde\relax%
    \fi%
}%
%% End of file `quran-de.sty'.