aboutsummaryrefslogtreecommitdiff
path: root/arabluatex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex.lua')
-rw-r--r--arabluatex.lua3
1 files changed, 2 insertions, 1 deletions
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