diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/quran-bn/quran-bn.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/quran-bn/quran-bn.sty | 250 |
1 files changed, 250 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/quran-bn/quran-bn.sty b/Master/texmf-dist/tex/latex/quran-bn/quran-bn.sty new file mode 100644 index 00000000000..00e1ed59fa5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/quran-bn/quran-bn.sty @@ -0,0 +1,250 @@ +%% This is file `quran-bn.sty', and it's completely relies on the quran package. +%% +%% Copyright © 2021 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-bn.sty, +%% qurantext-bni.translation.def, qurantext-bnii.translation.def, +%% quran-bn-doc.tex, quran-bn-doc.pdf, and quran.png. +%% +%% To one having devoted his life to the Holy Quran +%% +\NeedsTeXFormat{LaTeX2e} +\def\quranbndate{2021/02/01} +\def\quranbnversion{0.1} +\ProvidesPackage{quran-bn}[% +\quranbndate\space v\quranbnversion\space^^J +Bengali translations extension to the quran package.% +] +\RequirePackage{xstring} +\RequirePackage{biditools} +\RequirePackage{xkeyval} +\define@boolkeys{quran-bn.sty}[bn@]{hoque,khan,all}[true] +\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{quran}} +\DeclareOption*{\PackageWarning{quran-bn}{Unknown option ‘\CurrentOption’}} +\ProcessOptionsX\relax +\ifbn@all + \ExecuteOptionsX{hoque,khan} +\else + \ExecuteOptionsX{khan} +\fi +\RequirePackage{quran} +\ifqt@wordwise% + \let\qt@newcmd\newcommand +\else% + \let\qt@newcmd\bidi@newrobustcmd +\fi% +\input{qurantext-bnii.translation.def}%Muhiuddin Khan +% +\ifbn@hoque% + \PackageInfo{quran-bn}{Zohurul Hoque's translation is chosen.}% +\fi% +\ifbn@khan% + \PackageInfo{quran-bn}{Muhiuddin Khan's translation is chosen.}% +\fi% +\newcount\trans@bn +\trans@bn=\@ne +\define@choicekey*+{quran-bn}{trans}[\val\nr]{hoque,khan}{% + \ifcase\nr\relax + \global\trans@bn=\z@\relax + \or + \global\trans@bn=\@ne\relax + \fi}{% + \PackageWarning{quran-bn}{\string \bnSetTrans' paramenter should be one of `hoque', or `khan'. The package sets to `khan' by default.}{}% + \global\trans@bn=\@ne\relax +}% +\newcommand*{\bnGetTrans}{% + \ifcase\trans@bn + hoque% + \or + khan% + \fi% +} +\newcommand{\bnSetTrans}[1]{% +\IfInteger{#1}% +{%Yes +\count255=#1% +\advance\count255 by -1\relax% +\trans@bn=\count255}% +{%NO +\setkeys{quran-bn}{trans=#1}}% +% +%\makeatother +%\let\bidi@newrobustcmd\bidi@renewrobustcmd +%\makeatletter +\ifqt@wordwise% + \makeatother\let\qt@newcmd\renewcommand\makeatletter% +\else% + \makeatother\let\qt@newcmd\bidi@renewrobustcmd\makeatletter% +\fi% +\ifcase\trans@bn%0 + \ifbn@hoque% + \ifx\basmalahbn\relax\else% + \def\basmalahbn{আল্লাহর নাম নিয়ে (আরম্ভ করছি), (যিনি) রহমান (--পরম করুণাময়, যিনি অসীম করুণা ও দয়া বশতঃ বিশ্বজগতের সমস্ত সৃষ্টির সহাবস্থানের প্রয়োজনীয় সব ব্যবস্থা অগ্রিম করে রেখেছেন), (যিনি) রহীম (--অফুরন্ত ফলদাতা, যাঁর অপার করুণা ও দয়ার ফলে প্রত্যেকের ক্ষুদ্রতম শুভ-প্রচেষ্টাও বিপুলভাবে সাফল্যমণ্ডিত ও পুরস্কৃত হয়ে থাকে)। \qt@par}% + \fi% + \bidi@renewrobustcmd\ToggleBasmalahbn{% + \ifx\basmalahbn\relax% + \def\basmalahbn{আল্লাহর নাম নিয়ে (আরম্ভ করছি), (যিনি) রহমান (--পরম করুণাময়, যিনি অসীম করুণা ও দয়া বশতঃ বিশ্বজগতের সমস্ত সৃষ্টির সহাবস্থানের প্রয়োজনীয় সব ব্যবস্থা অগ্রিম করে রেখেছেন), (যিনি) রহীম (--অফুরন্ত ফলদাতা, যাঁর অপার করুণা ও দয়ার ফলে প্রত্যেকের ক্ষুদ্রতম শুভ-প্রচেষ্টাও বিপুলভাবে সাফল্যমণ্ডিত ও পুরস্কৃত হয়ে থাকে)। \qt@par}% + \else% + \let\basmalahbn\relax% + \fi% + }% + \input{qurantext-bni.translation.def}% + \else% + \PackageError{quran-bn}{Zohurul Hoque's translation has not been loaded}{}% + \fi% +\or%1 + \ifbn@khan + \ifx\basmalahbn\relax\else% + \def\basmalahbn{শুরু করছি আল্লাহর নামে যিনি পরম করুণাময়, অতি দয়ালু। \qt@par}% + \fi + \bidi@renewrobustcmd\ToggleBasmalahbn{% + \ifx\basmalahbn\relax% + \def\basmalahbn{শুরু করছি আল্লাহর নামে যিনি পরম করুণাময়, অতি দয়ালু। \qt@par}% + \else% + \let\basmalahbn\relax% + \fi% + }% + \input{qurantext-bnii.translation.def}% + \else% + \PackageError{quran-bn}{Muhiuddin Khan's translation has not been loaded}{}% + \fi +\else% + \PackageError{quran-bn}{\string \bnSetTrans{} paramenter should be between 1 to 2}{}% +\fi +}% +\bidi@newrobustcmd\ToggleBasmalahbn{% + \ifx\basmalahbn\relax% + \ifcase\trans@bn% hoque + \def\basmalahbn{আল্লাহর নাম নিয়ে (আরম্ভ করছি), (যিনি) রহমান (--পরম করুণাময়, যিনি অসীম করুণা ও দয়া বশতঃ বিশ্বজগতের সমস্ত সৃষ্টির সহাবস্থানের প্রয়োজনীয় সব ব্যবস্থা অগ্রিম করে রেখেছেন), (যিনি) রহীম (--অফুরন্ত ফলদাতা, যাঁর অপার করুণা ও দয়ার ফলে প্রত্যেকের ক্ষুদ্রতম শুভ-প্রচেষ্টাও বিপুলভাবে সাফল্যমণ্ডিত ও পুরস্কৃত হয়ে থাকে)। \qt@par}% + \or% khan + \def\basmalahbn{শুরু করছি আল্লাহর নামে যিনি পরম করুণাময়, অতি দয়ালু। \qt@par}% + \fi% + \else% + \let\basmalahbn\relax% + \fi% +}% +\let\qt@doqt@orig\qt@doqt +%%%%%%%%%%%%%%%%%%%%%%%%%% +\bidi@apptocmd{\ToggleBasmalah}{\ToggleBasmalahbn}{}{} +\let\ToggleBasmalah@orig\ToggleBasmalah +\def\basmalahbn{শুরু করছি আল্লাহর নামে যিনি পরম করুণাময়, অতি দয়ালু। \qt@par}% +\def\Basmalahbn{% + \begingroup% + \let\par\relax% + \def\qt@no##1{\relax}% + \quranayahbn[1][1][1]% + \endgroup% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand\qt@dobn{ o o }{% + \addtocounter{qt@count}{1}% + \def\@qtexp{}% + \loop% + \global\xdef\@qtexp{\@qtexp\csname qurantrans@bn@\roman{qt@count}\endcsname\ifnum\value{qt@count}=\qt@max\else\space\fi\qt@par}% + \ifnum\value{qt@count}<\qt@max\relax% + \addtocounter{qt@count}{1}% + \repeat% + \IfNoValueTF{#1}% + {\@qtexp}%true + {\qt@WordCount=0\relax\c@qt@start=\numexpr#1-1\relax% + \readlist*\qt@words{\@qtexp}% + \IfNoValueTF{#2}% + {\c@qt@end=\numexpr\qt@wordslen+1\relax}{\c@qt@end=\numexpr#2+1\relax}% + \foreachitem\qt@word\in\qt@words{% + \ifnum\qt@wordcnt>\c@qt@start\ifnum\qt@wordcnt<\c@qt@end\qt@word\ifnum\qt@wordcnt=\numexpr\c@qt@end-1\relax\else\xspace\fi\fi\fi% + }% + \qt@showitems{\ifdefined\arabicfont\arabicfont\fi\showitems\qt@words}% + }%false +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\qurantextbn}{ s O{\qt@default} o t{+} }{% + \IfBooleanTF{#4}{\def\qt@showitems##1{\footnote{##1}}}{\def\qt@showitems##1{\relax}}% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\IfBooleanTF{#4}{\qurantext*[#2][#3]+}{\qurantext*[#2][#3]}}% + {\IfBooleanTF{#4}{\qurantext[#2][#3]+}{\qurantext[#2][#3]}}% + \let\qt@doqt\qt@doqt@orig% + \def\qt@showitems##1{\relax}% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand\quransurahbn{ s O{\qt@surah@default} }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quransurah*[#2]}% + {\quransurah[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranayahbn}{ s o o o t{+} }{% + \let\qt@doqt\qt@dobn% + \let\ToggleBasmalah\ToggleBasmalahbn% + \IfBooleanTF{#1}% + {\IfBooleanTF{#5}{\quranayah*[#2][#3][#4]+}{\quranayah*[#2][#3][#4]}}% + {\IfBooleanTF{#5}{\quranayah[#2][#3][#4]+}{\quranayah[#2][#3][#4]}}% + \let\qt@doqt\qt@doqt@orig% + \let\ToggleBasmalah\ToggleBasmalah@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranjuzbn}{ s o }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quranjuz*[#2]}% + {\quranjuz[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranpagebn}{ s o }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quranpage*[#2]}% + {\quranpage[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranquarterbn}{ s o }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quranquarter*[#2]}% + {\quranquarter[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranrukubn}{ s o }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quranruku*[#2]}% + {\quranruku[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranhizbbn}{ s o }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quranhizb*[#2]}% + {\quranhizb[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +\DeclareDocumentCommand{\quranmanzilbn}{ s o }{% + \let\qt@doqt\qt@dobn% + \IfBooleanTF{#1}% + {\quranmanzil*[#2]}% + {\quranmanzil[#2]}% + \let\qt@doqt\qt@doqt@orig% +}% +%%%%%%%%%%%%%%%%%%%%%%%%%% +%% End of file `quran-bn.sty'. |