From 8b10020879e9fe881d91aeff2c66b2670dfe25c7 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 26 Aug 2018 11:48:58 +0200 Subject: still documenting. remove \txtrans nested inside \prname* --- arabluatex.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arabluatex.lua') diff --git a/arabluatex.lua b/arabluatex.lua index 8fc04d6..5b2d2e3 100644 --- a/arabluatex.lua +++ b/arabluatex.lua @@ -817,7 +817,11 @@ function al_closestream() t = string.gsub(t, "(\\end%s?)(%b{})", "%1%2\n") t = string.gsub(t, "([^\n]%s-)(\\end)%s?(%b{})", "%1\n%2%3") t = string.gsub(t, "\n\n\n", "\n\n") - t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?%b{})(%})", "%2") + t = string.gsub(t, "(\\txarb%s?%{)(\\txarb%s?)(%b{})(%})", "%1%3%4") + t = string.gsub(t, "(\\prname%s?%*%{)(\\txtrans%s?)(%b{})(%})", function(tagio, tagii, body, tagic) + body = string.sub(body, 2, -2) + return string.format("%s%s%s", tagio, body, tagic) + end) if string.find(t, "\\begin%s?{document}.-\\arb%s?[%[%{]") or string.find(t, "\\begin%s?{document}.-\\[Uu]c%s?%b{}") then -- cgit v1.2.3