diff options
Diffstat (limited to 'arabluatex.lua')
-rw-r--r-- | arabluatex.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arabluatex.lua b/arabluatex.lua index 32bb500..8897194 100644 --- a/arabluatex.lua +++ b/arabluatex.lua | |||
@@ -532,6 +532,8 @@ local function novoceasy(str) | |||
532 | return str | 532 | return str |
533 | end | 533 | end |
534 | 534 | ||
535 | local trfontinfo = "\\altrfont " | ||
536 | |||
535 | local function transdmg(str, rules) | 537 | local function transdmg(str, rules) |
536 | str = string.gsub(str, "\\arb(%b{})", function(inside) | 538 | str = string.gsub(str, "\\arb(%b{})", function(inside) |
537 | inside = string.sub(inside, 2, -2) | 539 | inside = string.sub(inside, 2, -2) |
@@ -567,7 +569,7 @@ local function transdmg(str, rules) | |||
567 | for i = 1,#nulltr do | 569 | for i = 1,#nulltr do |
568 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) | 570 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) |
569 | end | 571 | end |
570 | return string.format("%s", inside) | 572 | return string.format("{%s%s}", trfontinfo, inside) |
571 | end) | 573 | end) |
572 | return str | 574 | return str |
573 | end | 575 | end |
@@ -605,7 +607,7 @@ local function transloc(str) | |||
605 | for i = 1,#nulltr do | 607 | for i = 1,#nulltr do |
606 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) | 608 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) |
607 | end | 609 | end |
608 | return string.format("%s", inside) | 610 | return string.format("{%s%s}", trfontinfo, inside) |
609 | end) | 611 | end) |
610 | return str | 612 | return str |
611 | end | 613 | end |
@@ -640,7 +642,7 @@ local function transarabica(str) | |||
640 | for i = 1,#nulltr do | 642 | for i = 1,#nulltr do |
641 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) | 643 | inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) |
642 | end | 644 | end |
643 | return string.format("%s", inside) | 645 | return string.format("{%s%s}", trfontinfo, inside) |
644 | end) | 646 | end) |
645 | return str | 647 | return str |
646 | end | 648 | end |