aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arabluatex.dtx11
-rw-r--r--arabluatex.lua3
2 files changed, 8 insertions, 6 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index a45b3bd..aa46115 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -4392,11 +4392,12 @@ wa-ya.sIru ta.hta 'l-jild-i
4392% \end{macrocode} 4392% \end{macrocode}
4393% \end{macro} 4393% \end{macro}
4394% \begin{macro}{\arbmark} 4394% \begin{macro}{\arbmark}
4395% \changes{v1.11}{2018/03/31}{New command for inserting additional 4395% \changes{v1.11}{2018/03/31}{New command for inserting additional
4396% marks in Arabic environments} \cs{arbmark} takes one argument from a 4396% marks in Arabic environments} \cs{arbmark} takes one argument from
4397% list of defined elements. This command is coded in 4397% a list of defined elements. \changes{v1.13}{2018/08/23}{New
4398% Lua. \changes{v1.13}{2018/08/23}{New optional argument: either 4398% optional argument: either \texttt{rl} or \texttt{lr}} The mark to
4399% \texttt{rl} or \texttt{lr}} 4399% be inserted is determined by contextual analysis or by an
4400% optional argument, either |rl| or |lr|. This command is coded in Lua.
4400% \begin{macrocode} 4401% \begin{macrocode}
4401\NewDocumentCommand{\arbmark}{O{} m}{% 4402\NewDocumentCommand{\arbmark}{O{} m}{%
4402 \bgroup% 4403 \bgroup%
diff --git a/arabluatex.lua b/arabluatex.lua
index 8bb9572..f717cb4 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -805,7 +805,7 @@ function al_closestream()
805 local t = f:read("*a") 805 local t = f:read("*a")
806 t = string.gsub(t, "\\arabicfont{}", "") 806 t = string.gsub(t, "\\arabicfont{}", "")
807 t = string.gsub(t, "\\par ", "\n\n") 807 t = string.gsub(t, "\\par ", "\n\n")
808 t = string.gsub(t, "(\\@al@ob%s?)", "{") 808 t = string.gsub(t, "(\\@al@ob)", "{")
809 t = string.gsub(t, "(\\@al@cb@sp)", "} ") 809 t = string.gsub(t, "(\\@al@cb@sp)", "} ")
810 t = string.gsub(t, "(\\@al@cb)(%s?)", "}") 810 t = string.gsub(t, "(\\@al@cb)(%s?)", "}")
811 t = gsub(t, lpeg.Cs("\\begin") * spcenc^-1 * bcbraces * cmdargs, "\n%1%2%3\n") 811 t = gsub(t, lpeg.Cs("\\begin") * spcenc^-1 * bcbraces * cmdargs, "\n%1%2%3\n")
@@ -817,6 +817,7 @@ function al_closestream()
817 t = string.gsub(t, "(\\end%s?)(%b{})", "%1%2\n") 817 t = string.gsub(t, "(\\end%s?)(%b{})", "%1%2\n")
818 t = string.gsub(t, "([^\n]%s-)(\\end)%s?(%b{})", "%1\n%2%3") 818 t = string.gsub(t, "([^\n]%s-)(\\end)%s?(%b{})", "%1\n%2%3")
819 t = string.gsub(t, "\n\n\n", "\n\n") 819 t = string.gsub(t, "\n\n\n", "\n\n")
820 t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?%b{})(%})", "%2")
820 if string.find(t, "\\begin%s?{document}.-\\arb%s?[%[%{]") or 821 if string.find(t, "\\begin%s?{document}.-\\arb%s?[%[%{]") or
821 string.find(t, "\\begin%s?{document}.-\\[Uu]c%s?%b{}") 822 string.find(t, "\\begin%s?{document}.-\\[Uu]c%s?%b{}")
822 then 823 then