diff options
-rw-r--r-- | arabluatex.dtx | 189 | ||||
-rw-r--r-- | arabluatex.el | 1 | ||||
-rw-r--r-- | arabluatex.lua | 8 |
3 files changed, 131 insertions, 67 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx index c585c9e..4d6a00d 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx | |||
@@ -26,7 +26,7 @@ | |||
26 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] | 26 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
27 | %<package>\ProvidesPackage{arabluatex} | 27 | %<package>\ProvidesPackage{arabluatex} |
28 | %<*package> | 28 | %<*package> |
29 | [2023/01/24 v1.21-dev ArabTeX for LuaLaTeX] | 29 | [2023/05/21 v1.21-dev ArabTeX for LuaLaTeX] |
30 | %</package> | 30 | %</package> |
31 | % | 31 | % |
32 | %<*driver> | 32 | %<*driver> |
@@ -77,6 +77,15 @@ | |||
77 | url = {http://www.amirifont.org/} | 77 | url = {http://www.amirifont.org/} |
78 | } | 78 | } |
79 | 79 | ||
80 | @software{pkg:ekdosis, | ||
81 | title = {The Ekdosis package}, | ||
82 | subtitle = {Typesetting TEI-xml compliant Critical Editions}, | ||
83 | author = {Alessi, Robert}, | ||
84 | url = {http://www.ekdosis.org}, | ||
85 | date = {2021-11-21}, | ||
86 | version = {1.4} | ||
87 | } | ||
88 | |||
80 | @Book{Habash, | 89 | @Book{Habash, |
81 | author = {Habash, Nizar Y.}, | 90 | author = {Habash, Nizar Y.}, |
82 | title = {Introduction to Arabic Natural Language Processing}, | 91 | title = {Introduction to Arabic Natural Language Processing}, |
@@ -175,7 +184,7 @@ | |||
175 | \usepackage{lettrine} | 184 | \usepackage{lettrine} |
176 | \newcommand\danger{\lettrine[loversize=-.5]{\textdbend}{\hskip6pt}} | 185 | \newcommand\danger{\lettrine[loversize=-.5]{\textdbend}{\hskip6pt}} |
177 | \usepackage{metalogox} | 186 | \usepackage{metalogox} |
178 | \usepackage{arabluatex}[2023/01/24] | 187 | \usepackage{arabluatex}[2023/05/21] |
179 | \SetTranslitConvention{dmg+} | 188 | \SetTranslitConvention{dmg+} |
180 | \SetArbUp{\textsuperscript{\thinspace#1}} % Old Standard needs this | 189 | \SetArbUp{\textsuperscript{\thinspace#1}} % Old Standard needs this |
181 | \usepackage[nopar]{quran} | 190 | \usepackage[nopar]{quran} |
@@ -267,8 +276,6 @@ | |||
267 | label*=\textsc{Rem.} \emph{\alph*}, | 276 | label*=\textsc{Rem.} \emph{\alph*}, |
268 | left=0.25in, | 277 | left=0.25in, |
269 | before=\smaller} | 278 | before=\smaller} |
270 | \usepackage{multicol} | ||
271 | \setlength\IndexMin{100pt} | ||
272 | \usepackage{quoting} | 279 | \usepackage{quoting} |
273 | \quotingsetup{noorphans, rightmargin=0pt} | 280 | \quotingsetup{noorphans, rightmargin=0pt} |
274 | \renewcommand*{\quotingfont}{\footnotesize} | 281 | \renewcommand*{\quotingfont}{\footnotesize} |
@@ -297,7 +304,7 @@ | |||
297 | \DeclareQuoteStyle{arabic} | 304 | \DeclareQuoteStyle{arabic} |
298 | {\rmfamily\textquotedblright}{\rmfamily\textquotedblleft} | 305 | {\rmfamily\textquotedblright}{\rmfamily\textquotedblleft} |
299 | {\rmfamily\textquoteright}{\rmfamily\textquoteleft} | 306 | {\rmfamily\textquoteright}{\rmfamily\textquoteleft} |
300 | \usepackage[style=authoryear, indexing=cite]{biblatex} | 307 | \usepackage[style=oxnotes-inote,indexing=cite]{biblatex} |
301 | \DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}} | 308 | \DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}} |
302 | \addbibresource{arabluatex.bib} | 309 | \addbibresource{arabluatex.bib} |
303 | \NewDocumentCommand{\newfeature}{o}{% | 310 | \NewDocumentCommand{\newfeature}{o}{% |
@@ -316,24 +323,27 @@ | |||
316 | \renewcommand\cftlottitlefont{\Large\bfseries} | 323 | \renewcommand\cftlottitlefont{\Large\bfseries} |
317 | \usepackage{etoc} | 324 | \usepackage{etoc} |
318 | \etocsettocdepth{paragraph} | 325 | \etocsettocdepth{paragraph} |
326 | \makeatletter | ||
319 | \newcommand{\altableofcontents}{% | 327 | \newcommand{\altableofcontents}{% |
320 | \begingroup | 328 | \begingroup |
321 | \etocsetstyle{section}{}{} | 329 | \etocsetstyle{section}{}{} |
322 | {\etocsavedsectiontocline{% | 330 | {\l@section{% |
323 | \numberline{\etocnumber}\etocname}{\etocpage}}{} | 331 | \numberline{\etocnumber}\etocname}{\etocpage}}{} |
324 | \etocsetstyle{subsection}{}{} | 332 | \etocsetstyle{subsection}{}{} |
325 | {\etocsavedsubsectiontocline{% | 333 | {\l@subsection{% |
326 | \numberline{\etocnumber}\etocname}{\etocpage}}{}% | 334 | \numberline{\etocnumber}\etocname}{\etocpage}}{}% |
327 | \etocsetstyle{subsubsection}{}{} | 335 | \etocsetstyle{subsubsection}{}{} |
328 | {\etocsavedsubsubsectiontocline{% | 336 | {\l@subsubsection{% |
329 | \numberline{\etocnumber}\etocname}{\etocpage}}{}% | 337 | \numberline{\etocnumber}\etocname}{\etocpage}}{}% |
330 | \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip | 338 | \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip |
331 | 0pt plus 1fil\relax \nobreak} | 339 | 0pt plus 1fil\relax \nobreak} |
332 | {\noindent\etocname{} \etocpage{} }{\par}% | 340 | {\noindent\etocname{} \etocpage{} }{\par}% |
333 | \etocmulticolstyle[2]{\section*{Contents}} | 341 | \etocmulticolstyle[2]{\section*{Contents}} |
334 | \pdfbookmark[1]{Contents}{toc} | 342 | \pdfbookmark[1]{Contents}{toc} |
335 | \tableofcontents | 343 | \etoctoclines |
344 | \localtableofcontents | ||
336 | \endgroup} | 345 | \endgroup} |
346 | \makeatother | ||
337 | \setlength\IndexMin{100pt} | 347 | \setlength\IndexMin{100pt} |
338 | \EnableCrossrefs | 348 | \EnableCrossrefs |
339 | \RecordChanges | 349 | \RecordChanges |
@@ -427,11 +437,11 @@ | |||
427 | % input notation. Its output can be set in the same modes of | 437 | % input notation. Its output can be set in the same modes of |
428 | % vocalization as Arab\TeX, or in different roman | 438 | % vocalization as Arab\TeX, or in different roman |
429 | % transliterations. It further allows many typographical | 439 | % transliterations. It further allows many typographical |
430 | % refinements. It will eventually interact with some other packages | 440 | % refinements. Furthermore, it can interact with the \pkg{ekdosis} |
431 | % yet to come to produce from \verb|.tex| source files, in addition | 441 | % package to produce from \verb|.tex| source files, in addition to |
432 | % to printed books, \texttt{TEI xml} compliant critical editions | 442 | % printed books, \texttt{TEI xml} compliant critical editions and/or |
433 | % and/or lexicons that can be searched, analyzed and correlated in | 443 | % lexicons that can be searched, analyzed and correlated in various |
434 | % various ways. | 444 | % ways. |
435 | % \end{abstract} | 445 | % \end{abstract} |
436 | % | 446 | % |
437 | % \section*{License and Disclaimer} | 447 | % \section*{License and Disclaimer} |
@@ -2380,8 +2390,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
2380 | % when \texttt{export} is set to \texttt{true} to instruct some Lua | 2390 | % when \texttt{export} is set to \texttt{true} to instruct some Lua |
2381 | % functions that lines of poetry have already been processed. That | 2391 | % functions that lines of poetry have already been processed. That |
2382 | % aside, \cs{bayt} and \cs{bayt*} do the same, and only \cs{bayt} | 2392 | % aside, \cs{bayt} and \cs{bayt*} do the same, and only \cs{bayt} |
2383 | % should be used.} Additionally, every \cs{bayt} command \emph{must} | 2393 | % should be used.} Additionally, every \cs{bayt} command \emph{must} |
2384 | % be followed with |\\| like so:---% | 2394 | % be followed with |\\| like so:--- |
2395 | % | ||
2385 | % \iffalse | 2396 | % \iffalse |
2386 | %<*example> | 2397 | %<*example> |
2387 | % \fi | 2398 | % \fi |
@@ -2516,6 +2527,16 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
2516 | % package can also be used for the same effect. However, it must be | 2527 | % package can also be used for the same effect. However, it must be |
2517 | % loaded \emph{after} \package{arabluatex}.} | 2528 | % loaded \emph{after} \package{arabluatex}.} |
2518 | % | 2529 | % |
2530 | % \needspace{3\baselineskip} | ||
2531 | % \paragraph{Critical Notes} | ||
2532 | % \DescribeMacro{\bayt+} \newfeature[v1.21] If the \pkg{ekdosis} | ||
2533 | % package be loaded,\footcite{pkg:ekdosis} the \cs{bayt} command also | ||
2534 | % accepts a |+| optional argument that can be used to let critical | ||
2535 | % notes be inserted in lines of poetry. Details on how to use this | ||
2536 | % command are provided in the relevant section of the documentation of | ||
2537 | % the \pkg{ekdosis} package.\footcite[\nopp see \enquote{Arabic | ||
2538 | % Poetry}]{pkg:ekdosis} | ||
2539 | % | ||
2519 | % \paragraph{Line numbering} | 2540 | % \paragraph{Line numbering} |
2520 | % Inside the |arabverse| environment, the |linenumbers| environment of | 2541 | % Inside the |arabverse| environment, the |linenumbers| environment of |
2521 | % the \package{lineno} package can be used to have the lines of | 2542 | % the \package{lineno} package can be used to have the lines of |
@@ -4631,7 +4652,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
4631 | % \end{macrocode} | 4652 | % \end{macrocode} |
4632 | % \end{macro} | 4653 | % \end{macro} |
4633 | % \begin{macro}{\SetArbNumbers} | 4654 | % \begin{macro}{\SetArbNumbers} |
4634 | % \changes{v1.21}{2023/01/24}{selects Indian or Arabic numbers} | 4655 | % \changes{v1.21}{2023/05/21}{selects Indian or Arabic numbers} |
4635 | % \begin{macrocode} | 4656 | % \begin{macrocode} |
4636 | \NewDocumentCommand{\SetArbNumbers}{m}{% | 4657 | \NewDocumentCommand{\SetArbNumbers}{m}{% |
4637 | \luadirect{arabluatex.setnums(\luastringN{#1})}% | 4658 | \luadirect{arabluatex.setnums(\luastringN{#1})}% |
@@ -4794,7 +4815,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
4794 | % \end{macrocode} | 4815 | % \end{macrocode} |
4795 | % \end{macro} | 4816 | % \end{macro} |
4796 | % \begin{macro}{\altrfont} | 4817 | % \begin{macro}{\altrfont} |
4797 | % \changes{v1.21}{2023/01/24}{new command \cs{altrfont} to store | 4818 | % \changes{v1.21}{2023/05/21}{new command \cs{altrfont} to store |
4798 | % font and shape information (trans mode)} Finally \cs{altrfont} | 4819 | % font and shape information (trans mode)} Finally \cs{altrfont} |
4799 | % is used internally by \package{arabluatex} to store family and | 4820 | % is used internally by \package{arabluatex} to store family and |
4800 | % shape information about the font to be used for transliterated | 4821 | % shape information about the font to be used for transliterated |
@@ -5031,55 +5052,63 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
5031 | % \begin{macrocode} | 5052 | % \begin{macrocode} |
5032 | \newlength{\al@bayt@width} | 5053 | \newlength{\al@bayt@width} |
5033 | \newlength{\al@gutter@width} | 5054 | \newlength{\al@gutter@width} |
5055 | \newlength{\al@verse@twidth} | ||
5034 | \setlength{\al@bayt@width}{.3\textwidth} | 5056 | \setlength{\al@bayt@width}{.3\textwidth} |
5035 | \setlength{\al@gutter@width}{.15\al@bayt@width} | 5057 | \setlength{\al@gutter@width}{.15\al@bayt@width} |
5036 | \define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}} | 5058 | \define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}} |
5037 | \define@key[al]{verse}{gutter}{\setlength{\al@gutter@width}{#1}} | 5059 | \define@key[al]{verse}{gutter}{\setlength{\al@gutter@width}{#1}} |
5038 | \define@key[al]{verse}{metre}{\arb{#1}} | 5060 | \define@key[al]{verse}{metre}{\def\al@verse@metre@value{\arb{#1}}} |
5039 | \define@key[al]{verse}{color}[]{\color{#1}} | 5061 | \define@key[al]{verse}{color}[]{\color{#1}} |
5040 | \define@boolkey[al]{verse}{utf}[true]{} | 5062 | \define@boolkey[al]{verse}{utf}[true]{} |
5041 | \define@boolkey[al]{verse}{delim}[true]{} | 5063 | \define@boolkey[al]{verse}{delim}[true]{} |
5042 | \define@boolkey[al]{verse}{export}[true]{} | 5064 | \define@boolkey[al]{verse}{export}[true]{} |
5043 | \define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, | 5065 | \define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, |
5044 | trans}{\def\al@mode{#1}} | 5066 | trans}{\def\al@mode{#1}} |
5045 | \presetkeys[al]{verse}{metre={}, utf=false, | 5067 | \presetkeys[al]{verse}{utf=false, delim=false}{} |
5046 | delim=false}{} | ||
5047 | % \end{macrocode} | 5068 | % \end{macrocode} |
5048 | % Then follows the environment itself: | 5069 | % Then follows the environment itself: |
5049 | % \begin{macrocode} | 5070 | % \begin{macrocode} |
5050 | \NewDocumentEnvironment{arabverse}{!O{}}% | 5071 | \NewDocumentEnvironment{arabverse}{!O{}}% |
5051 | {\bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, | 5072 | {\bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, |
5052 | metre]{#1}% | 5073 | metre]{#1}% |
5053 | \if@pkg@export\ifal@verse@export% | 5074 | \if@pkg@export |
5054 | \ArbOutFile{\begin{arabverse}}% | 5075 | \ifal@verse@export |
5055 | % \ifx\al@mode\al@mode@trans% | 5076 | \ArbOutFile{\begin{arabverse}}% |
5056 | % \luadirect{arabluatex.tooutfile(\luastringN{[#1]})}% | 5077 | % \ifx\al@mode\al@mode@trans% |
5057 | % \else% | 5078 | % \luadirect{arabluatex.tooutfile(\luastringN{[#1]})}% |
5058 | \IfSubStr[1]{#1}{utf}% | 5079 | % \else% |
5080 | \IfSubStr[1]{#1}{utf}% | ||
5059 | {\luadirect{arabluatex.tooutfile(\luastringN{[#1]})}}% | 5081 | {\luadirect{arabluatex.tooutfile(\luastringN{[#1]})}}% |
5060 | {\luadirect{arabluatex.tooutfile(\luastringN{[#1, utf]})}}% | 5082 | {\luadirect{arabluatex.tooutfile(\luastringN{[#1, utf]})}}% |
5061 | % \fi | 5083 | % \fi |
5062 | \else\fi\else\fi\egroup% | 5084 | \else |
5063 | \par\centering\noindent\bgroup\setkeys[al]{verse}[metre]{#1}% | 5085 | \fi |
5064 | % \ifx\al@mode\al@mode@trans% | 5086 | \else |
5065 | % \ifal@verse@utf\setRL\else\setLR\fi% | 5087 | \fi |
5066 | % \else\setRL\fi% | 5088 | \egroup |
5067 | \ifal@verse@utf% | 5089 | \centering\noindent\bgroup\setkeys[al]{verse}[metre]{#1}% |
5068 | \ifx\al@mode\al@mode@trans\setLR\else\setRL\fi% | 5090 | % \ifx\al@mode\al@mode@trans% |
5069 | \else% | 5091 | % \ifal@verse@utf\setRL\else\setLR\fi% |
5070 | \ifx\al@mode\al@mode@trans\setLR\else\setRL\fi% | 5092 | % \else\setRL\fi% |
5071 | \fi% | 5093 | \ifal@verse@utf |
5072 | \arab@v@export[#1] | 5094 | \ifx\al@mode\al@mode@trans\setLR\else\setRL\fi |
5095 | \else | ||
5096 | \ifx\al@mode\al@mode@trans\setLR\else\setRL\fi | ||
5097 | \fi | ||
5098 | \addtolength{\al@verse@twidth}{2\al@bayt@width}% | ||
5099 | \addtolength{\al@verse@twidth}{\al@gutter@width}% | ||
5100 | \arab@v@export[#1] | ||
5073 | }% | 5101 | }% |
5074 | {\endarab@v@export | 5102 | {\endarab@v@export |
5075 | \hfill\setkeys[al]{verse}[width, gutter, color, utf, delim, mode, | 5103 | \setkeys[al]{verse}[width, gutter, color, utf, delim, mode, |
5076 | export]{#1}% | 5104 | export]{#1}% |
5077 | \egroup\par% | 5105 | \ifdefined\al@verse@metre@value\hfill\al@verse@metre@value\fi |
5106 | \egroup | ||
5078 | \bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, mode, | 5107 | \bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, mode, |
5079 | metre]{#1}% | 5108 | metre]{#1}% |
5080 | \if@pkg@export\ifal@verse@export% | 5109 | \if@pkg@export\ifal@verse@export |
5081 | \ArbOutFile{\end{arabverse}} | 5110 | \ArbOutFile{\end{arabverse}}% |
5082 | \else\fi\else\fi\egroup} | 5111 | \else\fi\else\fi\egroup} |
5083 | % \end{macrocode} | 5112 | % \end{macrocode} |
5084 | % \begin{macro}{\bayt} | 5113 | % \begin{macro}{\bayt} |
5085 | % \changes{v1.6}{2016/12/17}{New macro \cs{bayt} for typesetting | 5114 | % \changes{v1.6}{2016/12/17}{New macro \cs{bayt} for typesetting |
@@ -5128,22 +5157,33 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
5128 | \def\al@hemistich@delim{*} | 5157 | \def\al@hemistich@delim{*} |
5129 | \NewDocumentCommand{\SetHemistichDelim}{m}{\def\al@hemistich@delim{#1}} | 5158 | \NewDocumentCommand{\SetHemistichDelim}{m}{\def\al@hemistich@delim{#1}} |
5130 | \def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt} | 5159 | \def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt} |
5131 | \NewDocumentCommand{\bayt}{s m o m}{% | 5160 | \providebool{ekd@state} |
5132 | \IfBooleanTF{#1}{\relax}{\relax}% | 5161 | \NewDocumentCommand{\bayt}{t+ s m o m}{% |
5162 | \IfBooleanTF{#1}{% | ||
5163 | \ifekd@state | ||
5164 | \leavevmode | ||
5165 | \stepcounter{ekd@lab}% | ||
5166 | \zlabel{ekd:\theekd@lab}% | ||
5167 | \luadirect{ekdosis.storeabspg( | ||
5168 | \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}% | ||
5169 | \add@apparatus | ||
5170 | \fi | ||
5171 | }{\relax}% | ||
5172 | \IfBooleanTF{#2}{\relax}{\relax}% | ||
5133 | \ifdefined\savenotes\savenotes\else\fi% | 5173 | \ifdefined\savenotes\savenotes\else\fi% |
5134 | \edef\al@tatweel{--}% | 5174 | \edef\al@tatweel{--}% |
5135 | \ifal@warp@bayt% | 5175 | \ifal@warp@bayt% |
5136 | \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#2}}% | 5176 | \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#3}}% |
5137 | \else% | 5177 | \else% |
5138 | \makebox[\al@bayt@width][s]{\arb@utf{#2}}% | 5178 | \makebox[\al@bayt@width][s]{\arb@utf{#3}}% |
5139 | \fi% | 5179 | \fi% |
5140 | \IfNoValueTF{#3}{% | 5180 | \IfNoValueTF{#4}{% |
5141 | \ifal@verse@delim\makebox[\al@gutter@width][c]{\al@hemistich@delim}% | 5181 | \ifal@verse@delim\makebox[\al@gutter@width][c]{\al@hemistich@delim}% |
5142 | \else% | 5182 | \else% |
5143 | \hspace{\al@gutter@width}% | 5183 | \hspace{\al@gutter@width}% |
5144 | \fi | 5184 | \fi |
5145 | }{% | 5185 | }{% |
5146 | \edef\@tempa{#3}% | 5186 | \edef\@tempa{#4}% |
5147 | \ifx\@tempa\al@tatweel% | 5187 | \ifx\@tempa\al@tatweel% |
5148 | \ifx\al@mode\al@mode@trans% | 5188 | \ifx\al@mode\al@mode@trans% |
5149 | \hspace{\al@gutter@width}% | 5189 | \hspace{\al@gutter@width}% |
@@ -5153,17 +5193,17 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
5153 | \else% | 5193 | \else% |
5154 | \ifx\al@mode\al@mode@trans% | 5194 | \ifx\al@mode\al@mode@trans% |
5155 | \ifal@warp@bayt% | 5195 | \ifal@warp@bayt% |
5156 | \adjustbox{width=\al@gutter@width, height=\Height}{\arb@utf{#3}}% | 5196 | \adjustbox{width=\al@gutter@width, height=\Height}{\arb@utf{#4}}% |
5157 | \else% | 5197 | \else% |
5158 | \makebox[\al@gutter@width][s]{\arb@utf{#3}}% | 5198 | \makebox[\al@gutter@width][s]{\arb@utf{#4}}% |
5159 | \fi% | 5199 | \fi% |
5160 | \else% | 5200 | \else% |
5161 | \makebox[\al@gutter@width][s]{\arb@utf{#3}}% | 5201 | \makebox[\al@gutter@width][s]{\arb@utf{#4}}% |
5162 | \fi\fi}% | 5202 | \fi\fi}% |
5163 | \ifal@warp@bayt% | 5203 | \ifal@warp@bayt% |
5164 | \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#4}}% | 5204 | \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#5}}% |
5165 | \else% | 5205 | \else% |
5166 | \makebox[\al@bayt@width][s]{\arb@utf{#4}}% | 5206 | \makebox[\al@bayt@width][s]{\arb@utf{#5}}% |
5167 | \fi% | 5207 | \fi% |
5168 | \ifdefined\spewnotes\spewnotes\else\fi% | 5208 | \ifdefined\spewnotes\spewnotes\else\fi% |
5169 | } | 5209 | } |
@@ -5400,14 +5440,37 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||
5400 | \NewDocumentEnvironment{arab@v@export}{O{} +b}{% | 5440 | \NewDocumentEnvironment{arab@v@export}{O{} +b}{% |
5401 | \setkeys[al]{verse}[width, gutter, color, utf, delim, mode, | 5441 | \setkeys[al]{verse}[width, gutter, color, utf, delim, mode, |
5402 | metre]{#1} | 5442 | metre]{#1} |
5403 | \if@pkg@export\ifal@verse@export% | 5443 | \if@pkg@export |
5404 | \par | 5444 | \ifal@verse@export |
5405 | #2 | 5445 | \ifekd@state |
5406 | \luadirect{arabluatex.doexport("arabverse")} | 5446 | \begin{ekdverse}[width=\al@verse@twidth] |
5407 | \luadirect{tex.sprint(arabluatex.arbtoutf(\luastringN{#2}))} | 5447 | #2 |
5408 | \luadirect{arabluatex.doexport("no")} | 5448 | \end{ekdverse} |
5409 | \else\par#2\fi\else\par#2\fi | 5449 | \else |
5410 | }{\par} | 5450 | #2 |
5451 | \fi | ||
5452 | \luadirect{arabluatex.doexport("arabverse")}% | ||
5453 | \luadirect{tex.sprint(arabluatex.arbtoutf(\luastringN{#2}))}% | ||
5454 | \luadirect{arabluatex.doexport("no")}% | ||
5455 | \else | ||
5456 | \ifekd@state | ||
5457 | \begin{ekdverse}[width=\al@verse@twidth] | ||
5458 | #2 | ||
5459 | \end{ekdverse} | ||
5460 | \else | ||
5461 | #2 | ||
5462 | \fi | ||
5463 | \fi | ||
5464 | \else | ||
5465 | \ifekd@state | ||
5466 | \begin{ekdverse}[width=\al@verse@twidth] | ||
5467 | #2 | ||
5468 | \end{ekdverse} | ||
5469 | \else | ||
5470 | #2 | ||
5471 | \fi | ||
5472 | \fi | ||
5473 | }{} | ||
5411 | % \end{macrocode} | 5474 | % \end{macrocode} |
5412 | % \end{environment} | 5475 | % \end{environment} |
5413 | % \begin{macro}{\arbpardir} | 5476 | % \begin{macro}{\arbpardir} |
diff --git a/arabluatex.el b/arabluatex.el index e445aca..5007675 100644 --- a/arabluatex.el +++ b/arabluatex.el | |||
@@ -125,6 +125,7 @@ | |||
125 | TeX-arg-index) | 125 | TeX-arg-index) |
126 | "SetHemistichDelim" | 126 | "SetHemistichDelim" |
127 | '("bayt" 2) | 127 | '("bayt" 2) |
128 | '("bayt+" 2) | ||
128 | "abjad" | 129 | "abjad" |
129 | '("SetArbNumbers" "Indian or Arabic") | 130 | '("SetArbNumbers" "Indian or Arabic") |
130 | "arbnull" | 131 | "arbnull" |
diff --git a/arabluatex.lua b/arabluatex.lua index bce9e0f..ec318b7 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -821,16 +821,16 @@ local function processarbtoutf(str) | |||
821 | end) | 821 | end) |
822 | return string.format("%s{%s}", tag, body) | 822 | return string.format("%s{%s}", tag, body) |
823 | end) | 823 | end) |
824 | str = string.gsub(str, "(\\bayt)%s?(%b{})(%b[])(%b{})", function(tag, argi, argii, argiii) | 824 | str = string.gsub(str, "(\\bayt)%s?(%+?)(%b{})(%b[])(%b{})", function(tag, plus, argi, argii, argiii) |
825 | argi = string.sub(argi, 2, -2) | 825 | argi = string.sub(argi, 2, -2) |
826 | argii = string.sub(argii, 2, -2) | 826 | argii = string.sub(argii, 2, -2) |
827 | argiii = string.sub(argiii, 2, -2) | 827 | argiii = string.sub(argiii, 2, -2) |
828 | return string.format("%s*{\\arb{%s}}[\\arb{%s}]{\\arb{%s}}", tag, argi, argii, argiii) | 828 | return string.format("%s%s*{\\arb{%s}}[\\arb{%s}]{\\arb{%s}}", tag, argi, argii, argiii) |
829 | end) | 829 | end) |
830 | str = string.gsub(str, "(\\bayt)%s?(%b{})(%b{})", function(tag, argi, argii) | 830 | str = string.gsub(str, "(\\bayt)%s?(%+?)(%b{})(%b{})", function(tag, plus, argi, argii) |
831 | argi = string.sub(argi, 2, -2) | 831 | argi = string.sub(argi, 2, -2) |
832 | argii = string.sub(argii, 2, -2) | 832 | argii = string.sub(argii, 2, -2) |
833 | return string.format("%s*{\\arb{%s}}{\\arb{%s}}", tag, argi, argii) | 833 | return string.format("%s%s*{\\arb{%s}}{\\arb{%s}}", tag, plus, argi, argii) |
834 | end) | 834 | end) |
835 | str = string.gsub(str, "(\\prname)%s?(%b{})", function(tag, body) | 835 | str = string.gsub(str, "(\\prname)%s?(%b{})", function(tag, body) |
836 | body = string.sub(body, 2, -2) | 836 | body = string.sub(body, 2, -2) |