diff options
Diffstat (limited to 'arabluatex.dtx')
-rw-r--r-- | arabluatex.dtx | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx index cc4aa16..53fcc5a 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx | |||
@@ -2698,6 +2698,7 @@ wa-ya.sIru ta.hta 'l-jild-i | |||
2698 | \RequirePackage{luacode} | 2698 | \RequirePackage{luacode} |
2699 | \RequirePackage{xparse} | 2699 | \RequirePackage{xparse} |
2700 | \RequirePackage{environ} | 2700 | \RequirePackage{environ} |
2701 | \RequirePackage{adjustbox} | ||
2701 | \RequirePackage{xkeyval} | 2702 | \RequirePackage{xkeyval} |
2702 | % \end{macrocode} | 2703 | % \end{macrocode} |
2703 | % The following boolean will be set to |true| in |RL| mode: | 2704 | % The following boolean will be set to |true| in |RL| mode: |
@@ -2978,19 +2979,17 @@ wa-ya.sIru ta.hta 'l-jild-i | |||
2978 | \define@boolkey[al]{verse}{utf}[true]{} | 2979 | \define@boolkey[al]{verse}{utf}[true]{} |
2979 | \define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, | 2980 | \define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, |
2980 | trans}{\def\al@mode{#1}} | 2981 | trans}{\def\al@mode{#1}} |
2982 | \presetkeys[al]{verse}{metre=\LR{\vskip -\baselineskip}}{} | ||
2981 | \presetkeys[al]{verse}{utf=false}{} | 2983 | \presetkeys[al]{verse}{utf=false}{} |
2982 | % \end{macrocode} | 2984 | % \end{macrocode} |
2983 | % Then follows the environment itself: | 2985 | % Then follows the environment itself: |
2984 | % \begin{macrocode} | 2986 | % \begin{macrocode} |
2985 | \NewDocumentEnvironment{arabverse}{O{}}% | 2987 | \NewDocumentEnvironment{arabverse}{O{}}% |
2986 | {\noindent\bgroup\setkeys[al]{verse}[metre]{#1}% | 2988 | {\par\centering\noindent\bgroup\setkeys[al]{verse}[metre]{#1}% |
2987 | \ifx\al@mode\al@mode@trans% | 2989 | \ifx\al@mode\al@mode@trans% |
2988 | \ifal@verse@utf\setRL\else\setLR\fi% | 2990 | \ifal@verse@utf\setRL\else\setLR\fi% |
2989 | \else\setRL\fi% | 2991 | \else\setRL\fi}% |
2990 | \ifx\al@mode\al@mode@trans\else% | 2992 | {\hfill\setkeys[al]{verse}[width,utf,mode]{#1}\egroup} |
2991 | \begin{center}\fi}% | ||
2992 | {\ifx\al@mode\al@mode@trans\else\end{center}\fi% | ||
2993 | \hfill\setkeys[al]{verse}[width,utf,mode]{#1}\egroup} | ||
2994 | % \end{macrocode} | 2993 | % \end{macrocode} |
2995 | % \begin{macro}{\bayt} | 2994 | % \begin{macro}{\bayt} |
2996 | % \changes{v1.6}{2016/11/30}{New macro \cs{bayt} for typesetting | 2995 | % \changes{v1.6}{2016/11/30}{New macro \cs{bayt} for typesetting |
@@ -3017,30 +3016,22 @@ wa-ya.sIru ta.hta 'l-jild-i | |||
3017 | \def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt} | 3016 | \def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt} |
3018 | \NewDocumentCommand{\bayt}{m o m}{% | 3017 | \NewDocumentCommand{\bayt}{m o m}{% |
3019 | \edef\al@tatweel{--}% | 3018 | \edef\al@tatweel{--}% |
3020 | \ifx\al@mode\al@mode@trans\arb{#1}\else% | 3019 | \adjustbox{width=\al@bayt@width, height=\Height}{\arb{#1}}% |
3021 | \makebox[\al@bayt@width][s]{\arb{#1}}\fi% | ||
3022 | \IfNoValueTF{#2}{% | 3020 | \IfNoValueTF{#2}{% |
3023 | \ifx\al@mode\al@mode@trans\hskip .5em | 3021 | \hspace{.15\al@bayt@width}% |
3024 | \al@hemistich@delim\hskip .5em% | 3022 | }{% |
3025 | \else | ||
3026 | \hspace{.25\al@bayt@width}% | ||
3027 | \fi}{% | ||
3028 | \edef\@tempa{#2}% | 3023 | \edef\@tempa{#2}% |
3029 | \ifx\@tempa\al@tatweel% | 3024 | \ifx\@tempa\al@tatweel% |
3030 | \ifx\al@mode\al@mode@trans\hskip .5em | ||
3031 | \al@hemistich@delim\hskip .5em% | ||
3032 | \else | ||
3033 | \makebox[.25\al@bayt@width][s]{\al@verse@stroke}% | ||
3034 | \fi% | ||
3035 | \else% | ||
3036 | \ifx\al@mode\al@mode@trans% | 3025 | \ifx\al@mode\al@mode@trans% |
3037 | \hskip 1em\arb{#2}\hskip 1em% | 3026 | \hspace{.15\al@bayt@width}% |
3038 | \else% | 3027 | \else% |
3039 | \makebox[.25\al@bayt@width][c]{\arb{#2}}% | 3028 | \adjustbox{width=.15\al@bayt@width, height=\Height}{\arb{--}}% |
3040 | \fi\fi}% | 3029 | \fi% |
3041 | \ifx\al@mode\al@mode@trans\arb{#3}\else% | 3030 | \else% |
3042 | \makebox[\al@bayt@width][s]{\arb{#3}}% | 3031 | \adjustbox{center=.15\al@bayt@width, height=\Height}{\arb{#2}} |
3043 | \fi} | 3032 | \fi}% |
3033 | \adjustbox{width=\al@bayt@width, height=\Height}{\arb{#3}}% | ||
3034 | } | ||
3044 | % \end{macrocode} | 3035 | % \end{macrocode} |
3045 | % | 3036 | % |
3046 | % \end{macro} | 3037 | % \end{macro} |