aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arabluatex.dtx12
-rw-r--r--arabluatex.lua9
2 files changed, 20 insertions, 1 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 9c30812..fccee3c 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -198,7 +198,7 @@
198%</driver> 198%</driver>
199% \fi 199% \fi
200% 200%
201% \CheckSum{372} 201% \CheckSum{0}
202% 202%
203% \CharacterTable 203% \CharacterTable
204% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 204% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -2635,6 +2635,16 @@ wa-ya.sIru ta.hta 'l-jild-i
2635\fi} 2635\fi}
2636% \end{macrocode} 2636% \end{macrocode}
2637% \end{macro} 2637% \end{macro}
2638% \begin{macro}{\abraces}
2639% \cs{abraces}\marg{Arabic text} puts its argument between curly
2640% braces.
2641% \changes{v1.4.3}{2016/09/13}{New command \cs{abraces} expresses
2642% its argument between curly braces.}
2643% \begin{macrocode}
2644\NewDocumentCommand{\abraces}{+m}{%
2645 \luadirect{tex.sprint(abraces(\luastringN{#1}))}}
2646% \end{macrocode}
2647% \end{macro}
2638% \begin{macro}{\LRmarginpar} \cs{LRmarginpar} is supposed to be 2648% \begin{macro}{\LRmarginpar} \cs{LRmarginpar} is supposed to be
2639% inserted in an Arabic environment. It typsets his argument in a 2649% inserted in an Arabic environment. It typsets his argument in a
2640% marginal note from left to right. 2650% marginal note from left to right.
diff --git a/arabluatex.lua b/arabluatex.lua
index c0e0232..35dccff 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -589,3 +589,12 @@ function abjadify(n)
589 end 589 end
590 return "\\arb[novoc]{"..abjadnum.."}" 590 return "\\arb[novoc]{"..abjadnum.."}"
591end 591end
592
593function abraces(str)
594 if tex.textdir == "TRT" then
595 str = "\\}"..str.."\\{"
596 elseif tex.textdir == "TLT" then
597 str = "\\{"..str.."\\}"
598 end
599 return str
600end