diff options
author | Karl Berry <karl@freefriends.org> | 2018-05-02 20:50:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-05-02 20:50:59 +0000 |
commit | 24994bf3727b2e3aaa26b585177bdfe0a275af8c (patch) | |
tree | 1e0a4aa1c549d9aeb1baf73acdba4545cb40c63f /Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua | |
parent | 0f191996e5297a6d29daa555806f016a691ca723 (diff) |
babel (2may18)
git-svn-id: svn://tug.org/texlive/trunk@47576 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua index ab455dc3d4c..0d66b33ccde 100644 --- a/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua +++ b/Master/texmf-dist/tex/generic/babel/babel-bidi-basic-r.lua @@ -81,15 +81,22 @@ function Babel.bidi(head, ispar) for item in node.traverse(head) do -- three cases: glyph, dir, otherwise - if item.id == node.id'glyph' then + if item.id == node.id'glyph' + or (item.id == 7 and item.subtype == 2) then - local chardata = characters[item.char] + local itemchar + if item.id == 7 and item.subtype == 2 then + itemchar = item.replace.char + else + itemchar = item.char + end + local chardata = characters[itemchar] dir = chardata and chardata.d or nil if not dir then for nn, et in ipairs(ranges) do - if item.char < et[1] then + if itemchar < et[1] then break - elseif item.char <= et[2] then + elseif itemchar <= et[2] then dir = et[3] break end @@ -100,7 +107,7 @@ function Babel.bidi(head, ispar) attr_dir = 0 for at in node.traverse(item.attr) do if at.number == luatexbase.registernumber'bbl@attr@dir' then - attr_dir = at.value + attr_dir = at.value % 3 end end if attr_dir == 1 then |