aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2017-07-03 01:27:25 +0200
committerRobert Alessi <alessi@robertalessi.net>2017-07-03 01:27:25 +0200
commitca731fe0d91b4f741ba1745ff3fc5b22a5d1472a (patch)
treef4706e01a82ef033d229997dd307bef1df882537
parent794311265c5b020e8c459c33056e1376b169e27f (diff)
downloadarabluatex-ca731fe0d91b4f741ba1745ff3fc5b22a5d1472a.tar.gz
the documentation now needs to be updated
-rw-r--r--arabluatex.dtx41
-rw-r--r--arabluatex.lua2
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
2808% \cs{LR}\marg{arg}, but typesets its argument from right to left. Even 2808% \cs{LR}\marg{arg}, but typesets its argument from right to left. Even
2809% in an Arabic environment, this command may be useful. 2809% in an Arabic environment, this command may be useful.
2810% 2810%
2811% For example, to distinguish words with a different
2812% color,\footnote{See below \vref{sec:textcolor} for more information
2813% on two-argument commands.} one may proceed like so:--- %
2814% \iffalse
2815%<*example>
2816% \fi
2817\begin{arabluacode}
2818\begin{arab}
2819 _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI
2820 \textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}} wa-lA
2821 binA'-a la-hum yu'amminu-hum mina 'l-^sams-i.
2822\end{arab}
2823\end{arabluacode}
2824% \iffalse
2825%</example>
2826% \fi
2827%
2828% \DescribeMacro{\LRfootnote} \DescribeMacro{\RLfootnote} 2811% \DescribeMacro{\LRfootnote} \DescribeMacro{\RLfootnote}
2829% \cs{LRfootnote}\marg{text} and \cs{RLfootnote}\marg{text} typeset 2812% \cs{LRfootnote}\marg{text} and \cs{RLfootnote}\marg{text} typeset
2830% left-to-right and right-to-left footnotes respectively in Arabic 2813% 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...
2887%</example> 2870%</example>
2888% \fi 2871% \fi
2889% 2872%
2873% \section{New commands to be inserted in Arabic
2874% environments}
2875% \label{sec:declare-new-commands}
2876% In some particular cases, it may be useful to define new commands to
2877% be inserted in Arabic environments. From the general principle laid
2878% \vpageref{ref:cmd-inside-arabic}, it follows that
2879%
2880% For example, to distinguish words with a different
2881% color,\footnote{See below \vref{sec:textcolor} for more information
2882% on two-argument commands.} one may proceed like so:--- %
2883% \iffalse
2884%<*example>
2885% \fi
2886\begin{arabluacode}
2887\begin{arab}
2888 _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI
2889 \textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}} wa-lA
2890 binA'-a la-hum yu'amminu-hum mina 'l-^sams-i.
2891\end{arab}
2892\end{arabluacode}
2893% \iffalse
2894%</example>
2895% \fi
2896%
2890% \subsection{Environments} 2897% \subsection{Environments}
2891% \label{sec:environments} 2898% \label{sec:environments}
2892% \changes{v1.5}{2016/11/14}{Environments may be nested inside the 2899% \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)
66 -- nothing to do 66 -- nothing to do
67 else 67 else
68 for i = 1,#brkcmds do 68 for i = 1,#brkcmds do
69 str = string.gsub(str, "\\"..brkcmds[i]..".?(%b{})", 69 str = string.gsub(str, "\\"..brkcmds[i].."%s?(%b{})",
70 function(body) 70 function(body)
71 body = string.sub(body, 2, -2) 71 body = string.sub(body, 2, -2)
72 return string.format("}\\"..brkcmds[i].."{%s}\\arb{", body) 72 return string.format("}\\"..brkcmds[i].."{%s}\\arb{", body)