aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arabluatex.lua22
1 files changed, 7 insertions, 15 deletions
diff --git a/arabluatex.lua b/arabluatex.lua
index cf6cac2..64d3fbc 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -708,6 +708,11 @@ local function processarbtoutf(str)
708 -- body = string.sub(body, 2, -2) 708 -- body = string.sub(body, 2, -2)
709 -- return string.format("%s%s\\@al@pr@ob%s\\@al@pr@cb", tag, opt, body) 709 -- return string.format("%s%s\\@al@pr@ob%s\\@al@pr@cb", tag, opt, body)
710 -- end) 710 -- end)
711 str = string.gsub(str, "(\\abjad)%s?(%b{})", function(tag, body)
712 body = string.sub(body, 2, -2)
713 body = abjadify(body)
714 return string.format("\\aemph{\\arb[novoc]{%s}}", body)
715 end)
711 str = string.gsub(str, "(\\arb%s?)(%b[])(%b{})", function(tag, opt, body) 716 str = string.gsub(str, "(\\arb%s?)(%b[])(%b{})", function(tag, opt, body)
712 body = string.sub(body, 2, -2) 717 body = string.sub(body, 2, -2)
713 return string.format("%s%s\\@al@pr@ob%s\\@al@pr@cb", tag, opt, body) 718 return string.format("%s%s\\@al@pr@ob%s\\@al@pr@cb", tag, opt, body)
@@ -720,10 +725,6 @@ local function processarbtoutf(str)
720 body = string.sub(body, 2, -2) 725 body = string.sub(body, 2, -2)
721 return string.format("%s\\@al@pr@ob%s\\@al@pr@cb", tag, body) 726 return string.format("%s\\@al@pr@ob%s\\@al@pr@cb", tag, body)
722 end) 727 end)
723 str = string.gsub(str, "(\\abjad)%s?(%b{})", function(tag, body)
724 body = string.sub(body, 2, -2)
725 return string.format("%s\\@al@pr@ob%s\\@al@pr@cb", tag, body)
726 end)
727 str = string.gsub(str, "(\\[Uu]c)%s?(%b{})", function(tag, body) 728 str = string.gsub(str, "(\\[Uu]c)%s?(%b{})", function(tag, body)
728 body = string.sub(body, 2, -2) 729 body = string.sub(body, 2, -2)
729 return string.format("%s\\@al@pr@ob%s\\@al@pr@cb", tag, body) 730 return string.format("%s\\@al@pr@ob%s\\@al@pr@cb", tag, body)
@@ -756,11 +757,6 @@ function arbtoutf(str)
756 end) 757 end)
757 str = string.gsub(str, "(\\ArbOutFile)%s?(%b{})", function(tag, body) 758 str = string.gsub(str, "(\\ArbOutFile)%s?(%b{})", function(tag, body)
758 body = string.sub(body, 2, -2) 759 body = string.sub(body, 2, -2)
759 body = string.gsub(body, "(\\abjad)%s?(%b{})", "}%1%2\\ArbOutFile{")
760 return string.format("%s{%s}", tag, body)
761 end)
762 str = string.gsub(str, "(\\ArbOutFile)%s?(%b{})", function(tag, body)
763 body = string.sub(body, 2, -2)
764 body = string.gsub(body, "(\\[Uu]c)%s?(%b{})", "}%1%2\\ArbOutFile{") 760 body = string.gsub(body, "(\\[Uu]c)%s?(%b{})", "}%1%2\\ArbOutFile{")
765 return string.format("%s{%s}", tag, body) 761 return string.format("%s{%s}", tag, body)
766 end) 762 end)
@@ -963,7 +959,6 @@ function processarbmarks(str)
963 end 959 end
964 end 960 end
965 end 961 end
966-- return str
967 if export_utf == "yes" then 962 if export_utf == "yes" then
968 tofile = str 963 tofile = str
969 tooutfile(tofile) 964 tooutfile(tofile)
@@ -1062,13 +1057,10 @@ function abjadify(n)
1062 if n >= 1 then 1057 if n >= 1 then
1063 abjadnum = abjadnum .. abjad[1][math.floor(n/1)] 1058 abjadnum = abjadnum .. abjad[1][math.floor(n/1)]
1064 end 1059 end
1065-- return "\\arb[novoc]{"..abjadnum.."}"
1066 if export_utf == "yes" then 1060 if export_utf == "yes" then
1067 tofile = "\\arb[novoc]{"..abjadnum.."}" 1061 return abjadnum
1068 tooutfile(tofile)
1069 elseif export_utf == "arabverse" then 1062 elseif export_utf == "arabverse" then
1070 tofile = "\\arb[novoc]{"..abjadnum.."}" 1063 return abjadnum
1071 tooutfile(tofile)
1072 else 1064 else
1073 return "\\arb[novoc]{"..abjadnum.."}" 1065 return "\\arb[novoc]{"..abjadnum.."}"
1074 end 1066 end