From ca731fe0d91b4f741ba1745ff3fc5b22a5d1472a Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 3 Jul 2017 01:27:25 +0200 Subject: the documentation now needs to be updated --- arabluatex.dtx | 41 ++++++++++++++++++++++++----------------- arabluatex.lua | 2 +- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/arabluatex.dtx b/arabluatex.dtx index 236e95f..c50ab6c 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -2808,23 +2808,6 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i % \cs{LR}\marg{arg}, but typesets its argument from right to left. Even % in an Arabic environment, this command may be useful. % -% For example, to distinguish words with a different -% color,\footnote{See below \vref{sec:textcolor} for more information -% on two-argument commands.} one may proceed like so:--- % -% \iffalse -%<*example> -% \fi -\begin{arabluacode} -\begin{arab} - _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI - \textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}} wa-lA - binA'-a la-hum yu'amminu-hum mina 'l-^sams-i. -\end{arab} -\end{arabluacode} -% \iffalse -% -% \fi -% % \DescribeMacro{\LRfootnote} \DescribeMacro{\RLfootnote} % \cs{LRfootnote}\marg{text} and \cs{RLfootnote}\marg{text} typeset % left-to-right and right-to-left footnotes respectively in Arabic @@ -2887,6 +2870,30 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \fi % +% \section{New commands to be inserted in Arabic +% environments} +% \label{sec:declare-new-commands} +% In some particular cases, it may be useful to define new commands to +% be inserted in Arabic environments. From the general principle laid +% \vpageref{ref:cmd-inside-arabic}, it follows that +% +% For example, to distinguish words with a different +% color,\footnote{See below \vref{sec:textcolor} for more information +% on two-argument commands.} one may proceed like so:--- % +% \iffalse +%<*example> +% \fi +\begin{arabluacode} +\begin{arab} + _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI + \textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}} wa-lA + binA'-a la-hum yu'amminu-hum mina 'l-^sams-i. +\end{arab} +\end{arabluacode} +% \iffalse +% +% \fi +% % \subsection{Environments} % \label{sec:environments} % \changes{v1.5}{2016/11/14}{Environments may be nested inside the diff --git a/arabluatex.lua b/arabluatex.lua index d35114d..48e5987 100644 --- a/arabluatex.lua +++ b/arabluatex.lua @@ -66,7 +66,7 @@ local function breakcmd(str) -- nothing to do else for i = 1,#brkcmds do - str = string.gsub(str, "\\"..brkcmds[i]..".?(%b{})", + str = string.gsub(str, "\\"..brkcmds[i].."%s?(%b{})", function(body) body = string.sub(body, 2, -2) return string.format("}\\"..brkcmds[i].."{%s}\\arb{", body) -- cgit v1.2.3