From c38ff6105eeed14af80103911064cc13ba960db1 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 6 Aug 2018 19:33:10 +0200 Subject: new command \arbmetre and new option 'color' for arabverse environment. a quick fix to a bug (or a missing feature) in either 'adjustbox' or 'luacolor' has been added. --- arabluatex.dtx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'arabluatex.dtx') diff --git a/arabluatex.dtx b/arabluatex.dtx index f17c67b..3dcfc1f 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -528,7 +528,7 @@ % \textsc{Rem.} By default Amiri places the \arb[trans]{kasraT} in % combination with the \arb[trans]{ta^sdId} below the consonant, % like so: \arb{BBi}\,. That is correct, as at least in the oldest -% manuscripts {\newfontfamily\arabicfont{Amiri}[Script=Arabic, +% manuscripts {\renewfontfamily\arabicfont{Amiri}[Script=Arabic, % RawFeature={+ss05}]\arb{BBi}} may stand for \arb{BBa} as % well as \arb{BBi}\,. See \textcite[i. 14 C--D]{Wright}. The placement % of the \arb[trans]{kasraT} above the consonant may be obtained by @@ -4432,17 +4432,23 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{environment}{arabverse} % \changes{v1.6}{2016/12/17}{New environment \texttt{arabverse} for % typesetting Arabic poetry} The |arabverse| environment may receive -% different options: |mode|, |width|, |gutter|, |metre|, |utf| -% and |delim|; all of them are defined here just before the -% |arabverse| environment: +% different options: |mode|, |width|, |gutter|, |metre|, |color|, +% |utf| and |delim|; all of them are defined here just before the +% |arabverse| environment. \changes{v1.13}{2018/07/30}{New command +% \cs{arbmetre}}\cs{arbmetre} does nothing. It takes the metre as +% argument so that it can be distinguished from the last \cs{bayt} +% command. \changes{v1.13}{2018/08/06}{New option \texttt{color} to +% \texttt{arabverse} environment.} % \begin{macrocode} +\NewDocumentCommand{\arbmetre}{m}{#1} \newlength{\al@bayt@width} \newlength{\al@gutter@width} \setlength{\al@bayt@width}{.3\textwidth} \setlength{\al@gutter@width}{.15\al@bayt@width} \define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}} \define@key[al]{verse}{gutter}{\setlength{\al@gutter@width}{#1}} -\define@key[al]{verse}{metre}{\arb{#1}} +\define@key[al]{verse}{metre}{\arb{\arbmetre{#1}}} +\define@key[al]{verse}{color}[]{\color{#1}} \define@boolkey[al]{verse}{utf}[true]{} \define@boolkey[al]{verse}{delim}[true]{} \define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, @@ -4457,7 +4463,7 @@ wa-ya.sIru ta.hta 'l-jild-i \ifx\al@mode\al@mode@trans% \ifal@verse@utf\setRL\else\setLR\fi% \else\setRL\fi}% -{\hfill\setkeys[al]{verse}[width,gutter,utf,mode]{#1}\egroup} +{\hfill\setkeys[al]{verse}[width,gutter,utf,mode]{#1}\egroup\par} % \end{macrocode} % \begin{macro}{\bayt} % \changes{v1.6}{2016/12/17}{New macro \cs{bayt} for typesetting @@ -4484,6 +4490,8 @@ wa-ya.sIru ta.hta 'l-jild-i \NewDocumentCommand{\SetHemistichDelim}{m}{\def\al@hemistich@delim{#1}} \def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt} \NewDocumentCommand{\bayt}{m o m}{% + {^^^^200b}% quick fix to a bug (or a missing feature) in either + % luacolor or adjustbox \ifdefined\savenotes\savenotes\else\fi% \edef\al@tatweel{--}% \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#1}}% -- cgit v1.2.3